1import rtconfig
2from building import *
3
4# get current directory
5cwd = GetCurrentDir()
6
7# The set of source files associated with this SConscript file.
8cwd = GetCurrentDir()
9
10src = Split('''
11RISCV/env_Eclipse/handlers.c
12RISCV/env_Eclipse/init.c
13RISCV/env_Eclipse/your_printf.c
14RISCV/drivers/n200_func.c
15GD32VF103_standard_peripheral/system_gd32vf103.c
16GD32VF103_standard_peripheral/Source/gd32vf103_gpio.c
17GD32VF103_standard_peripheral/Source/gd32vf103_rcu.c
18GD32VF103_standard_peripheral/Source/gd32vf103_exti.c
19GD32VF103_standard_peripheral/Source/gd32vf103_eclic.c
20''')
21
22if GetDepend(['RT_USING_SERIAL']):
23    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_usart.c']
24
25if GetDepend(['RT_USING_I2C']):
26    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_i2c.c']
27
28if GetDepend(['RT_USING_SPI']):
29    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_spi.c']
30
31if GetDepend(['RT_USING_CAN']):
32    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_can.c']
33
34if GetDepend(['BSP_USING_ETH']):
35    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_enet.c']
36
37if GetDepend(['RT_USING_ADC']):
38    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_adc.c']
39
40if GetDepend(['RT_USING_DAC']):
41    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_dac.c']
42
43if GetDepend(['RT_USING_HWTIMER']):
44    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_timer.c']
45
46if GetDepend(['RT_USING_RTC']):
47    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_rtc.c']
48    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_pmu.c']
49
50if GetDepend(['RT_USING_WDT']):
51    src += ['GD32VF103_standard_peripheral/Source/gd32vf103_wwdgt.c']
52    src += ['GD32VF103_standard_peripheral/Source/gd32vf103fwdgt.c']
53
54path = [
55    cwd + '/RISCV/drivers',
56    cwd + '/GD32VF103_standard_peripheral',
57    cwd + '/GD32VF103_standard_peripheral/Include',]
58
59group = DefineGroup('Libraries', src, depend = [''], CPPPATH = path)
60
61Return('group')
62