2016-08-19 00:35:30 +08:00
|
|
|
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("""
|
2016-08-22 01:03:17 +08:00
|
|
|
CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
|
2016-08-19 00:35:30 +08:00
|
|
|
""")
|
|
|
|
|
2016-08-22 01:03:17 +08:00
|
|
|
src += Glob('STM32F4xx_HAL_Driver/Src/*.c')
|
2016-08-19 00:35:30 +08:00
|
|
|
|
|
|
|
|
2016-08-22 01:03:17 +08:00
|
|
|
#add for startup script
|
2016-08-19 00:35:30 +08:00
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
2016-08-22 01:03:17 +08:00
|
|
|
src = src + ['CMSIS/Device/ST/STM32F4xx/Source/Templates/gcc/startup_stm32f429xx.s']
|
2016-08-19 00:35:30 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
2016-08-22 15:59:53 +08:00
|
|
|
src = src + ['CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f429xx.s']
|
2016-08-19 00:35:30 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
2016-08-22 15:59:53 +08:00
|
|
|
src = src + ['CMSIS/Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f429xx.s']
|
2016-08-19 00:35:30 +08:00
|
|
|
|
2016-08-22 01:03:17 +08:00
|
|
|
path = [cwd + '/STM32F4xx_HAL_Driver/Inc',
|
|
|
|
cwd + '/CMSIS/Device/ST/STM32F4xx/Include',
|
2016-08-19 00:35:30 +08:00
|
|
|
cwd + '/CMSIS/Include']
|
|
|
|
|
|
|
|
#CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
|
2016-08-22 01:03:17 +08:00
|
|
|
CPPDEFINES = ['USE_HAL_DRIVER', 'STM32F429xx']
|
|
|
|
group = DefineGroup('STM32_HAL', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
2016-08-19 00:35:30 +08:00
|
|
|
|
|
|
|
Return('group')
|