From 22f74b08271d8fc338bf8e32a2e637acb1afdb83 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Tue, 18 Sep 2018 16:23:32 +0530 Subject: [PATCH] HAL_ChibiOS: add option to set iomcu firmware environment var --- libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat | 1 + libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat index 5421973872..70bf534af5 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat @@ -98,5 +98,6 @@ define DMA_RESERVE_SIZE 0 define IOMCU_FW TRUE +IOMCU_FW 1 MAIN_STACK 0x200 PROCESS_STACK 0x250 \ No newline at end of file diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 93a97c48ee..bb39a2a16c 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -487,7 +487,12 @@ def write_mcu_config(f): env_vars['MAIN_STACK'] = get_config('MAIN_STACK') else: env_vars['MAIN_STACK'] = "0x400" - + + if get_config('IOMCU_FW', required=False): + env_vars['IOMCU_FW'] = get_config('IOMCU_FW') + else: + env_vars['IOMCU_FW'] = 0 + # write any custom STM32 defines for d in alllines: if d.startswith('STM32_'):