summaryrefslogtreecommitdiff
path: root/bsp/n32/libraries/N32G4FR_Firmware_Library/SConscript
blob: d10b610de1cf918bf4d08a69db22ce7dae0d1487 (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
import rtconfig
from building import *

# get current directory
cwd = GetCurrentDir()

# The set of src files associated with this SConscript file.

src = Split('''
CMSIS/device/system_n32g4fr.c
n32g4fr_std_periph_driver/src/n32g4fr_gpio.c
n32g4fr_std_periph_driver/src/n32g4fr_rcc.c
n32g4fr_std_periph_driver/src/n32g4fr_exti.c
n32g4fr_std_periph_driver/src/misc.c
''')

if GetDepend(['RT_USING_SERIAL']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_usart.c']

if GetDepend(['RT_USING_I2C']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_i2c.c']

if GetDepend(['RT_USING_SPI']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_spi.c']

if GetDepend(['RT_USING_CAN']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_can.c']

if GetDepend(['RT_USING_ADC']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_adc.c']

if GetDepend(['RT_USING_DAC']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_dac.c']

if GetDepend(['RT_USING_HWTIMER']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_tim.c']

if GetDepend(['RT_USING_RTC']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_rtc.c']

if GetDepend(['RT_USING_WDT']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_wwdg.c']
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_iwdg.c']

if GetDepend(['RT_USING_SDIO']):
    src += ['n32g4fr_std_periph_driver/src/n32g4fr_sdio.c']

path = [
    cwd + '/CMSIS/core',
    cwd + '/CMSIS/device',
    cwd + '/CMSIS',
    cwd + '/n32g4fr_std_periph_driver/inc',]

CPPDEFINES = ['USE_STDPERIPH_DRIVER']

group = DefineGroup('libraries', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

Return('group')