blob: 5657d78931353623d7ee1782d9c7717710fb7548 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
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']
src += ['GD32F10x_standard_peripheral/Source/gd32f10x_pmu.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']
src += ['GD32F10x_standard_peripheral/Source/gd32f10x_dma.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')
|