1import os 2from building import * 3 4cwd = GetCurrentDir() 5 6# add general drivers 7src = Split(''' 8board.c 9CubeMX_Config/Src/stm32f4xx_hal_msp.c 10''') 11path = [cwd] 12path += [os.path.join(cwd, 'CubeMX_Config', 'Inc')] 13 14group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path) 15 16 17# if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')): 18# group = group + SConscript(os.path.join("ports", 'SConscript')) 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