“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.
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…
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:
Stream and Message Buffers
The FreeRTOS V10.0.0 kernel comes with two new features:
- Stream Buffer: https://www.freertos.org/RTOS-stream-buffer-API.html.
- Message Buffer: https://www.freertos.org/RTOS-message-buffer-API.html
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:
I only had to make a few tweaks, and I had the Tracealyzer library working fine 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().
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.
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
- FreeRTOS web site: https://www.freertos.org/
- FreeRTOS V10.0.0 announcement: https://aws.amazon.com/blogs/opensource/announcing-freertos-kernel-v10/
- Segger SystemView: https://www.segger.com/products/development-tools/systemview/
- Percepio Tracealyzer: https://percepio.com/tracealyzer/
- Ported FreeRTOS, SystemView and Percepio sources on GitHub as Processor Expert components: https://github.com/ErichStyger/McuOnEclipse_PEx
- C/C++ sources on GitHub: https://github.com/ErichStyger/McuOnEclipseLibrary
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.
LikeLike
You raise a good point, and I thought about it too, but wanted to keep it more on the technical side. Indeed, at least in Europe, Amazon has a bad reputation, and the company is not seen in a positve way. I know that for example in Germany there are big debates about Amazon and their handling of labor rights (https://www.heise.de/newsticker/meldung/Verdi-ruft-an-drei-deutschen-Amazon-Standorten-zum-Streik-auf-3875870.html).
LikeLike
Correct me if I am wrong, but if you like FreeRTOS, but don’t like the idea, that Amazon is now leading the development, you could just fork it if you wanted.
In the end, this is what opensource is all about.
LikeLike
Nothing wrong about that. I maintain that McuOnEclipse fork of FreeRTOS over 5 years already, and that’s fine. My view of open source projects is that it is not only about the source being open, but as well the spirit and intention behind it. If that Amazon move is all about profits, it affects the spirit the spirit FreeRTOS had. There is nothing about making money, but Amazon is definitely a different scale of that.
LikeLiked by 1 person
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.
LikeLike
Wow, that was fast! I think I’ll hold off for at least a month before trying the upgrade – too many irons in the fire right now. Keep us updated!
LikeLike
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….
LikeLike
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.
LikeLike
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
LikeLike
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.
LikeLike
While you are on the prowl NuttX might be worth a look as it has had a solid history in the PX4 project.
LikeLike
Yes, I looked at NuttX, and it would be a potential alternative too. The Apache Mynewt seems a better alternative, but yet again, it depends on the requirements.
LikeLike
mbed is also a nice solution
LikeLike
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?
LikeLike
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 ???
LikeLike
Erich… nice job as always.
Alan
LikeLike
Pingback: New Concept for 2018 Mini Sumo Roboter | MCU on Eclipse
Pingback: McuOnEclipse Components: 26-Dec-2017 Release | MCU on Eclipse
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 !!!!
LikeLike
Hi Diego,
unfortunately, I do not have that board, so it is not very likely that I will be able to write something about it in the near future.
Greetings from Switzerland!
LikeLike
Pingback: Faster FreeRTOS Percepio Tracealyzer Streaming with Segger RTT | MCU on Eclipse
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!
LikeLike
Yes, I’m aware of Nuttx, but I have not had the time to use it. For the moment I’m more in favour of mynewt (https://mynewt.apache.org/)
LikeLike
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.
LikeLiked by 1 person
Hi Scott,
I believe it was an oversight on the V10.0.0 on Amazon’s end. I have fixed it now in my port (thanks for reporting!), and I plan to upgrade to V10.0.1 soon.
LikeLiked 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?
LikeLiked by 1 person
The word is that a new version of the IDE is coming out in May this year, and it will allow installation of PEx.
LikeLiked by 1 person
That’s good to hear! Maybe if PEx is going to be around for a while I’ll start trying my hand at writing some components for it.
LikeLiked by 2 people
Hi Eric,
Thanks for all your postings!
I’m trying to integrate SystemView into a K64F (testing the frdmk64f_freertos_hello example). I’m using MCUXpresso IDE v11.1.1 and Amazon FreeRTOSV10 from the example.
I tried several methods to copy/integrate SystemView sources but none of them works. I can’t even compile the project. I’ve got any kind of undefined references to SystemView sources.
I also tried to patch the SystemView sources with the original ones from the project but it did not work either. I’m absolutely lost!
Is there any reliable/simpler method to integrate Segger SystemView using MCUXpresso IDE v11.1.1?
Thanks in advance!
Alejandro
LikeLike
Hi Alejandro,
I recommend to use my McuLib (https://github.com/ErichStyger/McuOnEclipseLibrary) which has FreeRTOS, SystemView and many other things integrated.
See https://mcuoneclipse.com/2020/05/31/tutorial-adding-freertos-to-where-there-is-no-freertos/ for a tutorial on this.
Then it is really only a matter to set a define in the master include file, and your are ready to go.
LikeLike
Pingback: Tutorial: Adding FreeRTOS to where there is no FreeRTOS | MCU on Eclipse
Pingback: FreeRTOS V10.4.1 with SEGGER SystemView V3.12 | MCU on Eclipse
Pingback: RTOS Trace: TraceX with Microsoft Azure RTOS (aka ThreadX) | MCU on Eclipse