SConscript 726 B

12345678910111213141516171819202122232425262728
  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/GD32F5xx/Source/system_gd32f5xx.c
  8. ''')
  9. path = [
  10. cwd + '/GD/GD32F5xx/Include',
  11. cwd,
  12. ]
  13. if rtconfig.PLATFORM in ['gcc']:
  14. src += ['GD/GD32F5xx/Source/GCC/startup_gd32f5xx.s']
  15. elif rtconfig.PLATFORM in ['armcc', 'armclang']:
  16. src += ['GD/GD32F5xx/Source/ARM/startup_gd32f5xx.s']
  17. elif rtconfig.PLATFORM in ['iccarm']:
  18. src += ['GD/GD32F5xx/Source/IAR/startup_gd32f5xx.s']
  19. CPPDEFINES = ['USE_STDPERIPH_DRIVER']
  20. group = DefineGroup('Libraries', src, depend = ['SOC_SERIES_GD32F5xx'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  21. Return('group')