What's New With FreeRTOS V10.0.0
What's New With FreeRTOS V10.0.0
FreeRTOS users, rejoice! Or maybe not. Version 10 not only comes new features, but Amazon has stepped in for development. See what's new and what it means for you.
Join the DZone community and get the full member experience.Join For Free
“Amazon FreeRTOS – IoT operating system for microcontrollers”: The announcement of FreeRTOS V10.0.0 was big 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.
Besides 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 all the extra tools like Kernel Awareness in Eclipse, Percepio Tracealyzer, and Segger SystemView make it the best choice for systems that do not run 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 were to 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 a lot of engineers away 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 definitely been 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….
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 V10.0.0 both as Processor Expert components and 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.
The Percepio Tracealyzer library has been upgraded to V3.3.0, plus more settings have been added to support the new FreeRTOS features:
After a few tweaks, I had the Tracealyzer library working fine with FreeRTOS V10.0.0:
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 website (see the 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 for FreeRTOS V10.0.0.
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 potentially positive side: If Amazon keeps 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 is, 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!
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.
- 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
Published at DZone with permission of Erich Styger , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.