There’s no MMU, only an MPU on M0+, M3, M4, and M7 (and it’s optional on M0+). Flash and RAM are restricted. Crypto acceleration is absent on M0/M0+ and variable on M3 by way of M7. These constraints form every determination that follows.
- TOC/TOU on exterior flash.
- For exterior flash, copy the image to internal RAM or flash, then verify, then execute from the inner copy.
- There’s no MMU, solely an MPU on M0+, M3, M4, and M7 (and it’s elective on M0+).
Key Storage Methods That Actually Protect Your Fleet
Most Cortex-M “secure boot” implementations I’ve reviewed in production gadgets aren’t safe. They compute a hash, maybe verify a signature, after which jump to the applying whatever the result. The verify-but-don’t-enforce pattern is so common it has a name, and it passes code review as a outcome of the crypto seems right.

Validating That Your Safe Boot Really Works
The public key lives on the device, but the private signing key by no means leaves your construct server. Compromising one system within the subject doesn’t give an attacker the flexibility to sign firmware in your entire fleet. You need to know exactly how to structure the flash, which crypto to make use of on a device with 32 KB of RAM, the place to store keys, and which errors will silently undermine every little thing. Configure the MPU (where available) to enforce read-only access to the bootloader and key storage regions at runtime, even before jumping to software code. Secure boot doesn’t solve every firmware safety problem, but nothing else works with out it.
With Out a monotonic model counter, an attacker with physical entry can flash an older, weak firmware model that passes signature verification. Store a counter in OTP or protected flash and reject any firmware with a version beneath it. Use ECDSA P-256 with SHA-256. This is the best default for firmware signature verification on Cortex-M.

If an attacker can substitute it, they will sign arbitrary firmware that your bootloader will fortunately settle for. The bootloader is the smallest piece of code in your system and probably the most consequential. This is the core implementation. Every step consists of error handling as a result of the failure path is the safety boundary. Hold Cortex-M constraints in thoughts all through.

Those are associated but distinct issues. TOC/TOU on exterior flash. If firmware lives in external SPI flash, an attacker can swap content material https://ll-marine.online/2026/03/17/top-5-mistakes-marine-engineering/ between verification and execution. For exterior flash, copy the image to inside RAM or flash, then verify, then execute from the inner copy.
Step 5: Enforce The Decision
Never verify-in-place from external reminiscence. Production provisioning matters. Program keys in a secure manufacturing surroundings. Define a key injection procedure, monitor which key pairs correspond to which product lines, and plan for key revocation before you ship the primary unit. The public secret is the linchpin.
If your bootloader can’t be trusted, your software encryption, your safe communication, and your entry controls all rest on a basis that an attacker can exchange. JTAG/SWD gives direct memory access, bypassing every software program check. Completely disable or password-protect debug access by way of option bytes during manufacturing programming.
