Custom STM32 bootloader
Dairycs · Alpha Mark 2 milking robot
Field robots need new firmware without anyone opening the cabinet. I designed a bootloader that takes a new image over UART, manages the flash itself, and only hands control to an application that checks out.
STM32 · UART · Flash · Cortex‑M
- Reset lands in the bootloader.
- Listen briefly for an update request on UART.
- If one comes: erase the application sectors and write the new image in chunks.
- Check the application before trusting it.
- Hand over: interrupts off, vector table to the app, load its stack pointer, jump to its reset handler.