cancel
Showing results for 
Search instead for 
Did you mean: 

FreeRTOS debugging: Where am I?

I'm trying to debug a 429 FreeRTOS app using LwIP, which periodically has a huge (1.5 second) delay whilst trying to pump out messages. Using Atollic 9.1.0, Segger debug code on Nucleo-429ZI board. I can stop the application when it pauses, but the FreeRTOS plug-in is not being helpful.

In particular, I cannot see the current context for each FreeRTOS task in the debugger as expected (I cannot see the source line where each task is blocked).

What's the secret sauce to get this to work properly?

I have the following enabled (as I've found necessary for debugging FreeRTOS apps using other toolchains):

#define configTASKRETURNADDRESS 0 // place 0 task return address on stack to help FreeRTOS-aware debugger (GDB unwind thread stack)
#define INCLUDE_xTaskGetSchedulerState      1
#define INCLUDE_pcTaskGetTaskName           1
#define INCLUDE_uxTaskGetStackHighWaterMark 1
#define configGENERATE_RUN_TIME_STATS            1
#define configUSE_TRACE_FACILITY                 1

What am I missing?

Thanks!

Best Regards, Dave

1 ACCEPTED SOLUTION

Accepted Solutions

Found it: In the Debug Configuration, Debugger tab, Thread-Aware RTOS support "Select RTOS variant:" needs to be set to FreeRTOS. For some reason it wasn't set. Now I can debug each thread 😉

View solution in original post

1 REPLY 1

Found it: In the Debug Configuration, Debugger tab, Thread-Aware RTOS support "Select RTOS variant:" needs to be set to FreeRTOS. For some reason it wasn't set. Now I can debug each thread 😉