SConscript 1.2 KB
Newer Older
jhb222's avatar
jhb222 已提交
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
import os
import rtconfig
from building import *

Import('SDK_LIB')

cwd = GetCurrentDir()

# add general drivers
src = Split('''
board.c
CubeMX_Config/Src/stm32l4xx_hal_msp.c
''')

path =  [cwd]
path += [cwd + '/CubeMX_Config/Inc']

startup_path_prefix = SDK_LIB

if rtconfig.CROSS_TOOL == 'gcc':
    src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/startup_stm32l4r9xx.s']
elif rtconfig.CROSS_TOOL == 'keil':
    src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/arm/startup_stm32l4r9xx.s']
elif rtconfig.CROSS_TOOL == 'iar':
    src += [startup_path_prefix + '/STM32L4xx_HAL/CMSIS/Device/ST/STM32L4xx/Source/Templates/iar/startup_stm32l4r9xx.s']

# STM32L412xx || STM32L422xx || STM32L431xx
# STM32L432xx || STM32L433xx || STM32L442xx
# STM32L443xx || STM32L451xx || STM32L452xx
# STM32L462xx || STM32L471xx || STM32L475xx
# STM32L476xx || STM32L485xx || STM32L486xx
# STM32L496xx || STM32L4A6xx || STM32L4R5xx
# STM32L4R7xx || STM32L4R9xx || STM32L4S5xx
# STM32L4S7xx || STM32L4S9xx
# You can select chips from the list above	
CPPDEFINES = ['STM32L4R9xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

Return('group')