From b808351f2afad9a61f02002ac7d6d13e67bb7c44 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 29 Aug 2022 15:49:08 +1000 Subject: [PATCH] hwdef: enable DFU on some boards --- libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef-bl.inc | 4 ++-- libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.inc | 6 ++++-- libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef-bl.dat | 3 +++ libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat | 6 ++++-- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat | 3 +++ libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat | 5 +++++ 6 files changed, 21 insertions(+), 6 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef-bl.inc b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef-bl.inc index 7d2aea6ac5..272295bf94 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef-bl.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef-bl.inc @@ -61,5 +61,5 @@ PD10 FRAM_CS CS SPEED_VERYLOW PE3 VDD_3V3_SENSORS_EN OUTPUT LOW PA8 nVDD_5V_PERIPH_EN OUTPUT LOW -# uncomment to enable DFU reboot -# ENABLE_DFU_BOOT 1 +# enable DFU by default +ENABLE_DFU_BOOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.inc b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.inc index 890c6c6ad5..f7b5bd8825 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/CubeOrange/hwdef.inc @@ -336,5 +336,7 @@ define HAL_SOLO_GIMBAL_ENABLED HAL_MOUNT_ENABLED # Enable Sagetech MXS ADSB transponder define HAL_ADSB_SAGETECH_MXS_ENABLED HAL_ADSB_ENABLED -# uncomment to enable DFU reboot -# ENABLE_DFU_BOOT 1 +# enable DFU reboot for installing bootloader +# note that if firmware is build with --secure-bl then DFU is +# disabled +ENABLE_DFU_BOOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef-bl.dat index ce08ee462c..cedeba3938 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef-bl.dat @@ -60,3 +60,6 @@ PI6 EXT2_CS1 CS PI7 EXT2_CS2 CS PI8 EXT2_CS3 CS PH5 TSENSE_CS CS + +# enable DFU by default +ENABLE_DFU_BOOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat index 343ece279d..873e63525d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Durandal/hwdef.dat @@ -349,5 +349,7 @@ define HAL_BATT_CURR_SCALE 36.364 # Enable Sagetech MXS ADSB transponder define HAL_ADSB_SAGETECH_MXS_ENABLED HAL_ADSB_ENABLED -# uncomment to enable DFU boot -# ENABLE_DFU_BOOT 1 +# enable DFU reboot for installing bootloader +# note that if firmware is build with --secure-bl then DFU is +# disabled +ENABLE_DFU_BOOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat index f24632a34c..a5441cf790 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef-bl.dat @@ -71,3 +71,6 @@ define HAL_LED_ON 0 define HAL_USE_EMPTY_STORAGE 1 define HAL_STORAGE_SIZE 16384 + +# enable DFU by default +ENABLE_DFU_BOOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat index 86124e0af3..d0399f2075 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat @@ -364,3 +364,8 @@ define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS" define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN" ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_lowpolh.bin + +# enable DFU reboot for installing bootloader +# note that if firmware is build with --secure-bl then DFU is +# disabled +ENABLE_DFU_BOOT 1