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')