HAL_ChibiOS: save 2k in f103 bootloader

don't include serial bl support if dev list is empty
This commit is contained in:
Andrew Tridgell 2020-09-23 16:10:11 +10:00 committed by Peter Barker
parent 6fb973081b
commit 4b747430e1

View File

@ -1252,6 +1252,7 @@ def write_UART_config_bootloader(f):
unum = int(u[-1]) unum = int(u[-1])
devlist.append('(BaseChannel *)&SD%u' % unum) devlist.append('(BaseChannel *)&SD%u' % unum)
have_uart = True have_uart = True
if len(devlist) > 0:
f.write('#define BOOTLOADER_DEV_LIST %s\n' % ','.join(devlist)) f.write('#define BOOTLOADER_DEV_LIST %s\n' % ','.join(devlist))
if OTG2_index is not None: if OTG2_index is not None:
f.write('#define HAL_OTG2_UART_INDEX %d\n' % OTG2_index) f.write('#define HAL_OTG2_UART_INDEX %d\n' % OTG2_index)