Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

What's New With FreeRTOS V10.0.0

DZone's Guide to

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.

· IoT Zone ·
Free Resource

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

Amazon FreeRTOS

Amazon FreeRTOS (Source: Amazon Web Site)

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…

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

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

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

After a few tweaks, 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 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.

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 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!

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

Topics:
iot ,amazon ,freertos

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}