SConscript 540 B

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