Cloud service · AWS · Updated

FreeRTOS - FreeRTOS is an open-source real-time operating system for microcontrollers, with libraries for embedded connectivity, security, and integration with AWS IoT services.

In short

FreeRTOS provides a small-footprint kernel and embedded software libraries for building applications on resource-constrained microcontrollers. It runs on the device rather than as a hosted AWS service, and applications can use its networking and security libraries to communicate with AWS IoT or other endpoints.

Cloud Services Hub →

11 key features of FreeRTOS

01
Priority-based task scheduling

Run independent application functions as tasks with assigned priorities. Configure scheduling and task behavior to keep latency-sensitive work responsive without starving lower-priority processing.

02
Task synchronization and communication

Use queues, task notifications, semaphores, mutexes, and event groups to coordinate work. Select interrupt-safe APIs where required and avoid blocking operations inside interrupt handlers.

03
Configurable memory footprint

Include only the kernel functionality and libraries needed by the device. Static allocation options and selectable heap implementations help engineers control RAM usage and allocation behavior.

04
Portable kernel

Supported processor ports allow the kernel to run across many microcontroller families. Hardware drivers, interrupt configuration, linker settings, and board initialization remain platform-specific responsibilities.

05
Embedded networking libraries

Libraries such as coreMQTT and coreHTTP provide application-layer communication capabilities. Integrate them with an appropriate transport, network stack, and TLS implementation for the target hardware.

06
Cryptographic interface support

corePKCS11 provides a PKCS #11 interface for cryptographic operations and object access. Use a suitable implementation to connect application authentication to software key storage or supported secure hardware.

07
Over-the-air update building blocks

An OTA agent and AWS IoT integrations can support remotely delivered firmware updates. Production implementations also need a compatible bootloader, image authentication, failure recovery, and carefully scoped permissions.

08
Long-term support releases

FreeRTOS LTS releases provide designated component versions with security fixes and critical bug fixes during their published support periods. Track the support dates for the specific release rather than assuming all versions have the same maintenance window.

09
Symmetric multiprocessing

The FreeRTOS kernel supports symmetric multiprocessing (SMP) on multi-core microcontrollers.

10
Greengrass core discovery

FreeRTOS libraries can discover and connect to AWS IoT Greengrass cores.

11
Wi-Fi connection management

FreeRTOS includes libraries for managing Wi-Fi connections.

Where FreeRTOS is used

  1. 01
    Connected sensors

    Schedule sampling, filtering, and MQTT publishing on a microcontroller. Buffer a bounded amount of telemetry during network outages and reconnect without interrupting essential local measurements.

  2. 02
    Industrial monitoring and local control

    Separate time-sensitive acquisition or control tasks from cloud reporting. Validate worst-case execution times and fault behavior independently of network availability; FreeRTOS alone does not establish functional safety compliance.

  3. 03
    Connected appliances

    Coordinate user interfaces, sensors, actuators, and network communication within a constrained device. Use AWS IoT messaging or device shadows to exchange status and desired settings with cloud applications.

  4. 04
    Remotely maintained device fleets

    Build firmware that can receive update instructions and install authenticated images. Combine staged rollouts with device-side recovery so unsuccessful updates do not require physical access.

  5. 05
    Cloud-independent embedded products

    Use the kernel for concurrent local processing without connecting to AWS. This fits controllers and instruments that need task scheduling and synchronization but have no cloud requirement.

How FreeRTOS is priced

No runtime license fee

The FreeRTOS kernel and publicly available FreeRTOS libraries are distributed under the MIT license without per-device runtime fees. Hardware, engineering, third-party components, and any separately contracted support remain independent costs.

Usage-based connected services

AWS integrations are billed separately under each service's pricing. Estimate MQTT messaging and connectivity, device management operations, firmware storage and downloads, rule processing, and downstream compute or logging based on fleet behavior.

Extended Maintenance Plan subscription

FreeRTOS EMP charges an annual subscription fee per FreeRTOS LTS version, with subscriptions renewable annually for up to 10 years.

EMP late subscription or renewal fee

A one-time fee applies when subscribing to EMP after the corresponding LTS coverage ends or renewing after a subscription expires. The fee is 50% of the annual subscription price within the first five years after LTS coverage ends, or 100% between five and 10 years after it ends.

Data transfer

External data transfers to AWS initiated by a FreeRTOS device are charged at the EC2 data transfer rate.

Services FreeRTOS works with

A common connected architecture runs FreeRTOS tasks for sensing and local control while a communication task exchanges MQTT messages with AWS IoT Core over TLS. Give each device a distinct identity and restrict its policy to the topics and operations it needs. Device shadows can represent desired and reported settings, but firmware must reconcile those settings with local state and handle reconnects.

Cloud processing typically begins with AWS IoT rules rather than direct calls from the microcontroller to every backend service. Rules can invoke Lambda for validation or application workflows, keeping cloud credentials and business logic off the device. Use bounded device queues, explicit retry behavior, and duplicate-tolerant processing to handle intermittent connectivity.

For maintenance, AWS IoT Device Management jobs can coordinate firmware rollouts using artifacts held in Amazon S3. Pair this workflow with authenticated images, a compatible bootloader, and tested recovery behavior. CloudWatch provides visibility into cloud-side connectivity and processing, while device diagnostics need a separately designed upload path. Monitor firmware versions and update outcomes alongside service metrics so fleet operators can distinguish network failures from application defects.

AWS IoT CoreAWS IoT Core

A FreeRTOS application can use coreMQTT with a TLS transport to publish and subscribe through AWS IoT Core. For example, a sensor can publish measurements to a device-specific topic and receive configuration changes through another topic or a device shadow. Provision device credentials and restrict the AWS IoT policy to the required resources.

AWS IoT Device ManagementAWS IoT Device Management

AWS IoT Jobs can coordinate operations that device firmware executes, including firmware updates through an appropriate OTA agent. For example, target a test group with a new firmware version before expanding the rollout to production devices. The application or agent must process job documents and report execution status; creating a job does not automatically implement the operation on the device.

Amazon S3Amazon S3

Amazon S3 can store firmware artifacts used in an OTA workflow. For example, an update job can reference an image stored in S3, with delivery to the device using the transport supported by the chosen OTA implementation. Configure artifact access carefully and ensure the device verifies image authenticity before installation.

AWS LambdaAWS Lambda

AWS IoT Core rules can invoke Lambda functions in response to messages published by FreeRTOS devices. For example, a temperature event can trigger validation and an application notification without embedding that business logic in firmware. Design the function and event processing to tolerate retries and duplicate messages.

Amazon CloudWatchAmazon CloudWatch

CloudWatch can monitor the AWS-side services supporting a FreeRTOS fleet, including AWS IoT metrics and enabled AWS IoT logging. For example, use alarms to detect elevated connection failures or message-processing errors. Device application logs require an explicit ingestion path, such as MQTT messages routed through an AWS IoT rule; FreeRTOS does not automatically stream its logs to CloudWatch.

Amazon CognitoAmazon Cognito

FreeRTOS Bluetooth Low Energy companion applications can use Amazon Cognito to authenticate users and obtain AWS credentials. The companion application acts as a gateway, relaying MQTT messages between a FreeRTOS device and AWS IoT Core.

AWS Identity and Access Management (IAM)AWS Identity and Access Management (IAM)

FreeRTOS over-the-air updates use IAM roles and policies to authorize the cloud-side update workflow. These permissions allow AWS IoT to retrieve firmware from Amazon S3 and use code-signing resources when creating an update job.

AWS IoT Device DefenderAWS IoT Device Defender

FreeRTOS provides a Device Defender library that collects device-side security metrics and publishes them to AWS IoT Device Defender. These metrics can help detect unexpected behavior, such as unusual network connections or traffic volumes.

AWS IoT GreengrassAWS IoT Greengrass

FreeRTOS devices can use the Greengrass discovery library to discover a Greengrass core and obtain the connection information and certificates needed to connect securely. Devices can then exchange MQTT messages through the local core.

AWS Signer

FreeRTOS over-the-air updates integrate with AWS Signer to digitally sign firmware images. The FreeRTOS OTA agent verifies the signature before accepting an update, helping prevent installation of unauthorized or modified firmware.

What is FreeRTOS

3 min read

FreeRTOS is a real-time operating system for microcontrollers and small embedded processors. Its kernel provides task scheduling, queues, semaphores, mutexes, software timers, and other primitives used to coordinate concurrent application work. Engineers compile the kernel and selected libraries into device firmware, together with application code, hardware drivers, and a board-specific configuration. FreeRTOS is not a cloud-hosted runtime, and devices do not need an AWS connection to use the kernel.

The kernel supports priority-based scheduling, allowing time-sensitive work to run ahead of lower-priority tasks. Applications commonly separate sensor acquisition, communications, control logic, and maintenance into distinct tasks. Predictable behavior still depends on application design: long critical sections, inappropriate interrupt priorities, priority inversion, and blocking operations can cause missed deadlines. Allocate task stacks deliberately, measure stack usage under realistic workloads, and choose a memory allocation strategy that matches the product's reliability requirements.

The kernel does not perform non-deterministic operations, such as walking a linked list, inside a critical section or interrupt.

The kernel's software timer implementation uses no CPU time unless a timer needs servicing, and blocked tasks do not require time-consuming periodic servicing.

FreeRTOS libraries address common embedded networking requirements, including MQTT messaging, HTTP communication, and TLS integration. Libraries such as coreMQTT, coreHTTP, and corePKCS11 can be selected independently according to the application. Actual connectivity depends on the board, network interface, TCP/IP stack, and TLS implementation. Before choosing hardware, verify processor-port support, toolchain compatibility, available RAM and flash, network drivers, and any secure element or cryptographic acceleration requirements.

For AWS-connected products, a common architecture uses MQTT over TLS to communicate with AWS IoT Core. Each device typically has its own identity and certificate, with an AWS IoT policy restricting access to the required topics and resources. Store private keys in protected storage where possible, and plan certificate provisioning, rotation, revocation, and recovery before production deployment. A PKCS #11 integration can help isolate cryptographic operations, but the level of key protection depends on the underlying implementation and hardware.

Fleet maintenance also requires a complete firmware update design. AWS IoT Jobs and an over-the-air update agent can coordinate update delivery, while Amazon S3 can hold firmware artifacts. The device bootloader must enforce the intended image verification and rollback behavior; downloading a new image alone does not establish a secure update process. Test interrupted downloads, power failures, invalid signatures, and failed application startup.

The FreeRTOS kernel and publicly available FreeRTOS libraries are available without runtime license fees under the MIT license. Review licenses for any additional components included in the firmware. AWS services used for messaging, storage, monitoring, and fleet operations are billed separately. For long-lived products, select maintained component versions, track security advisories, and establish a repeatable process for rebuilding, testing, and distributing firmware updates.

FreeRTOS Extended Maintenance Plan (EMP) provides security patches and critical bug fixes for a chosen LTS version for up to 10 years beyond its initial LTS support period. Non-public EMP patches are supplied under the AWS Intellectual Property License with additional limited rights to modify the patches and distribute them in object code form, rather than under the MIT license.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.