SConscript 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. GD32H7xx_standard_peripheral/Source/gd32h7xx_gpio.c
  8. GD32H7xx_standard_peripheral/Source/gd32h7xx_rcu.c
  9. GD32H7xx_standard_peripheral/Source/gd32h7xx_exti.c
  10. GD32H7xx_standard_peripheral/Source/gd32h7xx_misc.c
  11. GD32H7xx_standard_peripheral/Source/gd32h7xx_syscfg.c
  12. GD32H7xx_standard_peripheral/Source/gd32h7xx_pmu.c
  13. GD32H7xx_standard_peripheral/Source/gd32h7xx_dma.c
  14. ''')
  15. if GetDepend(['RT_USING_SERIAL']):
  16. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_usart.c']
  17. if GetDepend(['RT_USING_I2C']):
  18. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_i2c.c']
  19. if GetDepend(['RT_USING_SPI']):
  20. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_spi.c']
  21. if GetDepend(['RT_USING_CAN']):
  22. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_can.c']
  23. if GetDepend(['BSP_USING_ETH']):
  24. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_enet.c']
  25. if GetDepend(['RT_USING_ADC']):
  26. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_adc.c']
  27. if GetDepend(['RT_USING_DAC']):
  28. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_dac.c']
  29. if GetDepend(['RT_USING_RTC']):
  30. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_rtc.c']
  31. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_pmu.c']
  32. if GetDepend(['RT_USING_WDT']):
  33. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_wwdgt.c']
  34. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_fwdgt.c']
  35. if GetDepend(['RT_USING_SDIO']):
  36. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_sdio.c']
  37. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_dma.c']
  38. if GetDepend(['BSP_USING_SDRAM']):
  39. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_fmc.c']
  40. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_exmc.c']
  41. if GetDepend(['BSP_USING_TLI']):
  42. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_tli.c']
  43. src += ['GD32H7xx_standard_peripheral/Source/gd32h7xx_ipa.c']
  44. path = [cwd + '/GD32H7xx_standard_peripheral/Include']
  45. CPPDEFINES = ['USE_STDPERIPH_DRIVER']
  46. group = DefineGroup('Libraries', src, depend = ['SOC_SERIES_GD32H7xx'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
  47. Return('group')