blob: ce06d43d1d40927289053ad2cbdaa3ae30ae2ecf (
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
|
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/ST/STM32L0xx/Source/Templates/system_stm32l0xx.c
""")
src += Glob('STM32L0xx_HAL_Driver/Src/*.c')
#add for startup script
if rtconfig.CROSS_TOOL == 'gcc':
src = src + ['CMSIS/Device/ST/STM32L0xx/Source/Templates/gcc/startup_stm32l072xx.s']
elif rtconfig.CROSS_TOOL == 'keil':
src = src + ['CMSIS/Device/ST/STM32L0xx/Source/Templates/arm/startup_stm32l072xx.s']
elif rtconfig.CROSS_TOOL == 'iar':
src = src + ['CMSIS/Device/ST/STM32L0xx/Source/Templates/iar/startup_stm32l072xx.s']
path = [cwd + 'STM32L0xx_HAL_Driver/Inc',
cwd + 'CMSIS/Device/ST/STM32L0xx/Include',
cwd + '/CMSIS/Include']
CPPDEFINES = ['USE_HAL_DRIVER', 'STM32L0X2']
group = DefineGroup('STM32_HAL', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')
|