summaryrefslogtreecommitdiff
path: root/bsp/gd32/libraries/GD32F20x_Firmware_Library/SConscript
diff options
context:
space:
mode:
authorWayne Lin <[email protected]>2022-01-10 12:36:11 +0800
committerWayne Lin <[email protected]>2022-01-10 12:36:11 +0800
commit715eecd3eb6cfbbc95aba4fdf932db2e1a7698fb (patch)
tree111003eb53eaa4a789729792a622d2abfd602031 /bsp/gd32/libraries/GD32F20x_Firmware_Library/SConscript
parent6d2a7d00db2808f26b96efaebfa3aa18b6fd47b8 (diff)
parent5206f6504018d1e1978e1c547f6a5b782d505be5 (diff)
Merge branch 'master' of https://github.com/RT-Thread/rt-thread into nuvoton
# Conflicts: # bsp/nuvoton/nk-980iot/.config # bsp/nuvoton/nk-n9h30/.config # bsp/nuvoton/nk-rtu980/.config # bsp/nuvoton/numaker-iot-m487/.config # bsp/nuvoton/numaker-m2354/.config # bsp/nuvoton/numaker-pfm-m487/.config
Diffstat (limited to 'bsp/gd32/libraries/GD32F20x_Firmware_Library/SConscript')
-rw-r--r--bsp/gd32/libraries/GD32F20x_Firmware_Library/SConscript57
1 files changed, 57 insertions, 0 deletions
diff --git a/bsp/gd32/libraries/GD32F20x_Firmware_Library/SConscript b/bsp/gd32/libraries/GD32F20x_Firmware_Library/SConscript
new file mode 100644
index 0000000000..90cca69a13
--- /dev/null
+++ b/bsp/gd32/libraries/GD32F20x_Firmware_Library/SConscript
@@ -0,0 +1,57 @@
+import rtconfig
+from building import *
+
+# get current directory
+cwd = GetCurrentDir()
+
+# The set of source files associated with this SConscript file.
+
+src = Split('''
+CMSIS/GD/GD32F20x/Source/system_gd32f20x.c
+GD32F20x_standard_peripheral/Source/gd32f20x_gpio.c
+GD32F20x_standard_peripheral/Source/gd32f20x_rcu.c
+GD32F20x_standard_peripheral/Source/gd32f20x_exti.c
+GD32F20x_standard_peripheral/Source/gd32f20x_misc.c
+''')
+
+if GetDepend(['RT_USING_SERIAL']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_usart.c']
+
+if GetDepend(['RT_USING_I2C']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_i2c.c']
+
+if GetDepend(['RT_USING_SPI']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_spi.c']
+
+if GetDepend(['RT_USING_CAN']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_can.c']
+
+if GetDepend(['BSP_USING_ETH']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_enet.c']
+
+if GetDepend(['RT_USING_ADC']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_adc.c']
+
+if GetDepend(['RT_USING_DAC']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_dac.c']
+
+if GetDepend(['RT_USING_RTC']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_rtc.c']
+
+if GetDepend(['RT_USING_WDT']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_wwdgt.c']
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_fwdgt.c']
+
+if GetDepend(['RT_USING_SDIO']):
+ src += ['GD32F20x_standard_peripheral/Source/gd32f20x_sdio.c']
+
+path = [
+ cwd + '/CMSIS/GD/GD32F20x/Include',
+ cwd + '/CMSIS',
+ cwd + '/GD32F20x_standard_peripheral/Include',]
+
+CPPDEFINES = ['USE_STDPERIPH_DRIVER']
+
+group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
+
+Return('group')