A comprehensive, multi-stage secure bootloader system for STM32F4 microcontrollers designed for mission-critical applications requiring reliable and secure firmware updates. This bootloader provides advanced functionality including firmware encryption, incremental updates via delta patching, and failsafe recovery mechanisms.
The system implements a robust four-stage bootloader architecture:
- Boot (16KB): Primary bootloader that validates and hands off to Loader
- Loader (48KB): Interactive menu-based bootloader for normal boot or update selection
- Updater (64KB): Handles firmware updates via XMODEM with encryption and delta patching
- Application (384KB): Main application firmware
Updates can be delivered as full firmware images or as delta patches to minimize bandwidth usage and update time, reducing transmission size for minor updates.
Project Goal: Security features include firmware encryption (AES-128-GCM) and authentication via mbedTLS. The bootloader implements a secure boot chain that verifies each stage of the boot process using component-specific magic numbers, CRC32 checksums, and version checks, ensuring that only authenticated firmware can execute on the device.