GlossaryBootloader
Bootloader
A bootloader is a small program that runs first when a device powers up and decides what runs next. It starts the main firmware, and it usually also provides a way to load new firmware over a port such as USB, UART or CAN, without a debug probe.
How it works
On power up, the processor runs the bootloader from a protected region of memory. The bootloader checks for an update request, such as a pin held low, a flag in memory or a message on a port. If one is present, it receives a new image and writes it to flash. If not, it checks the existing image, often by checksum or signature, and jumps to it.
Many microcontrollers include a fixed bootloader in read-only memory, so a blank chip can be programmed over a serial port or USB. Products often add their own bootloader on top for field updates. Standard protocols exist, such as USB Device Firmware Upgrade, defined by the USB Implementers Forum. NIST SP 800-193 gives guidance on protecting and recovering firmware, which applies to how a bootloader checks images.
Secure boot
Secure boot turns that check into a chain of trust. An immutable boot ROM, or a protected first-stage bootloader, holds a public key or its hash in one-time-programmable fuses. At reset it checks the cryptographic signature of the next image before running it, and each stage repeats the check for the next. A checksum catches accidental corruption, and a signature catches tampering. The private signing key never goes on the device, and anti-rollback counters block older signed images with known flaws.
Bootloader vs debug port programming
A debug port, such as JTAG or SWD, gives a programmer direct control of the chip, even when it is blank or its firmware is broken. A bootloader is firmware, so it only works if it is present and intact, but it needs no probe and works over ports the product already exposes.
Why it matters
The bootloader is how most devices are updated after they leave the factory. A bootloader that cannot recover from an interrupted update leaves a dead unit. One that does not check signatures lets anyone load any code. In production, a bootloader can also let boards be flashed through their normal connector instead of a debug fixture.
How to get it right
- Keep the bootloader small, stable and rarely changed.
- Check image signatures or checksums before running new firmware.
- Keep a known-good image or recovery path for interrupted updates.
- Prevent rollback to older, vulnerable firmware where security matters.
- Flash and test the bootloader at production, and record its version per unit.
Bootloaders in robotics and drone hardware
Drones and robots get frequent firmware updates, often over USB, CAN or a radio link. A robust bootloader on each motor controller and sensor module lets the main computer update the whole system, and it keeps a failed update from disabling the machine.
Teams load the bootloader once during firmware flashing over SWD or JTAG, then update application firmware over CAN or USB, often through a flight controller. With secure boot, programming each board's key hash and locking debug access become logged production steps.