How alkamotors/am32_bootloader_f051 works
This repository implements an STM32F0 serial bootloader. Its main firmware initializes the MCU, receives and decodes commands, checks CRCs, and serves acknowledgements or flash data; flash helpers provide the read/write operations, while a jump routine can transfer control to the application. The excerpts show command decoding, timer use, and flash-read calls, but omit much of the serial and flash implementation, so those links are limited to relationships evidenced by the index or excerpts.
Main entry points: main.c Bootloader control · stm32f051x8.h STM32F0 device layer · system_stm32f0xx.c System setup · bootloader.c Flash operations
Components 12
Bootloader firmware
- Bootloader control
Core/Src/main.c - Flash operations
Core/Src/bootloader.c - Interrupt handlers
Core/Src/stm32f0xx_it.c
MCU support
- System setup
Core/Src/system_stm32f0xx.c - STM32F0 device layer
Drivers/CMSIS/Device/ST/STM32F0xx/Include/stm32f051x8.h - CMSIS compiler layer
Drivers/CMSIS/Include/cmsis_compiler.h
Peripheral drivers
- HAL services
Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c - Timer driver
Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c - Low-level timer
Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_tim.h - Low-level DMA
Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_dma.h - Low-level clocks
Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_ll_rcc.h
Other components
- Serial host
Connections 8
- Serial host → Bootloader control: sends commands
- Bootloader control → Flash operations: reads flash
Core/Src/main.c - Bootloader control → Timer driver: uses timer
- Bootloader control → Low-level timer: configures timer
- Bootloader control → Low-level DMA: includes support
- Bootloader control → Low-level clocks: configures clocks
- System setup → STM32F0 device layer: uses device definitions
Core/Src/system_stm32f0xx.c - STM32F0 device layer → CMSIS compiler layer: uses compiler layer