From 25cc8203d8c89a5a36d628b7875fe61fff710f43 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 21 Feb 2022 13:53:41 +1100 Subject: [PATCH] HAL_ChibiOS: added CHIBIOS_BOARD_NAME define --- libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index bf49f1b14a..99232ffb20 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -801,6 +801,7 @@ def validate_flash_storage_size(): def write_mcu_config(f): '''write MCU config defines''' + f.write('#define CHIBIOS_BOARD_NAME "%s"\n' % os.path.basename(os.path.dirname(args.hwdef[0]))) f.write('// MCU type (ChibiOS define)\n') f.write('#define %s_MCUCONF\n' % get_config('MCU')) mcu_subtype = get_config('MCU', 1)