1import rtconfig 2from building import * 3 4Import('SDK_LIB') 5 6cwd = GetCurrentDir() 7 8# add the general drivers. 9src = Glob('board.c') 10src += Glob('CubeMX_Config/Src/stm32f7xx_hal_msp.c') 11 12path = [cwd] 13path += [cwd + '/CubeMX_Config/Inc'] 14 15startup_path_prefix = SDK_LIB 16 17if rtconfig.PLATFORM in ['gcc']: 18 src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/gcc/startup_stm32f767xx.s'] 19elif rtconfig.PLATFORM in ['armcc', 'armclang']: 20 src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/arm/startup_stm32f767xx.s'] 21elif rtconfig.PLATFORM in ['iccarm']: 22 src += [startup_path_prefix + '/STM32F7xx_HAL/CMSIS/Device/ST/STM32F7xx/Source/Templates/iar/startup_stm32f767xx.s'] 23 24# STM32F756xx || STM32F746xx || STM32F745xx || STM32F767xx || 25# STM32F769xx || STM32F777xx || STM32F779xx || STM32F722xx || 26# STM32F723xx || STM32F732xx || STM32F733xx || STM32F730xx || STM32F750xx 27# You can select chips from the list above 28CPPDEFINES = ['STM32F767xx'] 29group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 30 31Return('group') 32