diff --git a/bsp/stm32f20x/Libraries/SConscript b/bsp/stm32f20x/Libraries/SConscript
index 17d1eff10c..e8a21b1510 100644
--- a/bsp/stm32f20x/Libraries/SConscript
+++ b/bsp/stm32f20x/Libraries/SConscript
@@ -7,7 +7,6 @@ cwd = GetCurrentDir()
# The set of source files associated with this SConscript file.
src = Split("""
-CMSIS/CM3/CoreSupport/core_cm3.c
CMSIS/CM3/DeviceSupport/ST/STM32F2xx/system_stm32f2xx.c
STM32F2xx_StdPeriph_Driver/src/misc.c
STM32F2xx_StdPeriph_Driver/src/stm32f2xx_adc.c
@@ -54,9 +53,14 @@ elif rtconfig.CROSS_TOOL == 'iar':
src = src + ['CMSIS/CM3/DeviceSupport/ST/STM32F2xx/startup/iar/' + startup_scripts]
path = [cwd + '/STM32F2xx_StdPeriph_Driver/inc',
- cwd + '/CMSIS/CM3/CoreSupport',
cwd + '/CMSIS/CM3/DeviceSupport/ST/STM32F2xx']
+if GetDepend(['RT_USING_BSP_CMSIS']):
+ path += [cwd + '/CMSIS/CM3/CoreSupport']
+ src += [cwd + '/CMSIS/CM3/CoreSupport/core_cm3.c']
+elif GetDepend(['RT_USING_RTT_CMSIS']):
+ path += [RTT_ROOT + '/components/CMSIS/Include']
+
if GetDepend('RT_USING_LWIP') == True:
src = src + ['STM32F2x7_ETH_Driver/src/stm32f2x7_eth.c']
path = path + [cwd + '/STM32F2x7_ETH_Driver/inc']
diff --git a/bsp/stm32f20x/project.ewp b/bsp/stm32f20x/project.ewp
index 644ff5298e..87026e2397 100644
--- a/bsp/stm32f20x/project.ewp
+++ b/bsp/stm32f20x/project.ewp
@@ -12,7 +12,7 @@
General
3
- 20
+ 21
1
1
+
+
ICCARM
2
- 26
+ 28
1
1
+
@@ -602,7 +616,7 @@
ILINK
0
- 11
+ 14
1
1
+
+
+
+
+
+
+
@@ -887,7 +929,7 @@
General
3
- 20
+ 21
1
0
+
+
@@ -1026,7 +1076,7 @@
ICCARM
2
- 26
+ 28
1
0
+
@@ -1477,7 +1533,7 @@
ILINK
0
- 11
+ 14
1
0
+
+
+
+
+
+
+
@@ -1752,6 +1836,60 @@
+
+ Applications
+
+ $PROJ_DIR$\applications\application.c
+
+
+ $PROJ_DIR$\applications\startup.c
+
+
+
+ CORTEX-M3
+
+ $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\common\div0.c
+
+
+ $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c
+
+
+
+ Drivers
+
+ $PROJ_DIR$\Drivers\24LCxx.c
+
+
+ $PROJ_DIR$\Drivers\board.c
+
+
+ $PROJ_DIR$\Drivers\FM25Lx.c
+
+
+ $PROJ_DIR$\Drivers\i2c.c
+
+
+ $PROJ_DIR$\Drivers\rtc.c
+
+
+ $PROJ_DIR$\Drivers\serial.c
+
+
+ $PROJ_DIR$\Drivers\stm32f2xx_it.c
+
+
+ $PROJ_DIR$\Drivers\usart.c
+
+
finsh
@@ -1820,21 +1958,12 @@
$PROJ_DIR$\..\..\src\mempool.c
-
- $PROJ_DIR$\..\..\src\module.c
-
$PROJ_DIR$\..\..\src\object.c
-
- $PROJ_DIR$\..\..\src\rtm.c
-
$PROJ_DIR$\..\..\src\scheduler.c
-
- $PROJ_DIR$\..\..\src\slab.c
-
$PROJ_DIR$\..\..\src\thread.c
@@ -1842,53 +1971,8 @@
$PROJ_DIR$\..\..\src\timer.c
-
- Startup
-
- $PROJ_DIR$\.\application.c
-
-
- $PROJ_DIR$\.\board.c
-
-
- $PROJ_DIR$\rtc.c
-
-
- $PROJ_DIR$\.\serial.c
-
-
- $PROJ_DIR$\.\startup.c
-
-
- $PROJ_DIR$\.\stm32f20x_it.c
-
-
- $PROJ_DIR$\.\usart.c
-
-
-
- STM32
-
- $PROJ_DIR$\..\..\libcpu\arm\common\backtrace.c
-
-
- $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\context_iar.S
-
-
- $PROJ_DIR$\..\..\libcpu\arm\cortex-m3\cpuport.c
-
-
- $PROJ_DIR$\..\..\libcpu\arm\common\div0.c
-
-
- $PROJ_DIR$\..\..\libcpu\arm\common\showmem.c
-
-
STM32_StdPeriph
-
- $PROJ_DIR$\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
-
$PROJ_DIR$\Libraries\STM32F2xx_StdPeriph_Driver\src\misc.c
diff --git a/bsp/stm32f20x/rtconfig.h b/bsp/stm32f20x/rtconfig.h
index 01f860b160..ff7ac184f1 100644
--- a/bsp/stm32f20x/rtconfig.h
+++ b/bsp/stm32f20x/rtconfig.h
@@ -131,4 +131,11 @@
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 4
#define RT_LWIP_ETHTHREAD_STACKSIZE 512
+//
+// #define RT_USING_CMSIS_OS
+//
+#define RT_USING_RTT_CMSIS
+//
+// #define RT_USING_BSP_CMSIS
+
#endif