HAL_ChibiOS: fixed adding bootloader to ROMFS

This commit is contained in:
Andrew Tridgell 2018-06-27 17:36:48 +10:00
parent e332bece0f
commit 3a5b3b4b1b
1 changed files with 8 additions and 4 deletions

View File

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