How arksine/katapult works
Katapult is an ARM Cortex-M bootloader for installing firmware on LPC176x, STM32, and RP2040 devices over CAN, USB, or UART. The main workflow is a host operator selecting a target and firmware image, optionally requesting bootloader entry, then transferring an image for programming into flash. The device boot path initializes its platform and scheduler, exposes the bootloader protocol, and handles flash operations. The README documents host-tool capabilities; internal protocol wiring is represented at subsystem level where sampled source does not establish individual calls.
Main entry points: flashtool.py Flash tool · flashcmd.c Flash commands · canserial.c CAN transport · sched.c Scheduler
Components 20
Host flashing
- Flash tool
scripts/flashtool.py - CAN flash helper
scripts/flash_can.py
Bootloader protocol
- Deployer
src/deployer.c - Command handler
src/command.c - Flash commands
src/flashcmd.c
Device runtime
- Boot entry
src/bootentry.c - Scheduler
src/sched.c - CAN transport
src/generic/canserial.c - USB transport
src/generic/usb_cdc.c - UART transport
src/generic/serial_irq.c
Platform hardware
- CAN bus
src/generic/canbus.c - LPC startup
src/lpc176x/main.c - STM32 startup
src/stm32/stm32f0.c - RP2040 startup
src/rp2040/main.c - LPC flash
src/lpc176x/flash.c - STM32 flash
src/stm32/flash.c - RP flash
src/rp2040/flash.c - RP boot ROM
src/rp2040/bootrom.c
Other components
- Operator
- Firmware image
Connections 18
- Operator → Flash tool: selects target
- Operator → Firmware image: provides image
- Flash tool → Firmware image: reads
- Flash tool → Command handler: requests entry or upload
- Flash tool → CAN transport: communicates over CAN
- Flash tool → USB transport: communicates over USB
- Flash tool → UART transport: communicates over UART
- CAN flash helper → CAN transport: flashes CAN devices
- Boot entry → Scheduler: starts runtime
- LPC startup → Scheduler: starts
- RP2040 startup → Scheduler: starts
- Command handler → Flash commands: dispatches commands
- Flash commands → LPC flash: programs flash
- Flash commands → STM32 flash: programs flash
- Flash commands → RP flash: programs flash
- Deployer → Flash commands: uses flash commands
- CAN transport → CAN bus: uses bus
- RP flash → RP boot ROM: uses boot ROM