From 3a5b3b4b1b0b11641b10fd54f1e8422348a4013e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 27 Jun 2018 17:36:48 +1000 Subject: [PATCH] HAL_ChibiOS: fixed adding bootloader to ROMFS --- .../AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index fe127ca6df..61b6904cff 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -954,14 +954,16 @@ def bootloader_path(): return None -def write_ROMFS(outdir): - '''create ROMFS embedded header''' - from embed import create_embedded_h - +def add_bootloader(): + '''added bootloader to ROMFS''' bp = bootloader_path() if bp is not None: romfs.append( ("bootloader.bin", bp) ) +def write_ROMFS(outdir): + '''create ROMFS embedded header''' + from embed import create_embedded_h + create_embedded_h(os.path.join(outdir, 'ap_romfs_embedded.h'), romfs) def write_prototype_file(): @@ -1041,6 +1043,8 @@ def write_hwdef_header(outfilename): else: write_UART_config_bootloader(f) + add_bootloader() + if len(romfs) > 0: f.write('#define HAL_HAVE_AP_ROMFS_EMBEDDED_H 1\n')