FreeRTOS Kernel Awareness with Ozone

In my first post about Segger Ozone (see “First Steps with Ozone and the Segger J-Link Trace Pro“) I missed the fact that it includes support for kernels like FreeRTOS. So here is how to show the FreeRTOS (or any other RTOS) threads with Ozone:

freertos-threads-in-ozone

freertos-threads-in-ozone

Outline

I’m using Ozone on a Windows 10 Pro 64bit host, with a Segger J-Link debug probe and the Segger Ozone version V2.20h and FreeRTOS V9.0.0. The project used here is available on GitHub for the NXP/Freescale FRDM-K64F board. This article shows the needed steps to see FreeRTOS threads in the Segger Ozone debugger.

Load RTOS Plugin

To enable RTOS awareness, I have to add loading of the corresponding library in the Ozone project file (.jdebug). The documentation lists the different libraries for each host OS:

  Project.SetOSPlugin("FreeRTOSPlugin.dll"); // Windows
  // Project.SetOSPlugin("FreeRTOSPlugin.so"); // Linux 
  //Project.SetOSPlugin("FreeRTOSPlugin.dylib"); // Mac

The approach of loading the plugin is similar to what Segger provides for GDB (see “FreeRTOS Thread Debugging with Segger GDB in Eclipse“). I have found out that the same approach (without the library extension) works fine too:

  Project.SetOSPlugin("FreeRTOSPlugin"); // load RTOS awareness plugin
jdebug-project-file-with-rtos-plugin-loading

jdebug-project-file-with-rtos-plugin-loading

FreeRTOS View

This adds a FreeRTOS item to the views:

freertos-menu-in-ozone

freertos-menu-in-ozone

This shows a view with all the threads, and I can click on a line item to switch to that thread:

freertos-threads

freertos-threads

The columns are sortable. That ‘Timeout’ column is not clear to me what it means, but I think I will find out 🙂

Summary

Adding FreeRTOS thread awareness to Segger Ozone is simple: it all needs a line item to load the library in the project file. I missed that in the first place (yes, I should read the provided documentation more carefully. But hey, who does that anyway? ;-).)

Happy Ozoning 🙂

Links

1 thought on “FreeRTOS Kernel Awareness with Ozone

  1. Pingback: Better FreeRTOS Debugging in Eclipse | MCU on Eclipse

What do you think?

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