Skip to main content
Dave Nadler
Senior III
March 14, 2019
Solved

FreeRTOS debugging: Where am I?

  • March 14, 2019
  • 1 reply
  • 1062 views

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

This topic has been closed for replies.
Best answer by Dave Nadler

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 ;)

1 reply

Dave Nadler
Dave NadlerAuthorAnswer
Senior III
March 14, 2019

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 ;)