Skip to content

MCUboot

Definition
MCUboot — Open-source secure bootloader for 32-bit MCUs with verified boot, encrypted OTA updates, and rollback protection.

MCUboot — Secure Bootloader for Microcontrollers

MCUboot is an open-source, hardware-independent secure bootloader for 32-bit microcontrollers. It can serve as the root of trust at the firmware level when it is stored immutably (ROM or write-protected flash) together with its public key; it then verifies that firmware images are cryptographically signed and authentic before running them. MCUboot is the de facto bootloader for Zephyr RTOS and is increasingly used to support CRA compliance.

Why MCUboot Matters

Without a secure bootloader, anyone with physical or remote access can flash modified firmware onto a device — bypassing all software security. MCUboot prevents this by:

  1. Verifying signatures before executing any firmware image
  2. Managing firmware slots for safe over-the-air (OTA) updates
  3. Rolling back to a known-good image if a new update fails
  4. Encrypting update images in transit and in the secondary slot, which hinders reverse engineering of the update file

Key Features

FeatureDescription
Image signingEd25519, ECDSA-P256, RSA-2048/3072 signature verification
Encrypted imagesAES-CTR-128/256 encryption of the image in transit and in the secondary slot (e.g. external flash); it is decrypted when installed to the primary slot
Dual-slot updatePrimary + secondary slot for fail-safe firmware swaps
Swap upgradesResumable image swap (swap using offset, move or scratch) — survives power loss mid-update
Rollback protectionOptional downgrade prevention: version comparison (overwrite-only mode) or a security counter checked against a counter in trusted non-volatile storage
Serial recoveryMCUmgr protocol for USB/UART recovery if OTA fails
Measured bootBoot record (image hash, version, signer ID) passed to the runtime firmware, e.g. for an attestation service

Update Modes

ModeMechanismPower-Loss SafeFlash Wear
Swap (scratch)Sector swap through a scratch area; no longer recommended by the project✅ ResumableHigher
Swap (move)In-place sector shuffling (no scratch area)✅ ResumableMedium
Swap (offset)Swap through one spare sector in the secondary slot (no scratch area); the swap mode the project prefers✅ ResumableLow
Overwrite-onlyDirect overwrite of primary slot; no revert to the previous image✅ Copy is redoneLowest
Direct XIPExecute from either slot (no copy)✅None

Supported Platforms

MCUboot is OS and hardware independent. It supports:

  • RTOS: Zephyr, FreeRTOS (through vendor SDKs, e.g. NXP MCUXpresso), Apache NuttX, Apache Mynewt, Mbed OS (no longer maintained by Arm since July 2026), RIOT (boot target only)
  • Vendors: Nordic (nRF52/53/91), STMicroelectronics (STM32L5, STM32U5, STM32H5), NXP (LPC, i.MX RT), Espressif (ESP32), Infineon/Cypress (PSoC 6)
  • Architectures: ARM Cortex-M, RISC-V, Xtensa

CRA Compliance Connection

The EU Cyber Resilience Act sets outcome-based requirements (Annex I) that MCUboot can help meet:

  • ✅ Integrity protection and secure distribution of updates — MCUboot supports this via image signing
  • ✅ Rollback protection — not named in the CRA, but a common control against reinstalling vulnerable firmware; MCUboot can enforce it with a security counter in each image (optional)
  • ✅ Timely security updates as part of vulnerability handling — MCUboot enables patch deployment via OTA
  • Secure Boot — The broader concept of verified boot chains; MCUboot is the implementation layer for MCU-based systems.
  • OTA Update — MCUboot manages the firmware slot swapping that makes secure OTA possible.
  • CRA — EU regulation setting outcome-based cybersecurity requirements for products with digital elements, including integrity protection and secure distribution of security updates.

In embedded development projects we use MCUboot wherever the platform supports it — with secure boot and OTA updates designed to the CRA requirements from day one. See our Embedded Security & IoT capabilities.

Official References

Back to Glossary