HAL_ChibiOS: support ALT_BOARD_ID

allow for compat with px4 board ID for the same board
This commit is contained in:
Andrew Tridgell 2022-02-05 12:41:35 +11:00
parent e96507f55f
commit a641eb3a30
1 changed files with 5 additions and 0 deletions

View File

@ -990,6 +990,11 @@ def write_mcu_config(f):
f.write('\n// APJ board ID (for bootloaders)\n')
f.write('#define APJ_BOARD_ID %s\n' % get_config('APJ_BOARD_ID'))
# support ALT_BOARD_ID for px4 firmware
alt_id = get_config('ALT_BOARD_ID', required=False)
if alt_id is not None:
f.write('#define ALT_BOARD_ID %s\n' % alt_id)
f.write('''
#ifndef HAL_ENABLE_THREAD_STATISTICS
#define HAL_ENABLE_THREAD_STATISTICS FALSE