Firmware

7 Best Open Source RTOS Kernels for Arm Cortex-M

Compare seven open source RTOS kernels for Arm Cortex-M, from FreeRTOS and Zephyr to PlatformIO and Segger.

On this page
  1. Key takeaways
  2. What Cortex-M projects need from an RTOS
  3. Quick comparison
  4. The best open source RTOS kernels for Cortex-M
  5. How we chose
  6. FAQ
  7. Sources

Key takeaways

  • FreeRTOS and Zephyr are the two most widely adopted open source kernels for Arm Cortex-M microcontrollers.
  • Arduino and PlatformIO bring real time scheduling within reach for beginners and multi framework teams.
  • Segger offers a commercial grade RTOS, while Espressif builds FreeRTOS directly into its IoT framework.
  • MicroPython gives a higher level, Python based alternative to a traditional C kernel.

What Cortex-M projects need from an RTOS

A real time operating system, or RTOS, lets an Arm Cortex-M microcontroller run several tasks that appear to happen at once. The kernel handles scheduling, priorities, and communication between tasks, which matters when a device must respond to a sensor, a radio, and a user interface in the same moment.

Not every project needs an RTOS, but most connected and timing sensitive firmware benefits from one. The options below range from a tiny scheduler you add to a project to full platforms with drivers and network stacks already in place.

Quick comparison

ToolBest forStarting priceFree plan
FreeRTOSLightweight task schedulingNot includedNot included
ZephyrConnected device stacksNot includedNot included
ArduinoApproachable firmwareNot includedNot included
PlatformIORTOS project buildsNot includedNot included
SeggerDeterministic commercial RTOSNot includedNot included
EspressifFreeRTOS based IoT SDKNot includedNot included
MicroPythonPython on embedded boardsNot includedNot included

The best open source RTOS kernels for Cortex-M

1. FreeRTOS

  • Official site: https://www.freertos.org
  • Best for: Lightweight task scheduling
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Small memory footprint; Very large community
  • Cons: Kernel only, no middleware; Sparse official tooling

FreeRTOS is the best known open source real time kernel for microcontrollers, and it runs on a very long list of Arm Cortex-M parts. It is distributed under a permissive open source license, which has helped it spread across consumer, industrial, and hobby products alike.

The kernel provides the core pieces a real time system needs: tasks with priorities, queues, semaphores, mutexes, and software timers. It is deliberately small, so it fits on devices with limited flash and RAM while still giving predictable scheduling.

Because so many people use it, answers to common questions are easy to find, and many chip vendors ship a FreeRTOS port with their own SDK. The tradeoff is that the kernel stops at scheduling; networking, storage, and drivers come from other places.

2. Zephyr

  • Official site: https://www.zephyrproject.org
  • Best for: Connected device stacks
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Rich connectivity stacks; Strong vendor backing
  • Cons: Steeper learning curve; Larger code than a bare kernel

Zephyr is an open source RTOS hosted by the Linux Foundation and backed by a broad group of hardware and software companies. It supports Arm Cortex-M alongside many other architectures, and it scales from tiny sensor nodes up to larger, more capable devices.

Where Zephyr stands out is what comes with the kernel. It includes drivers, a device tree based configuration model, and connectivity stacks for Bluetooth, USB, and networking, so a project can start with more than just a scheduler.

That completeness has a cost in complexity. Zephyr has a longer learning curve than a small kernel, and its build system takes some time to get comfortable with, but the payoff is a consistent, modern platform for connected firmware.

3. Arduino

  • Official site: https://www.arduino.cc
  • Best for: Approachable firmware
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Very approachable; Huge library ecosystem
  • Cons: Not an RTOS by itself; Less low level timing control

Arduino is an open source electronics platform built around boards, a simple IDE, and a very large library ecosystem. Many Arduino boards use Arm Cortex-M processors, which puts them squarely in the range this list covers.

Arduino is not an RTOS on its own, but real time scheduling is easy to add through libraries such as Arduino_FreeRTOS. That combination gives newcomers a gentle path from a simple sketch loop to proper tasks and priorities without leaving the familiar environment.

The strength of Arduino is its community and the sheer number of examples and libraries. For hard real time work it offers less control over low level timing than a dedicated kernel project, but for many devices it is the fastest way to working firmware.

4. PlatformIO

  • Official site: https://platformio.org
  • Best for: RTOS project builds
  • Starting price: Not included
  • Free plan: Not included
  • Pros: One toolchain for many frameworks; Integrated library manager
  • Cons: Not a kernel itself; Setup requires an editor or CLI

PlatformIO is an open source ecosystem for embedded development rather than a kernel. It provides the build system, toolchains, and library management that sit around firmware, and it works inside editors such as VS Code.

For RTOS work, PlatformIO is useful because it treats FreeRTOS, Zephyr, and Arduino as frameworks you can select per project. That means one install and one workflow can serve several different kernels and boards, with dependencies pulled in automatically.

It is a tooling layer, not a scheduler, so the kernel itself still comes from FreeRTOS, Zephyr, or another framework. Still, for teams juggling multiple targets, PlatformIO removes much of the setup friction that embedded work usually involves.

5. Segger

  • Official site: https://www.segger.com
  • Best for: Deterministic commercial RTOS
  • Starting price: Not included
  • Free plan: Not included
  • Pros: Deterministic scheduling; Strong companion toolchain
  • Cons: Commercial closed source kernel; Licensing needed for products

Segger is a German company best known for its J-Link debug probes, and it also makes embOS, a compact real time operating system for Cortex-M and other cores. embOS is a commercial, closed source product rather than an open source kernel.

The kernel is built around priority controlled, deterministic scheduling, and it is designed to be small and fast in production firmware. Segger pairs embOS with a wider set of tools, including GUI and file system components, which creates a consistent commercial stack.

embOS belongs on this list as the commercial counterpoint to the open source options. Teams that want a supported, predictable kernel with vendor backing often weigh it against FreeRTOS and Zephyr when choosing a platform.

6. Espressif

  • Official site: https://www.espressif.com
  • Best for: FreeRTOS based IoT SDK
  • Starting price: Not included
  • Free plan: Not included
  • Pros: FreeRTOS built into ESP-IDF; Strong wireless support
  • Cons: Tied to Espressif hardware; Framework has a learning curve

Espressif is the semiconductor company behind the ESP32 and ESP8266 families of wireless microcontrollers. Its chips are best known for built in WiFi and Bluetooth, and they power a large share of connected hobby and commercial devices.

The connection to this list is the ESP-IDF framework, which is open source and built on top of FreeRTOS. Every ESP-IDF project runs on the FreeRTOS kernel, so developers get wireless connectivity and a real time scheduler in one package.

The main limits are that the framework is tied to Espressif silicon and that ESP-IDF adds its own concepts on top of FreeRTOS. For anyone building a connected device, though, the combination is one of the most polished routes to production firmware.

7. MicroPython

  • Official site: https://micropython.org
  • Best for: Python on embedded boards
  • Starting price: Not included
  • Free plan: Not included
  • Pros: High level Python workflow; Wide board support
  • Cons: Slower than native C; Not a preemptive kernel

MicroPython is a lean implementation of Python that runs directly on microcontrollers, including many Arm Cortex-M boards. Instead of writing C tasks, you write Python, which makes the firmware layer far more approachable for prototyping.

MicroPython is not a traditional RTOS, but it provides its own scheduling and driver layer on top of the hardware, along with interrupts and timers. It also sits well beside an RTOS, since some ports can run Python alongside native tasks on a real kernel.

The tradeoff is speed and determinism; interpreted Python is slower than compiled C, so it suits control and prototyping more than tight, hard real time loops. For quick bring up and automation, however, it is a very practical alternative.

How we chose

We started with the kernels that define the category, FreeRTOS for its ubiquity and Zephyr for its connected platform. Around them we placed the layers that make those kernels usable, Arduino and PlatformIO for accessibility and tooling, and Segger as the commercial option many teams compare against.

We also included the two embedded runtimes that frame the same problem differently, Espressif with FreeRTOS built into a wireless SDK, and MicroPython with a high level language on bare metal. Together the list covers the scheduling needs of both small sensor nodes and larger connected products.

FAQ

Is FreeRTOS free to use in commercial products?

Yes. FreeRTOS is distributed under a permissive open source license, so it can be used in commercial firmware without restriction.

Which kernel should a beginner start with?

Arduino with the Arduino_FreeRTOS library is the gentlest start, since it keeps the familiar sketch workflow while adding tasks and priorities.

Can FreeRTOS run on Arduino boards?

Yes. Many Arduino boards support the Arduino_FreeRTOS library, and ESP32 based Arduino boards already run FreeRTOS through their underlying framework.

What is the difference between FreeRTOS and Zephyr?

FreeRTOS is a small, focused kernel, while Zephyr is a full platform that adds drivers, configuration, and connectivity stacks on top of the kernel.

Do I need an RTOS for a simple Cortex-M project?

Not always. A plain loop is fine for small tasks, but an RTOS helps when the device must juggle several independent jobs with timing requirements.

Sources