New FreeRTOS V10.0.0: Amazon, Segger SystemView and Percepio Tracealyzer

“Amazon FreeRTOS – IoT operating system for microcontrollers”: The announcement of FreeRTOS V10.0.0 was one of the biggest news last week for me. Not only is there now a Version 10, the bigger news is that FreeRTOS is now part of Amazon. Wow! Now this explains why Richard Barry (the founder behind FreeRTOS) was kind of hiding away for about a year: he joined Amazon as a principal engineer about a year ago. I think we all have to wait and see what it means for FreeRTOS.

Amazon FreeRTOS

Amazon FreeRTOS (Source: Amazon Web Site)

Beside of that, I proudly can announce that I have moved the McuOnEclipse project and libraries to the latest and greatest FreeRTOS V10.0.0 version with all the bells and whistles…

Segger SystemView V2.52a with FreeRTOS V10

Segger SystemView V2.52a with FreeRTOS V10

FreeRTOS, Richard Barry, Amazon and Licensing

FreeRTOS in my view is the leading RTOS, and I see it used in many projects. The RTOS is easy to learn, open source (LGPL), and especially all the extra tools like Kernel Awareness in Eclipse, Percepio Tracealyzer and Segger SystemView makes it the best choice for systems which do not run an embedded Linux. The official RTOS source base is maintained and controlled by Richard Barry. On the plus side this means that things are controlled and uniform. On the other side my biggest fear was what happens if Richard goes away or if one of the usual big players would acquire FreeRTOS. Like what happened to uCOS/Micrium? With FreeRTOS now part of Amazon the same kind of thing could happen to FreeRTOS too, which I think in the end will move away a lot of engineers from using FreeRTOS.

So having FreeRTOS under Amazon has the potential to make this a bad thing. I guess we all have to see how things go. If one of the big silicon vendors would have acquired it, that would have been definitely a bad move. Amazon? Well, better than Microsoft, but probably still worse than Google or IBM? Anyway, this confirms that I probably better invest in more open solutions like the Apache mynewt.

Anyway, the *good* news is that FreeRTOS is now under a more permissible MIT license (previously it was under a more restrictive LGPL license):

/*
 * FreeRTOS Kernel V10.0.0
 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy of
 * this software and associated documentation files (the "Software"), to deal in
 * the Software without restriction, including without limitation the rights to
 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
 * the Software, and to permit persons to whom the Software is furnished to do so,
 * subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in all
 * copies or substantial portions of the Software. If you wish to use our Amazon
 * FreeRTOS name, please do so in a fair use way that does not cause confusion.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * http://www.FreeRTOS.org
 * http://aws.amazon.com/freertos
 *
 * 1 tab == 4 spaces!
 */

Back to the technical side 😉 ….

FreeRTOS V10.0.0

There are now two different versions of FreeRTOS: the ‘traditional’ FreeRTOS V10  and the Amazon version of it. I quickly wanted to try the Amazon version. But the AWS FreeRTOS console requires a credit card number and billing address (!!!!!), and would be free for the first year only? At least there is a version on GitHub (https://github.com/aws/amazon-freertos) Anyway, that AWS experience turned me back to the ‘traditional’ FreeRTOS V10 which is still available on SourceForge (https://sourceforge.net/projects/freertos/). At least this is free and there are no strings attached, and it is easy to use :-).

I have now integrated the V10.0.0 both as Processor Expert components and is available as normal sources under the McuOnEclipse Library (https://github.com/ErichStyger/McuOnEclipseLibrary) project.

The component version has been updated to V10.0.0:

Updated FreeRTOS to Version 10.0.0

Updated FreeRTOS to Version 10.0.0

Stream and Message Buffers

The FreeRTOS V10.0.0 kernel comes with two new features:

With Stream Buffers a ‘stream of bytes’ can be sent from on task or interrupt to another task, as a continuous stream of bytes.

Message buffers are based on stream buffers, but with an arbitrary messages size for each message. Both are designed for single-reader and single-writer communication, e.g. between two tasks or between an interrupt service routine and a task. As with FreeRTOS queues, data is passed by-copy. Internally, the implementation is using direct task notification. As most of my current FreeRTOS queues are single-writer and single-reader, I have to explore the two new communication primitives, but I’m confident like the Direct Task Notification they are a great feature, it just will take some time to get used to it.

Percepio Tracealyzer

The Percepio Tracealyzer library has been upgraded to V3.3.0, plus more settings have been added to support the new FreeRTOS features:

Tracealyzer Settings

Tracealyzer Settings

I only had to make a few tweaks, and I had the Tracealyzer library working fine with FreeRTOS V10.0.0:

Percepio Tracealyzer with FreeRTOS V10.0.0

Percepio Tracealyzer with FreeRTOS V10.0.0

Segger SystemView

I have updated the Segger SystemView Library to Version V2.52a. It features a new option to use an implicit format for printf().

Segger SystemView

Segger SystemView

Segger SystemView Settings

Segger SystemView Settings

The version V2.52a on the Segger web site (see links section at the end of this article) does not support FreeRTOS V10.0.0 (yet). I have updated the Segger implementation with the needed hook changes and as well patched FreeRTOS V10.0.0 so it works correctly with FreeRTOS. All the sources are available on GitHub (see the links at the end of this article). With all the patches and extensions, the Segger SystemView works now for FreeRTOS V10.0.0.

Segger SystemView V2.52a with FreeRTOS V10

Segger SystemView V2.52a with FreeRTOS V10

Summary

My feelings about this FreeRTOS to Amazon change are mixed, because in the past such changes were not for the better and killed great technologies. On the potential positive side: If Amazon keeps the development going on and serves the community, having more than just Richard behind FreeRTOS, that would be a good thing. The change to the MIT license terms are for sure a positive move. At a very high level, the Amazon deal seems to be one of these ‘yet another RTOS for the IoT hype’? I can stay with the ‘classic’ FreeRTOS, and if time permits I might try the ‘Amazon FreeRTOS’ (or a:FreeRTOS). Until then, I probably better invest my time in Apache mynewt. Let me know your thoughts!

Happy FreeRTOSing 🙂

PS: All the sources are now available on GitHub (see links below). I plan to make a new component release in the next days for all the Processor Expert lovers  :-).

Links

Advertisements

28 thoughts on “New FreeRTOS V10.0.0: Amazon, Segger SystemView and Percepio Tracealyzer

  1. Thank you Erich for explaining not only the technical side of the latest FreeRTOS version but the intrinsic side of such announcement. In my case, the feelings are not mixed as I definitely consider it a bad news…

    For me it is sad to see how one of the most damaging companies for retail, publishing, labor rights, tax collection … also seizes Free Software as is the case of FreeRTOS. For Amazon, the AWS-IOT is another gateway to enter our lives and control them with the sole objective of earning more money and strengthening – even more – the monopoly of The Everything Store.

    I do not know the FreeRTOS founder or his personal situation. I do not want to judge anyone either. I just want to reflect beyond the technical aspect, perhaps from an ethical point of view.

    Like

  2. I remember a few years ago when the CIAA project started, we were excited about FreeRTOS but when someone asked Barry about sharing their book with the community he has a bad reply, and the CIAA project felt the necessity of stand up with OSEK and make FreeOSEK in a community way. So FreeRTOS always has an owner, before Barry, now Amazon. Is a good move for Amazon to take participating in all levels of the IoT scenario, could be bad or good, I don’t know but… is a company and is their way to make business.

    Mynewt could be a very good next step for our projects. Apache has better karma than Amazon, is knowing for make great open source technologies. But again… we are analyzing at least three points: licencing, technical and the way to make tech.

    Like

    • Yes, waiting some time is always a good approach ;-). I’m testing it with HCS08, ColdFire, ARM Cortex-M0, M3, M4 and M7 right now. Works fine so far, except I’m having some issues with the Tracealyzer showing wrong data in some cases. Investigating right now….

      Like

      • I’m looking into trying a trace tool and looking into tracealyzer with rtos 10. Were you able to get past these issues? I was thinking of getting tracalyzer for the first time and use it out of the box but it sounds like its not working properly according to what you’re tell me. for me the out of the box seegar system viewer didn’t work but it seems like you did get that to work with rtos 10.

        Like

        • Segger SystemView works out of the box for me, but I had to patch RTT and Segger SystemView for FreeRTOS v10.0. So if you are using stock FreeRTOS/Segger RTT/SystemView, I doubt it will work for you.
          Percepio Tracealizer works for me flawlessly in snapshot mode. In streaming mode I faced a problem with a large/complex robotics project. That one is still under inverstigation with Percepio (I did not had any time to work on that one on my side this week).
          Bottom line is that you might consider using my FreeRTOS/Tracealizer/RTT/Percepio port. If you are not using Processor Expert, there is a GitHub Repository with all the latest and greatest files available on https://github.com/ErichStyger/McuOnEclipseLibrary
          I hope this helps,
          Erich

          Like

      • No I am not using processor export. I will try as you mentioned. I will overwrite my free rtos and seggar files, keep my rtos config and try all this again. Thanks alot. You have a lot of neet stuff on this blog.

        Like

    • Personally, I prefer FreeRTOS (and even a:FreeRTOS) over the mbed RTOS. What kind of performance analysis, profiling, application trace and instruction trace tools tools are you using for mbed?

      Like

  3. I don’t wanna be too critial versus the ( respectable ) opinions expressed here ( i’m refering to the concerns on Amazon that could affect the free open source spirit of the FreeRTOS project ) .
    The reality, today, is simply that we ( as developer ) have a FreeRtos with MIT license and this licence is now applied to the FreeRTOS+TCP component too , it that so bad ???

    Like

  4. Pingback: New Concept for 2018 Mini Sumo Roboter | MCU on Eclipse

  5. Pingback: McuOnEclipse Components: 26-Dec-2017 Release | MCU on Eclipse

  6. Hi Erich, Thank you for the information, It´s very useful. I think that the Amazon ecosystem simplify the deploy and implementation of systems in general. Are you planning to post any project? Please give an advise, how do you see to start with:
    -NXP LPC54018-based IoT Module with Amazon FreeRTOS
    -NXP LPC-Link2
    Greetings from Buenos Aires. Argentina !!!!

    Like

  7. Pingback: Faster FreeRTOS Percepio Tracealyzer Streaming with Segger RTT | MCU on Eclipse

  8. Erich

    Now that you have mentioned the “Apache mynewt” I wanted to ask if you are familiar with “Nuttx” (http://www.nuttx.org/doku.php?id=nuttx). It is a posix compliant RTOS that has a lot of functionality. I haven’t used yet, but since I’m thinking about learn another RTOS besides FreeRTOS I was thinking about using it.

    But if you know something about Nuttx I’d like to hear your opinions.

    Thanks!

    Like

  9. Hey Erich, for some reason tskKERNEL_VERSION_NUMBER still shows up as V9.0.0. Not sure if that was an oversight on Amazon’s end or what. The header for task.h says it’s V10.0.0. I checked the Github and V10.0.1 looks correct.

    Liked by 1 person

      • Thanks! I had my application code reporting the RTOS version and I was scratching my head for a minute trying to figure out why it hadn’t upgraded, but it had.

        I finally got MCUX build 606 to work, and the FreeRTOS TAD is working again. What’s the outlook for getting PEx to work on MCUX without having to remove the conflicting NXP configuration tool?

        Liked by 1 person

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 )

w

Connecting to %s