From 4b747430e1b72ba2cec9a0964db00ea7bc4ada5f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 23 Sep 2020 16:10:11 +1000 Subject: [PATCH] HAL_ChibiOS: save 2k in f103 bootloader don't include serial bl support if dev list is empty --- libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index b56efc6cc8..fc377c427d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -1252,7 +1252,8 @@ def write_UART_config_bootloader(f): unum = int(u[-1]) devlist.append('(BaseChannel *)&SD%u' % unum) have_uart = True - f.write('#define BOOTLOADER_DEV_LIST %s\n' % ','.join(devlist)) + if len(devlist) > 0: + f.write('#define BOOTLOADER_DEV_LIST %s\n' % ','.join(devlist)) if OTG2_index is not None: f.write('#define HAL_OTG2_UART_INDEX %d\n' % OTG2_index) if not have_uart: