A robust, multi-stage bootloader system for STM32F4 microcontrollers implemented in Rust. This project demonstrates firmware validation, secure update mechanisms, and memory management using Rust's safety features for embedded development.
The system implements a structured four-component bootloader architecture:
- Boot (16KB): First-stage bootloader that validates and loads either Loader or Updater
- Loader (16KB): Main bootloader with XMODEM update capability for Application and Updater
- Updater (16KB): Similar to Loader but can also update the Loader itself
- Application (384KB): The user firmware that runs the actual application
Each component features a structured header (0x200 bytes) containing metadata such as magic number, version, CRC checksum, and vector table address. The system implements a comprehensive set of validation mechanisms at each stage to prevent corrupted firmware from executing.
Project Goal: This implementation leverages Rust's memory safety features and ownership model to create a more reliable and secure bootloader, minimizing the risk of memory corruption and other common embedded programming errors.
💡 Related Project
Note: I also have a C version of this bootloader that includes additional features like delta patching and encryption.Check it out as well!