HAL_ChibiOS: use AP_PERIPH env var

This commit is contained in:
Andrew Tridgell 2019-07-25 19:13:26 +10:00
parent cbc83d68cd
commit c8806acaf5
3 changed files with 7 additions and 1 deletions

View File

@ -9,6 +9,9 @@ FLASH_BOOTLOADER_LOAD_KB 25
# board ID for firmware load
APJ_BOARD_ID 3
# setup build for a peripheral firmware
env AP_PERIPH 1
# crystal frequency
OSCILLATOR_HZ 8000000

View File

@ -13,6 +13,9 @@ define HAL_STORAGE_SIZE 800
# board ID for firmware load
APJ_BOARD_ID 3
# setup build for a peripheral firmware
env AP_PERIPH 1
# crystal frequency
OSCILLATOR_HZ 8000000

View File

@ -551,7 +551,7 @@ def write_mcu_config(f):
f.write('#define HAL_USE_SERIAL_USB TRUE\n')
if 'OTG2' in bytype:
f.write('#define STM32_USB_USE_OTG2 TRUE\n')
if have_type_prefix('CAN') and not mcu_series.startswith("STM32F1"):
if have_type_prefix('CAN') and not 'AP_PERIPH' in env_vars:
enable_can(f)
if get_config('PROCESS_STACK', required=False):