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:
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
FreeRTOS View
This adds a FreeRTOS item to the views:
This shows a view with all the threads, and I can click on a line item to switch to that thread:
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
- Ozone: https://www.segger.com/ozone.html
- FreeRTOS: http://freertos.org/
- FreeRTOS V9.0.0 port: FreeRTOS V9.0.0 with Static Memory Allocation
- Project on GitHub: https://github.com/ErichStyger/mcuoneclipse/tree/master/Examples/KDS/FRDM-K64F120M/FRDM-K64F_Demo
Pingback: Better FreeRTOS Debugging in Eclipse | MCU on Eclipse