1import os 2from building import * 3 4cwd = GetCurrentDir() 5 6# add general drivers 7src = Split(''' 8board.c 9drv_mpu.c 10CubeMX_Config/Src/stm32h7xx_hal_msp.c 11''') 12 13path = [cwd] 14path += [cwd + '/CubeMX_Config/Inc'] 15 16# STM32H743xx || STM32H750xx || STM32F753xx 17# You can select chips from the list above 18CPPDEFINES = ['STM32H743xx'] 19 20group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path) 21list = os.listdir(cwd) 22for item in list: 23 if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 24 group = group + SConscript(os.path.join(item, 'SConscript')) 25 26Return('group') 27