SConscript 960 字节
Newer Older
T
tyustli 已提交
1 2 3
import rtconfig
from building import *

4 5
Import('SDK_LIB')

T
tyustli 已提交
6 7 8 9 10 11 12 13 14
cwd = GetCurrentDir()

# add the general drivers.
src = Glob('board.c')
src += Glob('CubeMX_Config/Src/stm32h7xx_hal_msp.c')

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

15 16
startup_path_prefix = SDK_LIB

T
tyustli 已提交
17
if rtconfig.CROSS_TOOL == 'gcc':
18
    src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/gcc/startup_stm32h743xx.s']
T
tyustli 已提交
19
elif rtconfig.CROSS_TOOL == 'keil':
20
    src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/arm/startup_stm32h743xx.s']
T
tyustli 已提交
21
elif rtconfig.CROSS_TOOL == 'iar':
22
    src += [startup_path_prefix + '/STM32H7xx_HAL/CMSIS/Device/ST/STM32H7xx/Source/Templates/iar/startup_stm32h743xx.s']
T
tyustli 已提交
23 24 25 26 27 28 29

# STM32H743xx || STM32H750xx || STM32F753xx
# You can select chips from the list above
CPPDEFINES = ['STM32H743xx']
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)

Return('group')