summaryrefslogtreecommitdiff
path: root/bsp/n32/libraries/N32WB452_Firmware_Library/SConscript
blob: ec1ac4502aec4c23fc30c32169f0a72a516b7bef (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
63
64
65
66
import rtconfig
Import('RTT_ROOT')
from building import *

# get current directory
cwd = GetCurrentDir()

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

src = Split('''
CMSIS/device/system_n32wb452.c
n32wb452_std_periph_driver/src/n32wb452_gpio.c
n32wb452_std_periph_driver/src/n32wb452_rcc.c
n32wb452_std_periph_driver/src/n32wb452_exti.c
n32wb452_std_periph_driver/src/misc.c
''')

if GetDepend(['RT_USING_SERIAL']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_usart.c']

if GetDepend(['RT_USING_I2C']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_i2c.c']

if GetDepend(['RT_USING_SPI']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_spi.c']

if GetDepend(['RT_USING_CAN']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_can.c']

if GetDepend(['RT_USING_ADC']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_adc.c']

if GetDepend(['RT_USING_DAC']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_dac.c']

if GetDepend(['RT_USING_HWTIMER']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_tim.c']

if GetDepend(['RT_USING_RTC']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_rtc.c']
    src += ['n32wb452_std_periph_driver/src/n32wb452_pwr.c']
    src += ['n32wb452_std_periph_driver/src/n32wb452_bkp.c']

if GetDepend(['RT_USING_WDT']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_wwdg.c']
    src += ['n32wb452_std_periph_driver/src/n32wb452_iwdg.c']

if GetDepend(['RT_USING_SDIO']):
    src += ['n32wb452_std_periph_driver/src/n32wb452_sdio.c']

if GetDepend(['RT_USING_BSP_USB']):
    path += [cwd + '/n32wb452_usbfs_driver/inc']
    src  += [cwd + '/n32wb452_usbfs_driver/src']

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

CPPDEFINES = ['USE_STDPERIPH_DRIVER']



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

Return('group')