SConscript 708 B

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