How to quickly determine whether an MCU can run an RTOS system?

ampheoampheo
2 min read

To quickly determine whether a microcontroller (MCU) can run an RTOS, follow this checklist based on the RTOS’s minimum hardware requirements and the MCU’s capabilities:


Quick RTOS Compatibility Checklist

FeatureMinimum Requirement for RTOSHow to Check
Core Architecture32-bit preferred (ARM Cortex-M*)Check datasheet (e.g., Cortex-M0/M3/M4)
RAM≥8 KB (for simple RTOS like FreeRTOS)Datasheet (SRAM/IRAM size)
Flash≥32 KB (RTOS kernel + app)Datasheet (Flash size)
Interrupt Controller (NVIC)Required for preemptive schedulingPresent in all Cortex-M
Clock Speed≥10 MHz recommendedCheck MCU frequency range
Timer PeripheralAt least one hardware timerCheck peripherals table

General Guidelines

MCU ClassRTOS Friendly?Notes
8-bit (e.g. AVR)⚠️ LimitedPossible, but constrained (e.g. FreeRTOS AVR port)
16-bit (e.g. MSP430)⚠️ PossibleLightweight RTOSs only
ARM Cortex-M0/M0+✅ Basic RTOSWorks with small RTOSs like FreeRTOS, Zephyr (low config)
Cortex-M3/M4/M7✅✅ Fully RTOS capableCan run advanced RTOSes (e.g., FreeRTOS, RT-Thread, Zephyr)
RISC-V MCUs✅ If 32-bit+RTOS ports are available for several cores

Check These in the MCU Datasheet or Reference Manual

  • Core: Look for ARM Cortex-M or RISC-V 32-bit core.

  • RAM/Flash: At least 8–16 KB RAM and 32+ KB Flash.

  • SysTick Timer or Timer peripheral: Needed for OS tick generation.

  • NVIC (Nested Vectored Interrupt Controller): Required for context switching.


Examples

MCURTOS Capable?Notes
ATmega328P (AVR)⚠️ BarelyCan run simple FreeRTOS builds
STM32F103C8T6✅✅ YesCommonly used with FreeRTOS/RT-Thread
STM32F407✅✅ YesCortex-M4F: Excellent for RTOS use
ESP32✅✅ YesDual-core, runs FreeRTOS by default
Raspberry Pi Pico (RP2040)✅ YesCan run FreeRTOS, even Zephyr

Quick Tools to Help

  • MCU datasheet (check core, RAM/Flash)

  • Vendor SDKs (e.g. STM32CubeMX, ESP-IDF)

  • RTOS port list (e.g., FreeRTOS-supported MCUs: https://freertos.org/RTOS_ports.html)


Conclusion

An MCU can run an RTOS if it has:

  • A 32-bit core

  • Enough RAM (≥8 KB) and Flash (≥32 KB)

  • At least one timer

  • A proper interrupt controller

0
Subscribe to my newsletter

Read articles from ampheo directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

ampheo
ampheo