summaryrefslogtreecommitdiff
path: root/bsp/gd32/libraries/GD32F10x_Firmware_Library/SConscript
diff options
context:
space:
mode:
authorOuxiaolong <[email protected]>2022-01-02 09:14:03 +0800
committerOuxiaolong <[email protected]>2022-01-02 09:14:03 +0800
commit42fdef91a8700a7b128de0e2eaeec59ffd159d73 (patch)
tree9006a10e12c10c4499ab3e4018126d1814b9c561 /bsp/gd32/libraries/GD32F10x_Firmware_Library/SConscript
parent09c089d51194ccaed497fc43d8f4db007ea34d80 (diff)
[bsp]gd32105r-start, gd32205r-start, gd32305r-start
Diffstat (limited to 'bsp/gd32/libraries/GD32F10x_Firmware_Library/SConscript')
-rw-r--r--bsp/gd32/libraries/GD32F10x_Firmware_Library/SConscript60
1 files changed, 60 insertions, 0 deletions
diff --git a/bsp/gd32/libraries/GD32F10x_Firmware_Library/SConscript b/bsp/gd32/libraries/GD32F10x_Firmware_Library/SConscript
new file mode 100644
index 0000000000..f5004445c0
--- /dev/null
+++ b/bsp/gd32/libraries/GD32F10x_Firmware_Library/SConscript
@@ -0,0 +1,60 @@
+import rtconfig
+from building import *
+
+# get current directory
+cwd = GetCurrentDir()
+
+# The set of source files associated with this SConscript file.
+
+src = Split('''
+CMSIS/GD/GD32F10x/Source/system_gd32f10x.c
+GD32F10x_standard_peripheral/Source/gd32f10x_gpio.c
+GD32F10x_standard_peripheral/Source/gd32f10x_rcu.c
+GD32F10x_standard_peripheral/Source/gd32f10x_exti.c
+GD32F10x_standard_peripheral/Source/gd32f10x_misc.c
+''')
+
+if GetDepend(['RT_USING_SERIAL']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_usart.c']
+
+if GetDepend(['RT_USING_I2C']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_i2c.c']
+
+if GetDepend(['RT_USING_SPI']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_spi.c']
+
+if GetDepend(['RT_USING_CAN']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_can.c']
+
+if GetDepend(['BSP_USING_ETH']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_enet.c']
+
+if GetDepend(['RT_USING_ADC']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_adc.c']
+
+if GetDepend(['RT_USING_DAC']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_dac.c']
+
+if GetDepend(['RT_USING_HWTIMER']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_timer.c']
+
+if GetDepend(['RT_USING_RTC']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_rtc.c']
+
+if GetDepend(['RT_USING_WDT']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_wwdgt.c']
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_fwdgt.c']
+
+if GetDepend(['RT_USING_SDIO']):
+ src += ['GD32F10x_standard_peripheral/Source/gd32f10x_sdio.c']
+
+path = [
+ cwd + '/CMSIS/GD/GD32F10x/Include',
+ cwd + '/CMSIS',
+ cwd + '/GD32F10x_standard_peripheral/Include',]
+
+CPPDEFINES = ['USE_STDPERIPH_DRIVER']
+
+group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+
+Return('group')