Enable Default FreeRTOS Debugging for LinkServer Debug Connections

Most of my projects are using FreeRTOS, and I’m using different Debug Probes (SEGGER, P&E and LinkServer) to debug NXP devices.

The NXP LinkServer debug connection is able to show the RTOS threads in Eclipse/MCUXpresso IDE which is incredibly helpful:

FreeRTOS Thread Aware Debugging with LinkServer Connection

FreeRTOS Thread Aware Debugging with LinkServer Connection

However, by default this is turned off. In this article I show how to turn this on by default.

By default, the LinkServer (e.g. LPC-Link2) debug connection uses the GDB ‘non-stop‘ mode (see GDB All-Stop and Non-Stop Mode with LinkServer). This mode is fine for updating/viewing variables (‘Live variabes‘) while running. But in that mode the FreeRTOS task threads are not shown.

Every time I create a new launch configuration for the LinkServer, it uses the non-stop mode by default:

Default Non-Stop Mode

Default Non-Stop Mode

In the above dialog I can change my mind, but if I missed it: I have to delete the launch configuration and create a new one. Not ideal.

I have found a better way: changing the default, and there is a setting for this in the Eclipse workspace settings:

The setting is under the workspace Preferences > MCUXpresso IDE > Debug Options > LinkServer Options > Miscellaneous > Enable Non-Stop Mode:

Disabled Non-Stop Mode

Disabled Non-Stop Mode

Disable that check box now creates launch configs with ‘all-stop’ mode instead:

All-Stop for LinkServer Debug Connection

All-Stop for LinkServer Debug Connection

With this, FreeRTOS threads are shown in the debug session:

FreeRTOS Thread Aware Debugging with LinkServer Connection

FreeRTOS Thread Aware Debugging with LinkServer Connection

Happy Threading 🙂

Links

 

What do you think?

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