SConscript 725 B

123456789101112131415161718192021222324252627
  1. import rtconfig
  2. from building import *
  3. # get current directory
  4. cwd = GetCurrentDir()
  5. # The set of source files associated with this SConscript file.
  6. src = Split('''
  7. GD/GD32F4xx/Source/system_gd32f4xx.c
  8. ''')
  9. path = [
  10. cwd + '/GD/GD32F4xx/Include',
  11. cwd,]
  12. if rtconfig.PLATFORM in ['gcc']:
  13. src += ['GD/GD32F4xx/Source/GCC/startup_gd32f4xx.s']
  14. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  15. src += ['GD/GD32F4xx/Source/ARM/startup_gd32f4xx.s']
  16. elif rtconfig.PLATFORM in ['iccarm']:
  17. src += ['GD/GD32F4xx/Source/IAR/startup_gd32f4xx.s']
  18. CPPDEFINES = ['USE_STDPERIPH_DRIVER']
  19. group = DefineGroup('Libraries', src, depend = ['SOC_SERIES_GD32F4xx'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  20. Return('group')