diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 9ecea37ad4..cc32c49f0f 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -94,6 +94,7 @@ def get_mcu_lib(mcu): def setup_mcu_type_defaults(): '''setup defaults for given mcu type''' + global pincount lib = get_mcu_lib(mcu_type) if hasattr(lib, 'pincount'): pincount = lib.pincount