forked from STMicroelectronics/stm32l4xx-hal-driver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SConscript
115 lines (90 loc) · 4.43 KB
/
SConscript
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
from building import *
import os
cwd = GetCurrentDir()
path = [os.path.join(cwd, 'Inc')]
src_path = os.path.join(cwd, 'Src')
CPPDEFINES = ['USE_HAL_DRIVER']
src = [
os.path.join(src_path, 'stm32l4xx_hal.c'),
os.path.join(src_path, 'stm32l4xx_hal_comp.c'),
os.path.join(src_path, 'stm32l4xx_hal_cortex.c'),
os.path.join(src_path, 'stm32l4xx_hal_crc.c'),
os.path.join(src_path, 'stm32l4xx_hal_crc_ex.c'),
os.path.join(src_path, 'stm32l4xx_hal_cryp.c'),
os.path.join(src_path, 'stm32l4xx_hal_cryp_ex.c'),
os.path.join(src_path, 'stm32l4xx_hal_dma.c'),
os.path.join(src_path, 'stm32l4xx_hal_dma_ex.c'),
os.path.join(src_path, 'stm32l4xx_hal_exti.c'),
os.path.join(src_path, 'stm32l4xx_hal_pwr.c'),
os.path.join(src_path, 'stm32l4xx_hal_pwr_ex.c'),
os.path.join(src_path, 'stm32l4xx_hal_rcc.c'),
os.path.join(src_path, 'stm32l4xx_hal_rcc_ex.c'),
os.path.join(src_path, 'stm32l4xx_hal_rng.c'),
os.path.join(src_path, 'stm32l4xx_hal_gpio.c'),
]
if GetDepend(['RT_USING_SERIAL']) or GetDepend(['RT_USING_NANO', 'RT_USING_CONSOLE']):
src += [os.path.join(src_path, 'stm32l4xx_hal_uart.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_uart_ex.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_usart.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_usart_ex.c')]
if GetDepend(['RT_USING_I2C']):
src += [os.path.join(src_path, 'stm32l4xx_hal_i2c.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_i2c_ex.c')]
if GetDepend(['RT_USING_SPI']):
src += [os.path.join(src_path, 'stm32l4xx_hal_spi.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_spi_ex.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_qspi.c')]
if GetDepend(['RT_USING_USB']):
src += [os.path.join(src_path, 'stm32l4xx_hal_hcd.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_pcd.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_pcd_ex.c')]
src += [os.path.join(src_path, 'stm32l4xx_ll_usb.c')]
if GetDepend(['RT_USING_CAN']):
src += [os.path.join(src_path, 'stm32l4xx_hal_can.c')]
if GetDepend(['RT_USING_HWTIMER']) or GetDepend(['RT_USING_PWM']):
src += [os.path.join(src_path, 'stm32l4xx_hal_lptim.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_tim.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_tim_ex.c')]
if GetDepend(['RT_USING_ADC']):
src += [os.path.join(src_path, 'stm32l4xx_hal_adc.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_adc_ex.c')]
if GetDepend(['RT_USING_DAC']):
src += [os.path.join(src_path, 'stm32l4xx_hal_dac.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_dac_ex.c')]
if GetDepend(['RT_USING_RTC']):
src += [os.path.join(src_path, 'stm32l4xx_hal_rtc.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_rtc_ex.c')]
if GetDepend(['RT_USING_WDT']):
src += [os.path.join(src_path, 'stm32l4xx_hal_iwdg.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_wwdg.c')]
if GetDepend(['RT_USING_SDIO']):
src += [os.path.join(src_path, 'stm32l4xx_hal_sd.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_sd_ex.c')]
src += [os.path.join(src_path, 'stm32l4xx_ll_sdmmc.c')]
if GetDepend(['RT_USING_AUDIO']):
src += [os.path.join(src_path, 'stm32l4xx_hal_sai.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_sai_ex.c')]
if GetDepend(['RT_USING_MTD_NOR']):
src += [os.path.join(src_path, 'stm32l4xx_hal_nor.c')]
if GetDepend(['RT_USING_MTD_NAND']):
src += [os.path.join(src_path, 'stm32l4xx_hal_nand.c')]
if GetDepend(['RT_USING_PM']):
src += [os.path.join(src_path, 'stm32l4xx_hal_lptim.c')]
if GetDepend(['BSP_USING_ON_CHIP_FLASH']):
src += [os.path.join(src_path, 'stm32l4xx_hal_flash.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_flash_ex.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_flash_ramfunc.c')]
if GetDepend(['BSP_USING_FMC']):
src += [os.path.join(src_path, 'stm32l4xx_ll_fmc.c')]
if GetDepend(['BSP_USING_GFXMMU']):
src += [os.path.join(src_path, 'stm32l4xx_hal_gfxmmu.c')]
if GetDepend(['BSP_USING_DSI']):
src += [os.path.join(src_path, 'stm32l4xx_hal_dsi.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_dma2d.c')]
src += [os.path.join(src_path, 'stm32l4xx_ll_dma2d.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_ltdc.c')]
src += [os.path.join(src_path, 'stm32l4xx_hal_ltdc_ex.c')]
if GetDepend(['BSP_USING_SRAM']):
src += [os.path.join(src_path, 'stm32l4xx_hal_sram.c')]
group = DefineGroup('STM32L4-HAL', src, depend = ['PKG_USING_STM32L4_HAL_DRIVER'], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')