From 1e16568618e4f198a7d0af123ddf75a527e0f563 Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Mon, 26 Feb 2024 11:26:20 +0000 Subject: [PATCH] AP_HAL_ChibiOS: remove iomcu dshot from Pixhawk1-1M and add to Pixhawk1-bdshot add support for removing ROMFS from hwdef --- libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat | 5 +++++ libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-bdshot/hwdef.dat | 4 ++++ libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 2 ++ 3 files changed, 11 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat index 096e1fdfd5ec1..b0c52d2c35225 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-1M/hwdef.dat @@ -13,3 +13,8 @@ undef STORAGE_FLASH_PAGE # produce this error if we are on a 2M board and using 1M firmware define BOARD_CHECK_F427_USE_2M "2M flash - use Pixhawk1 firmware" + +# enable support for dshot on iomcu +undef ROMFS +ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_lowpolh.bin +undef HAL_WITH_IO_MCU_DSHOT \ No newline at end of file diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-bdshot/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-bdshot/hwdef.dat index 67ea0aae84d5d..3aca8a528df99 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-bdshot/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk1-bdshot/hwdef.dat @@ -36,3 +36,7 @@ define HAL_PROBE_EXTERNAL_I2C_COMPASSES # produce this error if we are on a 1M board undef BOARD_CHECK_F427_USE_1M define BOARD_CHECK_F427_USE_1M "ERROR: 1M flash use Pixhawk1-1M" + +# enable support for dshot on iomcu +ROMFS io_firmware_dshot.bin Tools/IO_Firmware/iofirmware_dshot_lowpolh.bin +define HAL_WITH_IO_MCU_DSHOT 1 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index a9d8521ef3076..b883071565f66 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -3049,6 +3049,8 @@ def process_line(self, line): self.baro_list = [] if u == 'AIRSPEED': self.airspeed_list = [] + if u == 'ROMFS': + self.romfs = {} elif a[0] == 'env': self.progress("Adding environment %s" % ' '.join(a[1:])) if len(a[1:]) < 2: