Amazon FreeRTOS – IoT operating system for microcontrollers
aws.amazon.com
aws.amazon.com
Can't wait until the GPL is a rarely used license.
Everything will have a light version open source, with the actual goodies only available in the commercial version.
I'm somewhat shocked at how many different competing active RTOS's there actually are. There amount of reinventing the wheel must be huge. I mean I know the wikipedia page on Operating Systems lists a lot more.. but the majority of them are long dead.
[0]https://en.wikipedia.org/wiki/Comparison_of_real-time_operat...
Going forward, we expect to see non-traditional IoT software and infrastructure platform vendors looking closely at the embedded OS space. A compelling OS offering could drive millions of device signups for IoT services platforms, such as AWS IoT, Microsoft Azure, and GE Predix, which derive recurring revenue from services rendered to an installed base of devices. Onboarding an OS offering (or complementing Windows 10 IoT Core with an MCU-focused OS in Microsoft’s case) would allow these players to potentially hook analytics and connectivity services into a portion of the billions of MCUs that are shipped yearly, bumping up services revenue substantially.
We see this acquisition as a substantial, missed opportunity for leading MCU vendors, such as Renesas, Microchip/Atmel, and Qualcomm/NXP/Freescale, who we had shortlisted as likely acquirers. Micrium competitors Express Logic and WITTENSTEIN would be rational targets for the next round of RTOS acquisitions.
We had expected Microsoft to refocus its attention on the MCU space (perhaps with a derivative of WinCE) but they have been more focused on providing runtimes for maker boards and playing catch up with AWS, than building out the bottom end of their OS portfolio. Ditto Google with Android Things.
Think this is a great move on Amazon's part providing, but not forcing, an easy on-ramp to AWS for the billions of MCU-powered devices that ship every year.
Have any real comparisons been done? Both on flexibility (platform support and code portability... I know... Nuttx, POSIX) and performance (interrupts, context switching, etc)
I've been looking at zephyr which seems all around better, albeit a bit less mature. I have no hard data though... Hence this question.
why do IoT devices have to connect to the cloud? Is there any legitimate use case other than reporting data gathered on the customer? Why do have all these gadgets have to snoop on us?
Because otherwise you're in the business of explaining to non-technical users how to open up ports in their NAT firewalls and do other fun things required to make the device Just Work(tm) from any Internet connection.
It's important IMO for device vendors to offer as many options as possible in that regard. Ideally it should be possible to use a given device with a paid service sponsored by the manufacturer, a free service run by anyone else, a private server running on the customer's own LAN, or with no external servers at all.
If you want to use it outside your network, then you do it the old fashioned way, by setting up a vpn to your router.
Config-by-phone or config-by-cloud is definitely the way to go for consumer gear -- see Roku or Chromecast for great examples.
Insecurely designed, networked embedded devices are a serious issue. Look at the botnet based on CCTV cameras for an example. A company that doesn't care about security is still going to produce crap devices and isn't going to update, but for a company that cares about security, ability to patch devices in the field is an absolute necessity to stay on top of vulnerabilities.
The ability to add features and keep your device 'fresh' is a nice bonus.
I can turn my dumb non-internet connected thermostat up if i'm at home, the interesting thing about a Nest is that i can turn up the thermostat before i leave work and the house will be warm when i get home. The internet connection is the value-add. If you don't like internet connected devices that's cool, but IoT devices can't have the same feature set if you remove the internet connection. the call-home is not useless. If you want to argue that certain devices don't need an internet connection, that's fine. and in many cases i'd agree. but arguing that the whole class of devices that is defined by being connected to the internet doesn't need an internet connection is pretty silly.
Meditating that through a standardised storage connector would mean the IoT apps have very little to do.
That could be something like SFTP, but there are some interesting things like https://remotestorage.io/ that allow you to write your own storage provider so decentralised apps can choose their own data store/change storage later without changing the app.
to allow a "secure" connection (plus all the snooping and reporting).
as near as i can tell, there's no way to concoct a device to run on a home network which an average consumer's browser will be happy talking SSL to.
(if anyone knows a way i'd love to hear it.)
https://letsencrypt.org/2017/07/06/wildcard-certificates-com...
DNS poison within LAN (or proper internal DNS, or even HOSTS if DIY) for .product.tld Product initiates letsEncrypt for: uid.product.tld And posts some form of identity proof to vendor, setting up a link to carry out letsEncrypt challenges.
Verification negotiated between letsEncrypt and the vendor via public resolution of uid.product.tld
Device completes cert process with letsEncrypt and installs cert to the device.
LAN now has TLS to uid.device.tld internally (via DNS spoof/poinon) and vendor hasn't seen the cert. (but, if not DIY, the vendor is distributing a DNS poisoner in their product)
() Caveat: I've still not set up letsEncrypt in the wild, so don't know it's limitations, but from the doc's the above looks doable.
The lack of ability to have a browser TLS to *.local without an internal CA or non-public root and the endpoint management to goes with either is a pain.
What?
More important, will the device battery still be charged when it gets a response back?
Wow, not only reached the edge of the obervable universe, but easily outpacing expansion and communicating back to a cloud service.
FTL travel confirmed. FTL info confirmed.
https://aws.amazon.com/blogs/opensource/announcing-freertos-...
So presumably they have bigger plans beyond examples.
Richard released FreeRTOS in 2003, and had been working on FreeRTOS in partnership with WHIS since 2006, when they started to provide commercial support for it.
Which for anyone that used a PCW, means it can do a lot.
https://www.highintegritysystems.com/openrtos/
Note that I don't follow FreeRTOS's closely. I just discovered it searching for RTOS's with Wittenstein looking at who was doing safety-certified RTOS's. At least back then, it was neat to think someone's RTOS project was getting adoption in the commercial sector with some money going back to them. Now I wonder...
The additional value offered by OPENRTOS is as a ‘commercial and legal wrapper’ for FreeRTOS users.This is actually an improvement over the old "FreeRTOS open source license", which was basically the GPL plus:
> FreeRTOS may not be used for any competitive or comparative purpose, including the publication of any form of run time or compile time metric, without the express permission of Real Time Engineers Ltd.
A strange exception, which ostensibly prevented you from running benchmarks? But the GPL prohibits the addition of such clauses?
But now it's just plain MIT. Super easy.
Embedded systems tend to be doing things that look more like real-time control applications. Let's say the processor is running a radio. It is important that certain requests form the radio hardware are processed quickly enough otherwise the data isn't ready to transmit in the time slot that it is meant to be in, and you don't meet the standard for that protocol.
In practice though, what people are actually wanting is an abstraction around the concepts of scheduling, and facilities like multi-tasking (with pre-emption), and facilities to communicate between tasks in a thread safe way. Mostly they don't need the 'hard' RTOS aspects (and so this is often referred to as 'soft RTOS').
To explain this a little - your traditional simplistic embedded app while look like 'while(1) {}' at the bottom of main. It will sit in a loop servicing the things that need to be serviced - pulling characters off a UART, waggling the line for the LED to make it flash on the right interval etc.. This is fine for a small app on an 8 bit processor but as embedded applications grow, you have a lot of functionality that is all tied up with each other. What an embedded scheduler does is put the main loop at the bottom of the dependency tree rather than the top - modules of code can be separated out and request themselves to be scheduled when necessary allowing for much cleaner separation, and more robust code.
For example if your thing is attached to a sensor that spits out 47 bytes of sensor data every N clock cycles, and has a buffer that is 94 bytes, then you damn well better be reading that thing every N*2 clock cycles with a hard guarantee that your routine is finished copying all 94 bytes of data by the time it finishes (including time for interrupts).
This gets complicated when you have specific requirements about when data is available or other things too (e.g. if reading data requires pulling pin X low, waiting at least Y clock cycles, and then reading all data in no more than Z clock cycles before returning pin X back to high, then good luck doing that in a normal OS where you have no hard time guarantees).
An RTOS provides a convenience to allow various threads to block and thus simplify programming. I would choose an RTOS where there are a greater number of independent tasks which need to be performed.
Both are alternatives to a conventional OS which makes hitting deadlines difficult or impossible.
One of the things I like about an RTOS is the organization it gives to your code. It gives you primitives like tasks, queues, and semaphores and allows you to easily organize and synchronize independently running tasks. On something like Arduino where you just have a setup() and a loop() function, it can become a mess if you're trying to do many different things with different timing requirements.
The common solution seems to be: Don't care for some missed values (e.g. non-safety critical systems) or over provisioning (absence of budget pressure).
-> A RTOS alone doesn't give you any reliable claims (but does make a lot of embedded stuff much easier).
> The FreeRTOS kernel is now an AWS open source project, and these pages are being updated accordingly.
Given that, the distinction probably isn't super important.
Most likely Amazon's motivation is that they can make sure FreeRTOS makes using Amazon's services very easy; there are some IoT offerings that can't connect to Amazon's services, (or at least can't connect easily) [2]
By making sure FreeRTOS can easily pull in the right libraries, they can make it easier for people to connect devices to AWS without compromising on secure encryption.
[1] https://aws.amazon.com/blogs/opensource/announcing-freertos-... [2] Last time I checked, Amazons MQTT service required TLS1.2 and an esp8266 only supported TLS1.1
FreeRTOS is easy to use on any and all CPU architectures, and is much more common. Actually, FreeRTOS is the most popular RTOS in the embedded world with Linux, and uptrending (see https://m.eet.com/media/1246048/2017-embedded-market-study.p... slides 62/63). This is a survey of professional embedded developers, not newcomers. Notice than mbed doesn't even show up. My feel is that mbed can be attractive to newcomers in embedded (easiness), but has not (yet?) much traction with people already doing embedded dev.
[1] http://dmitry.gr/index.php?r=05.Projects&proj=07.+Linux+on+8...
For my area at least, we're talking about the microcontrollers for your car's key fob, your car's instrument cluster, etc. Every electronic component in your car has an embedded microcontroller connected to the CAN bus. And cost is a big issue.
High end electronic might contain more powerful micro controllers, but I doubt that by volume it makes a significant percentage of the microcontrollers in circulation.
- You want to keep manufacturing costs low so you can make more money.
- Running Linux requires a relatively large CPU with an MMU and a lot of RAM and Flash. This adds significant cost -- $5-$20 per unit.
- Some devices do enough local processing that they have this hardware anyway (routers, streaming TV widgets, smartphones). In this case, you might as well just run Linux and take advantage of the big software ecosystem.
- Most devices do not require such big hardware. This is where you want something like FreeRTOS (or smaller!) so you can ship smaller, cheaper hardware.