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