Ardupilot2/Tools/AP_Bootloader
Andrew Tridgell c1ef2e29d7 AP_Bootloader: stay in CAN bootloader if in watchdog reset
if the app has not been running for at least 30s then stay in
bootloader to allow used to load new fw
2019-10-26 15:32:10 +11:00
..
AP_Bootloader.cpp AP_Bootloader: stay in CAN bootloader if in watchdog reset 2019-10-26 15:32:10 +11:00
app_comms.h AP_Bootloader: stay in CAN bootloader if in watchdog reset 2019-10-26 15:32:10 +11:00
bl_protocol.cpp AP_Bootloader: stay in CAN bootloader if in watchdog reset 2019-10-26 15:32:10 +11:00
bl_protocol.h AP_Bootloader: initial version of ChibiOS bootloader 2018-06-22 08:00:31 +10:00
can.cpp AP_Bootloader: stay in CAN bootloader if in watchdog reset 2019-10-26 15:32:10 +11:00
can.h AP_Bootloader: speed up CAN fw load 2019-10-21 19:12:01 +11:00
mcu_f1.h AP_Bootloader: added CAN support for AP_Periph 2019-08-27 10:29:56 +10:00
mcu_f4.h AP_Bootloader: added flash size limiting on old CPUs 2018-06-25 21:22:31 +10:00
mcu_f7.h AP_Bootloader: added mcu files 2018-06-22 08:06:41 +10:00
mcu_h7.h AP_Bootloader: support building on STM32H7 2019-02-26 16:18:26 +11:00
README.md Tools: added bootloader docs 2018-07-04 19:11:10 +10:00
support.cpp AP_Bootloader: fixed uprintf() build 2019-10-21 19:12:01 +11:00
support.h AP_Bootloader: fully working on H7 2019-02-26 16:18:26 +11:00
wscript Tools: fixed build with --out directory for build_binaries 2019-10-25 09:35:27 +11:00

ArduPilot Bootloader

This is the bootloader used for STM32 boards for ArduPilot. To build the bootloader do this:

 ./waf configure --board BOARDNAME --bootloader
 ./waf bootloader

the bootloader will be in build/BOARDNAME/bin. If you have the intelhex module installed it will build in both bin format and hex format. Both are usually uploaded with DFU. The elf file will be in build/BOARDNAME/AP_Bootloader for loading with gdb.

The --bootloader option tells waf to get the hardware config from the hwdef-bl.dat file for the board. It will look in libraries/AP_HAL_CHibiOS/hwdef/BOARDNAME/hwdef-bl.dat

The bootloader protocol is compatible with that used by the PX4 project for boards like the Pixhawk. For compatibility purposes we maintain a list of board IDs here:

https://github.com/ArduPilot/Bootloader/blob/master/board_types.txt

the board IDs in that file match the APJ_BOARD_ID in the hwdef.dat and hwdef-bl.dat files

The bootloader can load from USB or UARTs. The list of devices to load from is given in the UART_ORDER option in hwdef-bl.dat