SConscript 736 B

1234567891011121314151617181920212223242526
  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 = Glob('GD32F1xx_standard_peripheral/Source/*.c')
  7. src += [cwd + '/CMSIS/GD/GD32F1xx/Source/system_gd32f1xx.c']
  8. #add for startup script
  9. if rtconfig.CROSS_TOOL == 'gcc':
  10. src += [cwd + '/CMSIS/GD/GD32F1xx/Source/GCC/startup_gd32.s']
  11. src += [cwd + '/CMSIS/GD/GD32F1xx/Source/GCC/isr_tab.s']
  12. path = [
  13. cwd + '/CMSIS/GD/GD32F1xx/Include',
  14. cwd + '/CMSIS',
  15. cwd + '/GD32F1xx_standard_peripheral/Include',]
  16. CPPDEFINES = ['USE_STDPERIPH_DRIVER', 'GD32F1XX']
  17. group = DefineGroup('GD32_Lib', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  18. Return('group')