1from building import * 2 3cwd = GetCurrentDir() 4 5# add general drivers 6src = Split(''' 7board.c 8CubeMX_Config/Src/stm32l4xx_hal_msp.c 9''') 10 11if GetDepend(['BSP_USING_ON_CHIP_FLASH']): 12 src += Glob('mnt.c') 13 14path = [cwd] 15path += [cwd + '/CubeMX_Config/Inc'] 16path += [cwd + '/ports'] 17 18group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path) 19 20list = os.listdir(cwd) 21for item in list: 22 if os.path.isfile(os.path.join(cwd, item, 'SConscript')): 23 group = group + SConscript(os.path.join(item, 'SConscript')) 24 25Return('group') 26