Amazon has released in the past week the FreeRTOS version V10.4.0. Time to upgrade, actually the most recent version 10.4.1! The same time the SEGGER SystemView V3.12 was released back in April this year. No surprise: with the FreeRTOS changes they don’t work out of the box: but no worries, I have you covered and applied all the needed patches and changes to have them working again together: the latest FreeRTOS v10.4.x with Segger SystemView v3.12:
In case you have not noticed: FreeRTOS is now hosted on GitHub which makes it easy to follow of it. The release V10.4.0 was announced 9-Sept-2020, but with GitHub it was easy to jump on the most recent V10.4.1 version.
The big change with V10.4.x is that the Direct Task Notification has been extended to support an array of notification values. Direct Task Notification has been a great feature to me, as it is efficient, fast and I’m using it in nearly all of my applications. But it has been limited to 32bits (on a 32bit processor like ARM Cortex) and if you hit that limit, other ways of notifications had to be used for the extra needs. Now the number of (32bit) entries can be specified.
I have successfully ported the RTOS and applied all the patches. For example it runs now with the MCUXpresso SDK in the MCUXpresso (Eclipse based) IDE with all the ‘bells & whistles’:
To add some ‘icing on top of the cake’: updated Processor Expert components are included:
The Segger SystemView has been upgraded to Version 3.12. SystemView uses SEGGER RTT and is a great tool to get insights into the application RTOS and runtime behavior.
The FreeRTOS Kernel requires several patches and tweaks to work correctly with SystemView. To stream the trace data directly to the host the SEGGER RTT needs to be present and configured. Because of the FreeRTOS API changes the patches from SEGGER had to be extended and have been applied to the Kernel sources. In addition to that, all the latest patches to make the GNU Link Time optimization to work with the Kernel (e.g. to prevent wrong removal of objects by the linker).
Both the SystemView component and FreeRTOS are available as Processor Expert components which can be used with the MCUXpresso IDE:
All the ported files (FreeRTOS, RTT, SystemView) are available on GitHub (see links at the end of this article) and work nicely with the latest IDE and SDK, gcc (including the most aggressive optimizations, including LTO).
I have now the latest and greatest FreeRTOS and SystemView working together, with all the patches applied. The extended direct task notification in FreeRTOS is a great extension and I plan to use it in one of my next application. With the MCUXpresso IDE and SDK I have everything integrated and can use the SystemView to inspect the performance of my FreeRTOS applications with the latest version.
You can get the source files from the links below.
Happy FreeRTOSing 🙂
- FreeRTOS and SEGGER Files on GitHub: https://github.com/ErichStyger/McuOnEclipseLibrary
- Processor Expert Port and components: https://github.com/ErichStyger/McuOnEclipse_PEx
- FreeRTOS Kernel on GitHub: https://github.com/FreeRTOS/FreeRTOS-Kernel
- Segger SystemView download page: https://www.segger.com/downloads/systemview/
- Tracing with FreeRTOS: New FreeRTOS V10.0.0: Amazon, Segger SystemView and Percepio Tracealyzer
- FreeRTOS examples and more: https://github.com/ErichStyger/mcuoneclipse