summaryrefslogtreecommitdiff
path: root/bsp/lpc176x/CMSIS/SConscript
diff options
context:
space:
mode:
author[email protected] <[email protected]>2012-06-01 07:31:15 +0000
committer[email protected] <[email protected]>2012-06-01 07:31:15 +0000
commit60ada9665d2bf7a9959bed9b92cb90c710f5ad52 (patch)
tree06ad26cd8575d0f9752bf5202094bf9f538b5f89 /bsp/lpc176x/CMSIS/SConscript
parent7fddcb0e355a572504181d3e04943acebd5e4fae (diff)
add the standard CMSIS(Version 3.01) into components
and implement examples in MB9BF506R and LPC176x branches define RT_USING_BSP_CMSIS in rtconfig.h will use CMSIS in bsp define RT_USING_RTT_CMSIS in rtconfig.h will use CMSIS in components git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2146 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'bsp/lpc176x/CMSIS/SConscript')
-rw-r--r--bsp/lpc176x/CMSIS/SConscript14
1 files changed, 11 insertions, 3 deletions
diff --git a/bsp/lpc176x/CMSIS/SConscript b/bsp/lpc176x/CMSIS/SConscript
index c6faa680a4..c62cf81eda 100644
--- a/bsp/lpc176x/CMSIS/SConscript
+++ b/bsp/lpc176x/CMSIS/SConscript
@@ -1,9 +1,11 @@
+Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = GetCurrentDir()
-src = Glob('*.c')
-src = ['CM3/CoreSupport/core_cm3.c', 'CM3/DeviceSupport/NXP/LPC17xx/system_LPC17xx.c']
+
+src = ['CM3/DeviceSupport/NXP/LPC17xx/system_LPC17xx.c']
+
# add for startup script
if rtconfig.CROSS_TOOL == 'gcc':
src += ['CM3/DeviceSupport/NXP/LPC17xx/startup/gcc/startup_LPC17xx.s']
@@ -12,7 +14,13 @@ elif rtconfig.CROSS_TOOL == 'keil':
elif rtconfig.CROSS_TOOL == 'iar':
src += ['CM3/DeviceSupport/NXP/LPC17xx/startup/iar/startup_LPC17xx.s']
-CPPPATH = [cwd + '/CM3/CoreSupport', cwd + '/CM3/DeviceSupport/NXP/LPC17xx/']
+CPPPATH = [cwd + '/CM3/DeviceSupport/NXP/LPC17xx/']
+
+if GetDepend(['RT_USING_BSP_CMSIS']):
+ CPPPATH += [cwd + '/CM3/CoreSupport']
+ src += ['CM3/CoreSupport/core_cm3.c']
+elif GetDepend(['RT_USING_RTT_CMSIS']):
+ CPPPATH += [RTT_ROOT + '/components/CMSIS/Include']
group = DefineGroup('CMSIS', src, depend = [''], CPPPATH = CPPPATH)