1import os 2import rtconfig 3from building import * 4 5Import('SDK_LIB') 6 7cwd = GetCurrentDir() 8 9# add general drivers 10src = Split(''' 11board.c 12CubeMX_Config/Src/stm32wbxx_hal_msp.c 13''') 14 15path = [cwd] 16path += [cwd + '/CubeMX_Config/Inc'] 17path += [cwd + '/ports'] 18 19startup_path_prefix = SDK_LIB 20 21if rtconfig.PLATFORM in ['gcc']: 22 src += [startup_path_prefix + '/STM32WBxx_HAL/CMSIS/Device/ST/STM32WBxx/Source/Templates/gcc/startup_stm32wb55xx_cm4.s'] 23elif rtconfig.PLATFORM in ['armcc', 'armclang']: 24 src += [startup_path_prefix + '/STM32WBxx_HAL/CMSIS/Device/ST/STM32WBxx/Source/Templates/arm/startup_stm32wb55xx_cm4.s'] 25elif rtconfig.PLATFORM in ['iccarm']: 26 src += [startup_path_prefix + '/STM32WBxx_HAL/CMSIS/Device/ST/STM32WBxx/Source/Templates/iar/startup_stm32wb55xx_cm4.s'] 27 28# You can select chips from the list above 29CPPDEFINES = ['STM32WB55xx'] 30group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 31 32Return('group') 33 34