Q&A


Everything you always wanted to know about Eclipse, Embedded Systems Programming, Software and Tools, or any topics of this blog, but where afraid to ask, then this page is for you.

Post a comment, and you might get an answer, either from myself or from the readers of this blog. Otherwise: the answer is always ‘42‘ 😉

For feature requests or bug reports on the McuOnEclipse project end Processor Expert components, you should use the GitHub issue tracking system:

917 thoughts on “Q&A

  1. Hi Erich! great work on his blog ! I’ll use some of your code inside my project ! Quick question about the freeRTOS PE component. I seem to get lost with the priority scheme of freeRTOS, interrupt and your implementation of the freeRTOS component.

    I want to be sure of one thing : IDLE task is assigned priotity 0, I guess it’S the lowest priority, the priority we give in FRTOS1_xTaskCreate() (PE component) should be related to priority number of the free RTOS right ? not the priority of the interrupt.. which are inverted right ?

    lets says i create 2 tasks with your component :
    FRTOS1_xTaskCreate(tsk1, “Task1”, configMINIMAL_STACK_SIZE, &globalhost, 1, NULL);
    FRTOS1_xTaskCreate(tsk2, “Task2”, configMINIMAL_STACK_SIZE, &globalhost, 2, NULL);

    Task2 priority will be greater than Task1 ?

    sincerely.

    Like

    • Hi Etienne,
      the FreeRTOS component is using the normal FreeRTOS priority scheme (nothing different). If you are new to FreeRTOS and the ARM Cortex interrupts, then I recommend that you have a read at the multipart tutorial starting at https://mcuoneclipse.com/2016/08/14/arm-cortex-m-interrupts-and-freertos-part-1/.
      Keep in mind that FreeRTOS priorities start with zero as the lowest priority, while the ARM Cortex priorities have zero as the highest urgency level.
      So yes, 0 (or tskIDLE_PRIORITY) is the FreeRTOS priority for the IDLE task. The RTOS itself runs with its interrupts (SysTick, PendSV and PendSvReq) at the lowest interrupt priority (15 for 4 priority bits).
      And yes, for your example, the Task2 his higher urgency than Task1 and this one has higher urgency than the IDLE task.
      I hope this helps,
      Erich

      Like

  2. Hello, Erich! I really ensjoy your blog!

    I have a question about mbed, especially openSDA.
    I build a board based on FRDM-KL43Z.
    My trouble is my boards are doesn’t work in my PC. I think absent of bootloader is main problem. Can you teach me how install a new bootloader in a board? There is none-S/W in my board.

    Here is my board symptom.
    1. Power LED is working
    2. MCU USB port ack as USB serial. But it cannot use as storage.
    3. openSDA USB unack.

    sincerely,
    Soo-Chang

    Like

  3. Hi…in my case my boards are doesn’t work in my PC. I think absent of bootloader is main problem. Can you teach me how install a new bootloader in a board? There is none-S/W in my board.

    Like

  4. Hi Erich,
    I just noticed that NXP has a Low Voltage Hbridge PE component (LVHBridge) , and also a medium voltage Hbridge (MVHBridge) component that can be downloaded and work on processors like the K20’s with Processor Expert. Have you seen these before and do you have any experience with them?
    I found it because I want to make a stepper motor driver (microstepping) using discrete components on the theory that it could be better/cheaper than using a microstepping chip- these components look like the easy way to do so.

    Brynn

    Like

  5. Hi Erich,
    I am working on a project where I send short text messages between a K64F and an android tablet. I want the K64F to be a host and the tablet to be a device. How do I do this. Do I need an OTG cable.

    Like

  6. Hi Erich
    I am trying to modify your example using the Adafruit SPI friend. I want to use the Freedom K64F instead of the Tiny20.

    For the Adafruit SPI you use 5 IO lines. I want to use the Adafruit UART friend, no interrupt and the CS tied to GND. This will use up only 2 IO lines.

    Will this work?

    Thanks
    Eli

    Like

  7. Hi Erich,
    Great website ! I found the site not too long ago ! You seem like a person who loves these works and want to teach others as well!
    I have been struggling to learn embedded electronics but what I have discovered missing is a complete guideline from beginner to expert. If you could write an article on where to start and how to grow from there would benefit many beginners like me I believe.

    Thanks
    Mark

    Like

  8. Hi Erich,
    So I was trying to do the DIY USB joystick but I keep getting this error: “Description Resource Path Location Type
    Generator: FAILURE: at line 10: Property not found: “TxBuffer” (file: Drivers\Common\FSL_USB_HID_Joystick_DeviceSettings.Inc) FRDM-KL25Z_USB_HID_Joystick HIDJ1 Processor Expert Problem”
    Can you help me please?

    Like

  9. Hi again
    I have an android tablet talking to a K64F using the Adafruit LE uart. However it will not send more that 20 bytes at a time.Is there a way to increase this limit.
    Thanks

    Like

    • You have to implement message fragmentation (sending larger chunk of data with multiple messages). The BLE protocol is optimized for low power and small amount of data, you cannot send more than this 20 bytes in a a single message.

      Like

  10. Hi Eric,
    Great work. Really appreciate your insights. Had a question. Is it possible to shutdown a cortex m4? I understand the CPU can be configured to go in Stop Mode or Sleep Mode, but is it possible to to initiate a shutdown from software? I don’t think it is possible as I cannot find any register set that lets me perform such an action, but wanted to run it by you as well
    Thanks again

    Like

  11. Hello Erich,
    First of all I would like to thank you for the awesome work and for the effort you have put into these tutorials. I have the following question. I ordered the product FRDM-K64F-AGM01, which consists of a shield and a development board. From the pictures at NXP site, I infered that the sensor shield board would be removable and that I could use the FRDM-K64F standalone. The problem is I can’t remove the shield (if I apply more pressure, I am scared that I will break the board). Do you know if it is supposed to not be removed?

    Thanks in advance,
    Panagiotis

    Like

    • It should be removable. I don’t have that kit, but from the pictures it really should be removable. You should be able to tell this with having a close look at the headers: ther must be a black (high) black row of female headers on the FRDM-K64F board, with a row of male pin headers on the AGM01 board. Try to lift the board carefully on one end, then on the ohter, and so on.
      I hope this helps,
      Erich

      Like

  12. Hello Erich ,
    I have to configure a common SPI bus to be used for two different SP clock frequency 2MHz and 8MHz on K10 series controller. I am using SPIMaster_LDD component in processor expert V10.4.0T.The method SetClockConfiguration() is appear as disabled . How can I enabled it and select the generate code option. Please explain .

    Thanks and Regards,
    Rohit K.

    Like

      • Hi Erich,

        In the clock rate configuration of the component i have used ‘list of values’.
        In value type , I am using mode 0 and mode 1.

        I am setting following the values : mode 0 = 0.125µsec and mode 1= 0.5µsec.

        When I reopen the clock rate configuration window , I observed that mode 1 value that I was set is not there. Mode 1 shows the same value as mode 0.
        Can you please let me know why this is happening?

        Thanks and Regards,
        Rohit K.

        Like

        • Hi Rohit,
          not sure what is causing this. I assume you have pressed the OK button? The other thing is: have you picked the values from the ‘Possible settings’ list (e.g. double-clicking on the value)? If the value you have entered is not part of that list, it will not be applied.
          I hope this helps,
          Erich

          Like

  13. Hello, Erich,
    im thinking about trying to do a firmware update over the air with delta file optimization. Do you something about that? An elipse configuration which does not change all the file over the smallest change in code, maybe?
    Regards,
    Morais D.

    Like

  14. Hi Erich,

    Happy New Year 2019.
    I was looking for some examples for ARM Cortex-M33 with TrustZone and FPU. I couldn’t find any articles on Cortex-M33 here. It is a relatively new ARM core and firmware development on Cortex-M33 is still in nascent stages. Can you please consider writing about it in your next blog?

    Thanks
    Radhika.

    Like

    • Hi Radhika,
      thanks, Happy New Year to you too!
      Yes, Cortex-M33 is on my radar, but because I have not ordered or used any of these in my projects, I have not written any articles about it. I’ll have to see if one of the university research projects starting next semester could benefit from a M33, and then certainly I will come up with an article about it.

      Like

  15. Hi Erich,

    Any idea why the MK20DX128xx5 is not supported in the MCUXpresso IDE? they only seem to have an SDK file for the parts ending in 10 (e.g. MK20DX128xx10).

    Thanks

    Like

    • No real idea. But I think it is maybe because this was one of the very first Kinetis devices, so it seems NXP has left it behind from the SDK point of view. The FRDM-K20 board for it is not available any more too.
      But we are using the MK20DX128x5 in many of our designs, and that’s why we continue to use Processor Expert because it is supported with it.

      Like

  16. Hello Erich,
    i have a problem with a new FRDM-KV31F board; one time attached to PC with Windows 10 (home), i think have bricked the board-bootloader. Now, the board is unresponsive.
    Also i have read your severals tutorials about resolve it, (in effect i have resolved this identical problem with an FRDM-K66F board), but with the kv31f my probe is not able to program the flash of k20dx128 interface chip, i receive an error message (i dont understand why, the chip is identical to interface-chip of frdm-k66f… or not?!)
    my conditions: pc Windows 10, IDE MCUXpresso 10.3.1, probe usb Multilink of PEMicro.

    Like

    • I don’t know the FRDM-KV31F, but if it is similar to the FRDM-KL25Z, then you cannnot reprogram the chip with a debugger as the flash is protected with mass erase disabled.
      But that would be good, as then Windows will not be able to brick the board. Can you try accessing it from a Windows 7 (native, not VM) machine?
      Then you should be able to update the P&E bootloader and load the application again.

      Like

  17. Hi…your openSDA/K20 is programmed, right? It does not matter if your KL43Z is empty or not: the K20 will programm it, no matter what.

    Like

  18. Hi Erich,

    Any idea where i can find the recommended footprint for the MK22FN256VLH12 (yet another thing NXP/Freescale make difficult)?

    Thanks

    Like

  19. Hi Erich,

    Just started using the MCUXpresso IDE with the MK22FN512xxx12, and noticed with an empty project (with just a while loop) 12.5% of the RAM is being used any ideas?

    Memory region Used Size Region Size %age Used
    PROGRAM_FLASH: 2424 B 512 KB 0.46%
    SRAM_UPPER: 8196 B 64 KB 12.51%
    SRAM_LOWER: 0 GB 64 KB 0.00%

    text data bss dec hex filename
    2420 4 8192 10616 2978 MK22FN512xxx12_Project.axf

    Like

  20. Hi Erich,

    Does the KDS USB CDC Lib support the following:

    Clear To Send – CTS
    Data Set Ready – DSR
    Data Carrier Detected – DCD

    I need to enable / disable the above serial port inputs

    Thanks

    Like

      • Hi Erich,

        Sorry should have been more clear.

        I am using the MK20DX128xxx5 device and the USB CDC library, such that the MK20 is enumerated as a virtual com port.

        i need the MK20 to enable / disable CTS, DSR and DCD, such that the host (connected PC) sees the virtual lines go on / off

        Clear To Send – CTS
        Data Set Ready – DSR
        Data Carrier Detected – DCD

        Like

      • Hi Erich,

        Thanks for your reply, i cannot find a method in your CDC wrapper that will do this. Should i be looking at the following function in the usb_cdc_pstn.h?

        extern uint_8 USB_Class_CDC_PSTN_Set_Ctrl_Line_State (
        uint_8 controller_ID,
        USB_SETUP_STRUCT * setup_packet,
        uint_8_ptr *data,
        USB_PACKET_SIZE *size);

        i have the USB CDC working just tring to figure out how i change the state of the virtual lines:

        void CDC_Run(void) {

        for(;;) {

        if(CDC1_App_Task(cdc_buffer, sizeof(cdc_buffer)) == ERR_BUSOFF) {
        /* device not enumerated */
        WAIT1_Waitms(10);
        } else {

        SEGGER_RTT_WriteString(0, “Change line state:\r\n”);
        int key = SEGGER_RTT_WaitKey();

        switch(key) {
        case ‘1’:
        SEGGER_RTT_WriteString(0, “CTS Enabled\r\n”);
        // TODO – Enable USB CDC CTC virtual line
        break;
        case ‘2’:
        SEGGER_RTT_WriteString(0, “CTS Disabled\r\n”);
        // TODO – Disable USB CDC CTC virtual line
        break;
        case ‘3’:
        SEGGER_RTT_WriteString(0, “DSR Enabled\r\n”);
        // TODO – Enable USB CDC DSR virtual line
        break;
        case ‘4’:
        SEGGER_RTT_WriteString(0, “DSR Disabled\r\n”);
        // TODO – Disable USB CDC DSR virtual line
        break;
        case ‘5’:
        SEGGER_RTT_WriteString(0, “DCD Enabled\r\n”);
        // TODO – Enable USB CDC DCD virtual line
        break;
        case ‘6’:
        SEGGER_RTT_WriteString(0, “DCD Disabled\r\n”);
        // TODO – Disable USB CDC DCD virtual line
        break;
        default:
        SEGGER_RTT_WriteString(0, “Unknown command\r\n”);
        break;
        }

        }
        }
        }

        Like

      • Hi Erich,

        Yes i have the latest lib and have added the CDC1_OnLineStateChanged event, and i am using the latest FSL_SUB_Stack.

        But I am not trying to monitor the Host lines, which would be DTR and RTS.

        I am trying to Set the device lines which would be CTS, CD, DSR and RI.

        So i was looking for somthing like CDC_Set_LineState(CTS);

        Thanks,
        Andy

        Like

        • Hi Andy,
          I only had a need for getting the status from the host, so this is what I have added to the stack :-).
          I have not implemented reporting the status to the host, but if you have a solution to contribute, I can integrate it into the Processor Expert component?

          Like

    • Hi Erich,

      After looking into it, i think getting the control lines working may require a driver change. So i am going to put down an FTDi device which supports the control lines i need and cahgne the MK20 to an MK10 as the USB will no longer be needed.

      Thanks,
      Andy

      Like

  21. Hi Erich,

    I have a building problem again with my project. The error follows.

    Linker CRP Enabled, but no CRP_WORD provided within application.

    I don’t know what it means. Furthermore, I have linked the project with right paths and there is no other library I should put on the “MCU Linker”.

    Thanks for your attention.

    Best regards,
    Mike

    Like

  22. Hi Erich,

    Quick USB CDC question:

    If CDC1_SendString((unsigned char*)”Some Text”); is called but the com port is closed the stack gets stuck.

    Is there a function to call that checks if the CDC port is open and read to send?

    Like

  23. Hi Erich
    I am using MCUXpresso IDE v11.0.0 [Build 2516] [2019-06-05]
    I incorporated SDK_2.6.0_FRDM-K64F
    Using Import SDK examples, all the examples are bm, why
    When I start a new project, the only option for the Operating System is “baremetal”
    How can I add FreeRTOS?

    Like

  24. Hi again
    I am using MCUXpresso IDE v11.0.0 [Build 2516] [2019-06-05] and communicating with Tera Term.
    I imported the example frdmk64f_freertos_uart.
    The introduction message has garbled characters towards the end.
    Only when I lowered the baud rate to 9600, the message is displayed correctly.
    Is that a problem with the UART_RTOS_Send routine?

    Like

    • You have to check at which baud the UART is configured. If you have configured the UART with the correct baud, you probably have not configured the system clock correclty, as the baud depends on it.

      Like

  25. Hi Erich,

    I’m using MCUXpresso 11.01 for the MIMXRT1062DVJ6A, MCUXpresso SDK USB Stack, Rev. 10, 06/2019, and the MCUXpressio usb_example program host_cdc_bm, which I modified to use FreeRTOS. The data traffic to and from my CDC device is managed in the context of the USB_HostCdcTask handler for the kUSB_HostCdcRunIdle state. Data transmission to my USB device works just fine when I call USB_HostCdcDataSend. But when I call USB_HostCdcDataRecv, my USB device can’t respond because the host cannot receive data (IN-NAK, according to the Beagle USB Analyzer and DataCenter). What might I have missed?

    Like

    • I have not used USB CDC on that i.MX RT, so cannot say much. I would have to try it myself first. But is there an example whithout FreeRTOS in the SDK which works? Just if this would the issue?

      Like

      • Thanks for the response. I actually did try this with the bare metal example and got the same result. However, I just now resolved the problem. I though that I didn’t need to use hardware flow control, but I was. Setting USB_HOST_UART_SUPPORT_HW_FLOW to 1 resolved the issue.

        Like

  26. Hi Erich,
    sorry, not sure if this belongs here but I am having a problem with my newly purchased J-Link EDU. I can somewhat debug my K64F with it through MCUXpresso however I am unable to use any utilities provided by SEGGER such as JLinkRTTViewer or even JLinkGDBServer. When I try to run any of these from command line (using Ubuntu based Linux distro) I get the following error message:

    LOG: J-Link RTT Viewer V6.54: Logging started.
    LOG: Connecting to J-Link via USB…
    LOG: Device “MK64FN1M0XXX12” selected.
    LOG: InitTarget()
    LOG: Protection bytes in flash at addr. 0x400 – 0x40F indicate that readout protection is set.
    For debugger connection the device needs to be unsecured.
    Note: Unsecuring will trigger a mass erase of the internal flash.

    LOG: Device will be unsecured now.
    LOG: Timeout while unsecuring device. Erase never stops.
    LOG: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFFF1
    LOG: InitTarget()
    LOG: Protection bytes in flash at addr. 0x400 – 0x40F indicate that readout protection is set.
    For debugger connection the device needs to be unsecured.
    Note: Unsecuring will trigger a mass erase of the internal flash.

    LOG: Device will be unsecured now.
    LOG: Timeout while unsecuring device. Erase never stops.
    LOG: TotalIRLen = ?, IRPrint = 0x..FFFFFFFFFFFFFFFFFFFFFFF1
    ERROR: Could not connect to target device.

    I have tried other K64s as well with same result.
    I am quite new to embedded so would be grateful if you could shed some light on what is happening and how to solve this.

    Thank you.

    Zdenek

    Like

    • This seems to be a connection problem with your device. The message
      LOG: Protection bytes in flash at addr. 0x400 – 0x40F indicate that readout protection is set.
      indicates that it is reading back all 0xff (which happens for bad/wrong connection) or if the device is secured.
      The entry
      LOG: Device “MK64FN1M0XXX12” selected.
      shows that your device is the correct one.

      The entry
      LOG: J-Link RTT Viewer V6.54: Logging started.
      shows that you are using a recent version of the J-Link software. As youi say it works with the IDE: can you check and verify what the IDE is using? You will see a similar connection log on the Console view of Eclipse.

      Like

  27. Hi Erich,
    thanks for the quick response.
    This is what I get in MCUXpresso 11

    Executed SetRestartOnClose=1
    [MCUXpresso Semihosting Telnet console for ‘Dev1_FreeRTOS JLink Debug’ started on port 36314 @ 127.0.0.1]

    SEGGER J-Link GDB Server V6.54 – Terminal output channel

    and in another console view

    [01-11-2019 09:19:48] Executing Server: /usr/bin/JLinkGDBServerCLExe -nosilent -swoport 2334 -select USB=261000035 -telnetport 2335 -singlerun -endian little -noir -speed auto -port 2336 -vd -device MK64FN1M0xxx12 -if SWD -halt -reportuseraction
    SEGGER J-Link GDB Server V6.54 Command Line Version

    JLinkARM.dll V6.54 (DLL compiled Oct 28 2019 10:37:24)

    Command line: -nosilent -swoport 2334 -select USB=261000035 -telnetport 2335 -singlerun -endian little -noir -speed auto -port 2336 -vd -device MK64FN1M0xxx12 -if SWD -halt -reportuseraction
    —–GDB Server start settings—–
    GDBInit file: none
    GDB Server Listening port: 2336
    SWO raw output listening port: 2334
    Terminal I/O port: 2335
    Accept remote connection: yes
    Generate logfile: off
    Verify download: on
    Init regs on start: off
    Silent mode: off
    Single run mode: on
    Target connection timeout: 0 ms
    ——J-Link related settings——
    J-Link Host interface: USB
    J-Link script: none
    J-Link settings file: none
    ——Target related settings——
    Target device: MK64FN1M0xxx12
    Target interface: SWD
    Target interface speed: auto
    Target endian: little

    Connecting to J-Link…
    J-Link is connected.
    Device “MK64FN1M0XXX12” selected.
    Firmware: J-Link V11 compiled Aug 14 2019 16:21:09
    Hardware: V11.00
    S/N: 261000035
    OEM: SEGGER-EDU
    Feature(s): FlashBP, GDB
    Checking target voltage…
    Target voltage: 3.32 V
    Listening on TCP/IP port 2336
    Connecting to target…InitTarget()
    Found SW-DP with ID 0x2BA01477
    Scanning AP map to find all available APs
    AP[2]: Stopped AP scan as end of AP map has been reached
    AP[0]: AHB-AP (IDR: 0x24770011)
    AP[1]: JTAG-AP (IDR: 0x001C0000)
    Iterating through AP map to find AHB-AP to use
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    ROMTbl[0][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
    ROMTbl[0][7]: E0043000, CID: B105900D, PID: 001BB908 CSTF
    InitTarget()
    Found SW-DP with ID 0x2BA01477
    AP map detection skipped. Manually configured AP map found.
    AP[0]: AHB-AP (IDR: Not set)
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    ROMTbl[0][6]: E0042000, CID: B105900D, PID: 003BB907 ETB
    ROMTbl[0][7]: E0043000, CID: B105900D, PID: 001BB908 CSTF
    Connected to target
    Waiting for GDB connection…Connected to 127.0.0.1
    Reading all registers
    Read 4 bytes @ address 0x00003EF8 (Data = 0xF852F000)
    Reading 64 bytes @ address 0x20000500
    Read 4 bytes @ address 0x00002CDC (Data = 0xB085B480)
    Reading 64 bytes @ address 0x200004C0
    Connected to 127.0.0.1
    Reading all registers
    Read 4 bytes @ address 0x00003EF8 (Data = 0xF852F000)
    Reading 64 bytes @ address 0x20000500
    Read 4 bytes @ address 0x00002CDC (Data = 0xB085B480)
    Reading 64 bytes @ address 0x200004C0
    Received monitor command: reset
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    AfterResetTarget()
    Resetting target
    Downloading 16080 bytes @ address 0x00000000 – Verified OK
    Downloading 16080 bytes @ address 0x00003ED0 – Verified OK
    Downloading 4880 bytes @ address 0x00007DA0 – Verified OK
    Downloading 24 bytes @ address 0x000090B0 – Verified OK
    J-Link: Flash download: Bank 0 @ 0x00000000: Skipped. Contents already match
    Writing register (PC = 0x 1d4)
    Read 4 bytes @ address 0x000001D4 (Data = 0xB672B510)
    Reading 64 bytes @ address 0x00000880
    Read 2 bytes @ address 0x000008AE (Data = 0xF005)
    Read 2 bytes @ address 0x000008AE (Data = 0xF005)
    Reading all registers
    Read 4 bytes @ address 0x000001D4 (Data = 0xB672B510)
    Read 2 bytes @ address 0x000008AE (Data = 0xF005)
    Received monitor command: semihosting enable
    Semi-hosting enabled (Handle on BKPT)
    Received monitor command: exec SetRestartOnClose=1
    Executed SetRestartOnClose=1
    Received monitor command: reset
    Reset: Halt core after reset via DEMCR.VC_CORERESET.
    Reset: Reset device via AIRCR.SYSRESETREQ.
    AfterResetTarget()
    Resetting target
    Setting breakpoint @ address 0x000008AE, Size = 2, BPHandle = 0x0001
    Starting target CPU…
    …Breakpoint reached @ address 0x000008AE
    Reading all registers
    Removing breakpoint @ address 0x000008AE, Size = 2
    Read 4 bytes @ address 0x000008AE (Data = 0xFE33F005)
    Starting target CPU…

    Both are indicating the usage of JLink GDB server 6.54

    Like

  28. Hi Erich.
    Just tried to copy/paste the command mcuxpresso used to start the gdb server into cmdline and things started to work. I assume some of my configuration has been incorrect. Noticed that I was using JTAG instead of SWD (should I be using SWD?).
    Another (maybe dumb) question: Is it possible to show PRINTF output over the K64USB or somehow via the J-Link? The project has been setup to redirect printfs to UART. Not sure if I can go back to semihosting and use console instead.

    Thanks for your time.

    Like

    • Hi Zdenek,
      yes, you *have* to use SWD, as the OpenSDA (K20) on the FRDM board only supports SWD and no JTAG.
      You can redirect the printf() to whatever you like, you just have to provide the needed glue logic.

      Like

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.