summaryrefslogtreecommitdiff
path: root/bsp/stm32f107/Libraries/SConscript
diff options
context:
space:
mode:
author[email protected] <[email protected]>2011-06-30 13:54:31 +0000
committer[email protected] <[email protected]>2011-06-30 13:54:31 +0000
commit3d4e5e1fea2973cd462186a594da14b75c69e223 (patch)
treebacbcd7e73260f23b8b27ce35bdadc09a624d0cc /bsp/stm32f107/Libraries/SConscript
parent311e6695694c31dc0bd21453688f74ccfb76aaab (diff)
update library to 3.5.0; update project file to Keil4.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1557 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/stm32f107/Libraries/SConscript')
-rw-r--r--bsp/stm32f107/Libraries/SConscript31
1 files changed, 27 insertions, 4 deletions
diff --git a/bsp/stm32f107/Libraries/SConscript b/bsp/stm32f107/Libraries/SConscript
index 7b86f60d1f..44b213e685 100644
--- a/bsp/stm32f107/Libraries/SConscript
+++ b/bsp/stm32f107/Libraries/SConscript
@@ -2,9 +2,13 @@ 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("""
CMSIS/CM3/CoreSupport/core_cm3.c
+CMSIS/CM3/DeviceSupport/ST/STM32F10x/system_stm32f10x.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_crc.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_rcc.c
STM32F10x_StdPeriph_Driver/src/stm32f10x_wwdg.c
@@ -30,11 +34,30 @@ STM32F10x_StdPeriph_Driver/src/stm32f10x_cec.c
STM32F10x_StdPeriph_Driver/src/misc.c
""")
-path = [RTT_ROOT + '/bsp/stm3210/Libraries/STM32F10x_StdPeriph_Driver/inc',
- RTT_ROOT + '/bsp/stm3210/Libraries/CMSIS/CM3/CoreSupport',
- RTT_ROOT + '/bsp/stm3210/Libraries/CMSIS/CM3/DeviceSupport/ST/STM32F10x']
+# 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'
+
+# 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]]
+
+path = [cwd + '/STM32F10x_StdPeriph_Driver/inc',
+ cwd + '/CMSIS/CM3/CoreSupport',
+ cwd + '/CMSIS/CM3/DeviceSupport/ST/STM32F10x']
CPPDEFINES = ['USE_STDPERIPH_DRIVER', rtconfig.STM32_TYPE]
-group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path)
+group = DefineGroup('STM32_StdPeriph', src, depend = [''], CPPPATH = path, CPPDEFINES = CPPDEFINES)
Return('group')