Devices for Internet of Things (IoT) have a connection to the cloud, and one of the targets is often running on Amazon Web Services (AWS). I recently needed to use it when I was evaluating Cirrus Logic’s Alexa Voice Capture Development Kit for Amazon AVS. The kit used a Raspberry Pi running Linux to link the DSP-based voice capture system to the Alexa Voice Service (AVS) running on AWS.
AWS just announced a number of services and software targeting the IoT. These included AWS IoT 1-Click, AWS IoT Device Management, AWS IoT Device Defender, AWS IoT Analytics, AWS Greengrass ML Inference, and Amazon FreeRTOS. The latter will be most interesting to embedded developers, but more on that later.
The AWS IoT 1-Click is a way to initiate AWS Lambda functions using a single button click, typically on a device or an app. Developers can create AWS Lambda functions or use pre-built AWS Lambda code to handle common actions like sending an SMS or e-mail.
The AWS IoT Device Management, AWS IoT Device Defender, and AWS IoT Analytics are designed to manage, secure, and analyze IoT devices and data, respectively. The web-based AWS IoT Device Management handles device setup, updates, and management over the lifetime of the device. Defender is designed to perform security audits of IoT devices, while AWS IoT Analytics is used to examine data sent from IoT devices.
The AWS Greengrass is a framework for running compute via AWS Lambda functions and messaging services. This allows the same programming model to be used in the cloud or on a device making migration of functionality between the two easier. AWS Greengrass can run on an IoT device or gateway to provide lower latency and disconnected operation of device services. The software will run on AWS FreeRTOS. The AWS Greengrass ML Inference support brings machine learning (ML) to the mix, either on the device or in the cloud. AWS Greengrass handles secure communication.
FreeRTOS was developed by Richard Barry around 2003. The software was free and open-source under an MIT license and supported by ’s company, Real Time Engineers Ltd. The MIT license requires developers to include the copyright notice and provide a copy of the license, but it does not require that any user source or modifications be made public as with a GPL license.
FreeRTOS has been used in innumerable embedded applications and is often found in free software from silicon and system vendors. Real Time Engineers has handed the support of FreeRTOS over to Amazon’s AWS. A typical implementation uses about 6 to 12 Kbytes.
FreeRTOS is a small RTOS. The kernel consists of only three C source files. Some assembly is required, but this is more for customization for a particular processor architecture. It supports most processors. FreeRTOS can provide support for threads or tasks, coroutines, mutexes, semaphores, and software timers. There is a tick-less mode designed for compact, low-power applications. The RTOS also provides five memory allocation schemes, including one with C library and mutual exclusion support.
Wittenstein is another company that provides RTOS options compatible with FreeRTOS. One is called SafeRTOS and the other is OpenRTOS. SafeRTOS has been rewritten and meets the requirements of the IEC 61508 safety standard. OpenRTOS shares the FreeRTOS kernel code. Both have commercial licenses and come with a warranty. FreeRTOS is provided as is.
FreeRTOS has a range of open-source projects that work with it, as well as commercial products. It is supported by a number of third-party development tools, often with debugger integration. One of the projects is FreeRTOS+TCP.
The underlying code for FreeRTOS is unlikely to change much now that Amazon is supporting it. On the other hand, features like AWS Greengrass will be added on top of FreeRTOS.