I am testing FreeRTOS on an LPCXpresso board:
I have followed the prompts for "MCUXpresso IDE FreeRTOS Debug Guide" (Rev. 11.2.0 - 7 October, 2020) from NXP:
However, the FreeRTOS TAD task list appears empty and only the current task is displayed in the debug view.
I have been able to fix the task list thanks to https://mcuoneclipse.com/2017/03/18/better-freertos-debugging-in-eclipse/ By disabling the legacy API names in FreeRTOSConfig.h (#define configENABLE_BACKWARD_COMPATIBILITY 0) the task list fills up as if by magic. (I don't know if it is a very specific case, but it would be nice if it was indicated in the FreeRTOS Debug Guide; It would have saved me many hours of frustration).
But despite the fact that the project compiles, runs and works fine, despite the fact that the three tasks (plus the idle) that compose it are displayed in the FreeRTOS TAD task list (with their execution times), in the debug view only shows the current task, the one that was running when stopped.
I copy below the content of the debugging console, because I think the key may be there:
MCUXpresso IDE RedlinkMulti Driver v11.2 (Sep 22 2020 13:23:35 - crt_emu_cm_redlink build 19) Found part description in XML file nxp_lpc17xx.xme Reconnected to existing LinkServer process. Probe Firmware: LPC-Link Probe v1.3 (NXP - LPC-Link) Serial Number: WIN64HS12 VID: PID: 1FC9: 0009 USB Path: Using memory from core 0 after searching for a good core debug interface type = Cortex-M3 / 4 (DAP DP ID 2BA01477) over SWD TAP 0 processor type = Cortex-M3 (CPU ID 00000C23) on DAP AP 0 number of h / w breakpoints = 6 number of flash patches = 2 number of h / w watchpoints = 4 Probe (0): Connected & Reset. DpID: 2BA01477. CpuID: 00000C23. Info: <None> Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled. Content of CoreSight Debug ROM (s): RBASE E00FF000: CID B105100D PID 0000000000 ROM (type 0x1) ROM 1 E000E000: CID B105E00D PID 04002BB000 Gen SCS (type 0x0) ROM 1 E0001000: CID B105E00D PID 04002BB002 Gen DWT (type 0x0) ROM 1 E0002000: CID B105E00D PID 04002BB003 Gen FPB (type 0x0) ROM 1 E0000000: CID B105E00D PID 04002BB001 Gen ITM (type 0x0) ROM 1 E0040000: CID B105900D PID 04002BB923 CSt TPIU-Lite type 0x11 Trace Sink - TPIU ROM 1 E0041000: CID B105900D PID 04002BB924 CSt ETM-M3 type 0x13 Trace Source - Core NXP: LPC1769 DAP stride is 4096 bytes (1024 words) Inspected v.2 On-chip Flash Memory LPC175x_6x_512.cfx Image 'LPC175x_6x (512K) Sep 25 2020 10:47:33' Connected: was_reset = true. was_stopped = false Awaiting telnet connection to port 3336 ... GDB nonstop mode disabled (using allstop mode) Opening flash driver LPC175x_6x_512.cfx Sending VECTRESET to run flash driver Flash device supported (512KB = 16 * 4K 14 * 32K at 0x0) Writing 7340 bytes to address 0x00000000 in Flash Sectors written: 0, unchanged: 2, total: 2 Erased / Wrote sector 0-1 with 7340 bytes in 38msec Closing flash driver LPC175x_6x_512.cfx Flash Write Done Flash Program Summary: 7340 bytes in 0.04 seconds (188.63 KB / sec) Starting execution using core reset and halt target Stopped (Was Reset) [Reset from Unknown] Stopped: Breakpoint # 1 Stopped: Halt
As you can see I am debugging in All-Stop mode. However, I don't get the message "FreeRTOS stack backtrace is enabled". Following the instructions of the FreeRTOS Debug Guide I have added a folder called "linkscripts" to the root directory of the project and I have created a file "user.ldt" with the content:
<#assign force_freertos = true>
It seems that something has improved, as it now mentions FreeRTOS, but it is not the expected result:
GDB nonstop mode disabled (using allstop mode) FreeRTOS stack backtrace is disabled
Why? Can somebody help me? I insist that the project compiles, runs and works correctly. Tasks are displayed in FreeRTOS TAD task list, execution times are consistent. I can successfully debug the project ... The only problem is that the debug view only shows the current task.
Thanks a lot.