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/stm32h7xx_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 + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s'] 19elif rtconfig.PLATFORM in ['armcc', 'armclang']: 20 src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h743xx.s'] 21elif rtconfig.PLATFORM in ['iccarm']: 22 src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h743xx.s'] 23 24# STM32H743xx || STM32H750xx || STM32F753xx 25# You can select chips from the list above 26CPPDEFINES = ['STM32H743xx'] 27group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES) 28 29Return('group') 30