SConscript 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. CMSIS/GD/GD32F10x/Source/system_gd32f10x.c
  8. GD32F10x_standard_peripheral/Source/gd32f10x_gpio.c
  9. GD32F10x_standard_peripheral/Source/gd32f10x_rcu.c
  10. GD32F10x_standard_peripheral/Source/gd32f10x_exti.c
  11. GD32F10x_standard_peripheral/Source/gd32f10x_misc.c
  12. ''')
  13. if GetDepend(['RT_USING_SERIAL']):
  14. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_usart.c']
  15. if GetDepend(['RT_USING_I2C']):
  16. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_i2c.c']
  17. if GetDepend(['RT_USING_SPI']):
  18. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_spi.c']
  19. if GetDepend(['RT_USING_CAN']):
  20. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_can.c']
  21. if GetDepend(['BSP_USING_ETH']):
  22. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_enet.c']
  23. if GetDepend(['RT_USING_ADC']):
  24. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_adc.c']
  25. if GetDepend(['RT_USING_DAC']):
  26. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_dac.c']
  27. if GetDepend(['RT_USING_HWTIMER']):
  28. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_timer.c']
  29. if GetDepend(['RT_USING_RTC']):
  30. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_rtc.c']
  31. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_pmu.c']
  32. if GetDepend(['RT_USING_WDT']):
  33. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_wwdgt.c']
  34. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_fwdgt.c']
  35. if GetDepend(['RT_USING_SDIO']):
  36. src += ['GD32F10x_standard_peripheral/Source/gd32f10x_sdio.c']
  37. path = [
  38. cwd + '/CMSIS/GD/GD32F10x/Include',
  39. cwd + '/CMSIS',
  40. cwd + '/GD32F10x_standard_peripheral/Include',]
  41. CPPDEFINES = ['USE_STDPERIPH_DRIVER']
  42. group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  43. Return('group')