FreeRTOS V10.4.1 with SEGGER SystemView V3.12

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:

Segger SystemView 3.12 with FreeRTOS 10.4.2

Segger SystemView 3.12 with FreeRTOS 10.4.2

FreeRTOS

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’:

MCUXpresso IDE 10.2.0 running FreeRTOS 10.4.1

MCUXpresso IDE 11.2.0 running FreeRTOS 10.4.1

To add some ‘icing on top of the cake’: updated Processor Expert components are included:

FreeRTOS Processor Expert Components

FreeRTOS Processor Expert Components

SystemView

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.

Segger SystemView 3.12 with FreeRTOS 10.4.2

Segger SystemView 3.12 with FreeRTOS 10.4.2

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).

Summary

Both the SystemView component and FreeRTOS are available as Processor Expert components which can be used with the MCUXpresso IDE:

FreeRTOS and SystemView as Processor Expert Components

FreeRTOS and SystemView as Processor Expert Components

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).

MCUXpresso SDK Intergration

MCUXpresso SDK Integration with CMSIS

Summary

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 πŸ™‚

Links

4 thoughts on “FreeRTOS V10.4.1 with SEGGER SystemView V3.12

      • I just open and compare with the”official” version and port.c for M4 is very very different !

        I will try to adapt it to my needs as I don’t use MCUXpresso

        Like

        • It is different because
          a) it contains all the extra support for tracing (Percepio/Segger)
          b) not only supports Cortex-M4, but M0, M0+, M4 and M4
          c) it support gcc, IAR and Keil
          I do support as well HCS12, HCS08, DSC, …: the original FreeRTOS way to support each port in single files is one way, but leaves a lot of duplication.
          Because we use FreeRTOS with many different architectures, it is easier to have the common things together.
          If you are interested in M4 only: this is guarded in the code with macros, so you easily can single that out.

          Like

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.