-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSConscript
More file actions
80 lines (55 loc) · 2.5 KB
/
Copy pathSConscript
File metadata and controls
80 lines (55 loc) · 2.5 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
from building import *
import os
cwd = GetCurrentDir()
path = [os.path.join(cwd, 'n32h49x_std_periph_driver/inc')]
src_path = os.path.join(cwd, 'n32h49x_std_periph_driver/src')
# Select library file
src = [
os.path.join(src_path, 'misc.c'),
os.path.join(src_path, 'n32h49x_gpio.c'),
os.path.join(src_path, 'n32h49x_dma.c'),
os.path.join(src_path, 'n32h49x_pwr.c'),
os.path.join(src_path, 'n32h49x_rcc.c'),
os.path.join(src_path, 'n32h49x_dbg.c'),
os.path.join(src_path, 'n32h49x_exti.c'),
]
if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']):
src += [os.path.join(src_path, 'n32h49x_usart.c')]
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']) or GetDepend(['RT_USING_PULSE_ENCODER']):
src += [os.path.join(src_path, 'n32h49x_tim.c')]
if GetDepend(['RT_USING_SPI']):
src += [os.path.join(src_path, 'n32h49x_spi.c')]
if GetDepend(['RT_USING_QSPI']):
src += [os.path.join(src_path, 'n32h49x_xspi_v2.c')]
if GetDepend(['RT_USING_I2C']):
src += [os.path.join(src_path, 'n32h49x_i2c.c')]
if GetDepend(['BSP_USING_ETH']):
src += [os.path.join(src_path, 'n32h49x_eth.c')]
if GetDepend(['RT_USING_ADC']):
src += [os.path.join(src_path, 'n32h49x_adc.c')]
if GetDepend(['RT_USING_DAC']):
src += [os.path.join(src_path, 'n32h49x_dac.c')]
if GetDepend(['RT_USING_CAN']):
src += [os.path.join(src_path, 'n32h49x_fdcan.c')]
if GetDepend(['RT_USING_PM']):
src += [os.path.join(src_path, 'n32h49x_pwr.c')]
if GetDepend(['BSP_USING_LPTIM']):
src += [os.path.join(src_path, 'n32h49x_lptim.c')]
if GetDepend(['BSP_USING_SDRAM']):
src += [os.path.join(src_path, 'n32h49x_sdram.c')]
if GetDepend(['RT_USING_RTC']):
src += [os.path.join(src_path, 'n32h49x_rtc.c')]
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
src += [os.path.join(src_path, 'n32h49x_flash.c')]
if GetDepend(['RT_USING_WDT']):
src += [os.path.join(src_path, 'n32h49x_iwdg.c')]
src += [os.path.join(src_path, 'n32h49x_wwdg.c')]
if GetDepend(['RT_USING_SDIO']):
src += [os.path.join(src_path, 'n32h49x_sdio.c')]
if GetDepend(['RT_USING_MTD_NAND']) or GetDepend(['RT_USING_MTD_NOR']) or GetDepend(['BSP_USING_NAND']):
src += [os.path.join(src_path, 'n32h49x_femc.c')]
if GetDepend(['BSP_USING_CLOCK_TIMER']) or GetDepend(['BSP_USING_PWM']) :
src += [os.path.join(src_path, 'n32h49x_tim.c')]
CPPDEFINES = ['USE_STDPERIPH_DRIVER']
group = DefineGroup('Libraries', src, depend = ['PKG_USING_N32H49X_STD_DRIVER'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')