SConscript 595 B

123456789101112131415161718192021222324252627
  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. CPPDEFINES = ['STM32L496xx']
  14. group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  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')