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