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