mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-12 10:58:30 -04:00
HAL_ChibiOS: setup APJ board IDs in environment
This commit is contained in:
parent
3471a5d567
commit
f03893c2f8
@ -967,24 +967,10 @@ def write_ROMFS(outdir):
|
|||||||
romfs_list.append((k, romfs[k]))
|
romfs_list.append((k, romfs[k]))
|
||||||
env_vars['ROMFS_FILES'] = romfs_list
|
env_vars['ROMFS_FILES'] = romfs_list
|
||||||
|
|
||||||
def write_prototype_file():
|
def setup_apj_IDs():
|
||||||
'''write the prototype file for apj generation'''
|
'''setup the APJ board IDs'''
|
||||||
pf = open(os.path.join(outdir, "apj.prototype"), "w")
|
env_vars['APJ_BOARD_ID'] = get_config('APJ_BOARD_ID')
|
||||||
pf.write('''{
|
env_vars['APJ_BOARD_TYPE'] = get_config('APJ_BOARD_TYPE', default=mcu_type)
|
||||||
"board_id": %s,
|
|
||||||
"magic": "PX4FWv1",
|
|
||||||
"description": "Firmware for the %s board",
|
|
||||||
"image": "",
|
|
||||||
"build_time": 0,
|
|
||||||
"summary": "PX4FMUv3",
|
|
||||||
"version": "0.1",
|
|
||||||
"image_size": 0,
|
|
||||||
"git_identity": "",
|
|
||||||
"board_revision": 0
|
|
||||||
}
|
|
||||||
''' % (get_config('APJ_BOARD_ID'),
|
|
||||||
get_config('APJ_BOARD_TYPE', default=mcu_type)))
|
|
||||||
|
|
||||||
|
|
||||||
def write_peripheral_enable(f):
|
def write_peripheral_enable(f):
|
||||||
'''write peripheral enable lines'''
|
'''write peripheral enable lines'''
|
||||||
@ -1030,7 +1016,7 @@ def write_hwdef_header(outfilename):
|
|||||||
write_GPIO_config(f)
|
write_GPIO_config(f)
|
||||||
|
|
||||||
write_peripheral_enable(f)
|
write_peripheral_enable(f)
|
||||||
write_prototype_file()
|
setup_apj_IDs()
|
||||||
|
|
||||||
dma_resolver.write_dma_header(f, periph_list, mcu_type,
|
dma_resolver.write_dma_header(f, periph_list, mcu_type,
|
||||||
dma_exclude=get_dma_exclude(periph_list),
|
dma_exclude=get_dma_exclude(periph_list),
|
||||||
|
Loading…
Reference in New Issue
Block a user