Show FreeRTOS Threads in Eclipse Debug View with SEGGER J-Link and NXP S32 Design Studio

By default, the FreeRTOS threads do not show up with the SEGGER J-Link debug connection in the Eclipse based NXP S32 Design Studio IDE. But don’t worry: Here is how to get it working with SEGGER J-Link debug connection:

FreeRTOS Threads in Eclipse Debug View

FreeRTOS Threads in Eclipse Debug View

This article shows how to enable FreeRTOS thread aware debugging in the NXP S32 Design Studio (S32DS) for ARM. I’m using the version 2018.R1 build 180504:

S32DS 2018.R1 Build 180504

S32DS 2018.R1 Build 180504

By default, threads are not shown in the Debug view:

Debug view with no FreeRTOS Threads

Debug view with no FreeRTOS Threads

The first thing is to add the following to the SEGGER debug configuration inside S32DS, under ‘Other options’:

-rtos GDBServer/RTOSPlugin_FreeRTOS
Segger other option

Segger other option

This command line will load the tread awareness plugin/DLL for the SEGGER GDB server. Because that plugin is not installed with S32DS, I have to add it to the IDE. The easiest way to get that plugin is to install the J-Link software from segger.com and copy that GDBServer folder where it has been installed it:

GDBServer Plugins

GDBServer Plugins

Then copy that folder where S32DS has installed the SEGGER JLinkGDBServerCL.exe:

SEGGER GDBServer Plugins in S32DS

SEGGER GDBServer Plugins in S32DS

With this, when I debug a FreeRTOS application, I have all the FreeRTOS tasks shown in the Eclipse debug view, which makes debugging much, much easier 🙂 :

FreeRTOS Threads in Eclipse Debug View

FreeRTOS Threads in Eclipse Debug View

Happy threading 🙂

Links

Advertisements

6 thoughts on “Show FreeRTOS Threads in Eclipse Debug View with SEGGER J-Link and NXP S32 Design Studio

  1. Hi Erich,
    Does this work for KDS (3.2) also?
    Once upon a time I could see the threads in KDS , but they went away and I can’t find them…

    Brynn

    Like

  2. I had the RTOS folder and the Segger Jlink directory already, and in the past the threads showed up in the debugger. Then they quit showing at some point (I may have installed MCUXpresso, or a KDS update, or S32, or something related).
    I re-added the ‘-rtos …’ option, but that didn’t fix it. I noticed that your version of the Jlink directory was newer than mine, so I installed the latest from Segger (which looks slighty newer than even yours). Then it started working again 🙂 .

    Brynn

    Like

  3. Pingback: Tutorial: Using Runtime Statistics with Amazon FreeRTOS V10 | MCU on Eclipse

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.