2011-10-21 07:38:20 +08:00
|
|
|
import rtconfig
|
2011-10-27 10:40:15 +08:00
|
|
|
Import('RTT_ROOT')
|
2011-10-21 07:38:20 +08:00
|
|
|
from building import *
|
|
|
|
|
|
|
|
# get current directory
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
|
2011-10-27 10:40:15 +08:00
|
|
|
# The set of source files associated with this SConscript file.
|
2011-10-21 07:38:20 +08:00
|
|
|
src = Split("""
|
|
|
|
CMSIS/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c
|
2011-10-27 10:40:15 +08:00
|
|
|
CMSIS/ST/STM32F4xx/Source/Templates/arm/startup_stm32f4xx.s
|
2011-10-21 07:38:20 +08:00
|
|
|
STM32F4xx_StdPeriph_Driver/src/misc.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_can.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_crc.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_aes.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_des.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_cryp_tdes.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dac.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dbgmcu.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dcmi.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_exti.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_flash.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_fsmc.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_md5.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_hash_sha1.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_iwdg.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_pwr.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rng.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rtc.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_sdio.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_syscfg.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c
|
|
|
|
STM32F4xx_StdPeriph_Driver/src/stm32f4xx_wwdg.c
|
|
|
|
""")
|
|
|
|
|
2011-10-27 10:40:15 +08:00
|
|
|
# starupt scripts for each STM32 kind
|
|
|
|
# startup_scripts = {}
|
|
|
|
# startup_scripts['STM32F10X_CL'] = 'startup_stm32f10x_cl.s'
|
|
|
|
# startup_scripts['STM32F10X_HD'] = 'startup_stm32f10x_hd.s'
|
|
|
|
# startup_scripts['STM32F10X_HD_VL'] = 'startup_stm32f10x_hd_vl.s'
|
|
|
|
# startup_scripts['STM32F10X_LD'] = 'startup_stm32f10x_ld.s'
|
|
|
|
# startup_scripts['STM32F10X_LD_VL'] = 'startup_stm32f10x_ld_vl.s'
|
|
|
|
# startup_scripts['STM32F10X_MD'] = 'startup_stm32f10x_md.s'
|
|
|
|
# startup_scripts['STM32F10X_MD_VL'] = 'startup_stm32f10x_md_vl.s'
|
|
|
|
# startup_scripts['STM32F10X_XL'] = 'startup_stm32f10x_xl.s'
|
2011-10-21 07:38:20 +08:00
|
|
|
|
2011-10-27 10:40:15 +08:00
|
|
|
#add for startup script
|
|
|
|
# if rtconfig.CROSS_TOOL == 'gcc':
|
|
|
|
# src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/gcc_ride7/' + startup_scripts[rtconfig.STM32_TYPE]]
|
|
|
|
# elif rtconfig.CROSS_TOOL == 'keil':
|
|
|
|
# src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/arm/' + startup_scripts[rtconfig.STM32_TYPE]]
|
|
|
|
# elif rtconfig.CROSS_TOOL == 'iar':
|
|
|
|
# src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F10x/startup/iar/' + startup_scripts[rtconfig.STM32_TYPE]]
|
2011-10-21 07:38:20 +08:00
|
|
|
|
2011-10-27 10:40:15 +08:00
|
|
|
path = [cwd + '/STM32F4xx_StdPeriph_Driver/inc',
|
|
|
|
cwd + '/CMSIS/ST/STM32F4xx/Include',
|
|
|
|
cwd + '/CMSIS/CM3/DeviceSupport/ST/STM32F10x']
|
2011-10-21 07:38:20 +08:00
|
|
|
|
2011-10-27 10:40:15 +08:00
|
|
|
CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
|
2011-10-21 07:38:20 +08:00
|
|
|
group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
|
|
|
|
|
|
|
|
Return('group')
|