2016-01-25 15:39:34 +08:00
|
|
|
# RT-Thread building script for component
|
|
|
|
|
|
|
|
Import('rtconfig')
|
|
|
|
from building import *
|
|
|
|
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Split('''
|
|
|
|
Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
|
|
|
|
''')
|
|
|
|
CPPPATH = [cwd + '/Device/ST/STM32F4xx/Include', cwd + '/Include']
|
|
|
|
CPPDEFINES = [rtconfig.PART_TYPE] #stm32f411xe
|
|
|
|
|
|
|
|
# add for startup script
|
|
|
|
if rtconfig.CROSS_TOOL == 'gcc':
|
|
|
|
folder = 'gcc'
|
2018-05-29 10:19:27 +08:00
|
|
|
src += ['Device/ST/STM32F4xx/Source/Templates/gcc/gcc_startup.s']
|
2016-01-25 15:39:34 +08:00
|
|
|
elif rtconfig.CROSS_TOOL == 'keil':
|
|
|
|
folder = 'arm'
|
|
|
|
elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
folder = 'iar'
|
2018-05-29 10:19:27 +08:00
|
|
|
|
2016-01-25 15:39:34 +08:00
|
|
|
#Device/ST/STM32F4xx/Source/Templates/iar/startup_stm32f411xe.s
|
2017-11-01 13:05:48 +08:00
|
|
|
src += ['Device/ST/STM32F4xx/Source/Templates/' + folder + '/startup_' + rtconfig.PART_TYPE.lower() + '.s']
|
2016-01-25 15:39:34 +08:00
|
|
|
|
|
|
|
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|