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