123456789101112131415161718192021222324252627 |
- import os
- from building import *
- cwd = GetCurrentDir()
- # add the general drivers.
- src = Glob('board.c')
- # add cubemx drivers
- src += Split('''
- CubeMX_Config/Appli/Core/Src/stm32h7rsxx_hal_msp.c
- ''')
- path = [cwd]
- path += [cwd + '/CubeMX_Config/Appli/Core/Inc']
- CPPDEFINES = ['STM32H7S7xx']
- group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
- # if os.path.isfile(os.path.join(cwd, "ports", 'SConscript')):
- # group = group + SConscript(os.path.join("ports", 'SConscript'))
- list = os.listdir(cwd)
- for item in list:
- if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
- group = group + SConscript(os.path.join(item, 'SConscript'))
- Return('group')
|