SConscript 658 B

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