diff --git a/components/exchook/los_exchook.c b/components/exchook/los_exchook.c
index 78f5de87..067d6c99 100755
--- a/components/exchook/los_exchook.c
+++ b/components/exchook/los_exchook.c
@@ -66,13 +66,14 @@ STATIC VOID DoExcHook(EXC_TYPE excType)
STATIC struct Node *GetFreeNode(VOID)
{
struct Node *node = NULL;
+ int i;
if (g_excHeads[EXC_TYPE_END] == NULL) {
if (g_excNodes[0].excHookFn != NULL) {
/* no free node now */
return NULL;
} else {
/* Initialize the free list */
- for (int i = 0; i < LOSCFG_BASE_EXC_HOOK_LIMIT; ++i) {
+ for (i = 0; i < LOSCFG_BASE_EXC_HOOK_LIMIT; ++i) {
g_excNodes[i].next = g_excHeads[EXC_TYPE_END];
g_excHeads[EXC_TYPE_END] = &g_excNodes[i];
}
diff --git a/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvopt b/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvopt
index 1c1deda6..0b974b0b 100644
--- a/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvopt
+++ b/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvopt
@@ -10,9 +10,10 @@
*.s*; *.src; *.a*
*.obj; *.o
*.lib
- *.txt; *.h; *.inc
+ *.txt; *.h; *.inc; *.md
*.plm
*.cpp
+ 0
@@ -31,6 +32,7 @@
1
1
0
+ 0
1
@@ -93,16 +95,6 @@
datashts\arm\cortex_m3\r2p1\DUI0552A_CORTEX_M3_DGUG.PDF
-
- SARMCM3.DLL
-
- DARMSTM.DLL
- -pSTM32F103RB
- SARMCM3.DLL
-
- TARMSTM.DLL
- -pSTM32F103RB
-
1
0
@@ -121,8 +113,13 @@
0
1
1
+ 1
+ 1
0
0
+ 1
+ 0
+ 0
0
@@ -137,6 +134,11 @@
BIN\UL2CM3.DLL
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
0
DLGDARM
@@ -153,7 +155,24 @@
UL2CM3(-O14 -S0 -C0 -N00("ARM Cortex-M3") -D00(1BA00477) -L00(4) -FO7 -FN1 -FC800 -FD20000000 -FF0STM32F10x_128 -FL020000 -FS08000000
-
+
+
+ 0
+ 0
+ 60
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ ..\main.c
+
+
+
+
0
@@ -162,7 +181,7 @@
1
1
0
- 1
+ 0
0
0
1
@@ -185,6 +204,17 @@
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
@@ -199,11 +229,7 @@
1
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_event.c
los_event.c
@@ -215,11 +241,7 @@
2
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_init.c
los_init.c
@@ -231,11 +253,7 @@
3
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_mux.c
los_mux.c
@@ -247,11 +265,7 @@
4
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_queue.c
los_queue.c
@@ -263,11 +277,7 @@
5
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_sem.c
los_sem.c
@@ -279,11 +289,7 @@
6
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_swtmr.c
los_swtmr.c
@@ -295,11 +301,7 @@
7
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_task.c
los_task.c
@@ -311,11 +313,7 @@
8
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\los_tick.c
los_tick.c
@@ -327,11 +325,7 @@
9
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\src\mm\los_membox.c
los_membox.c
@@ -343,27 +337,7 @@
10
1
0
- 1
- 49223292
0
- 0
- 5
- 0
- ..\..\..\kernel\src\mm\los_memcheck.c
- los_memcheck.c
- 0
- 0
-
-
- 1
- 11
- 1
- 0
- 1
- 49223292
- 0
- 0
- 5
0
..\..\..\kernel\src\mm\los_memory.c
los_memory.c
@@ -372,30 +346,10 @@
1
- 12
- 1
- 0
- 1
- 49223292
- 0
- 0
- 5
- 0
- ..\..\..\kernel\src\mm\los_memstat.c
- los_memstat.c
- 0
- 0
-
-
- 1
- 13
+ 11
2
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\arch\arm\cortex-m3\keil\los_dispatch.S
los_dispatch.S
@@ -404,14 +358,10 @@
1
- 14
+ 12
5
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\arch\arm\cortex-m3\keil\cmsis\ARMCM3.h
ARMCM3.h
@@ -420,14 +370,10 @@
1
- 15
+ 13
5
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\arch\arm\cortex-m3\keil\cmsis\core_cm3.h
core_cm3.h
@@ -436,14 +382,10 @@
1
- 16
+ 14
5
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\arch\arm\cortex-m3\keil\cmsis\core_cmFunc.h
core_cmFunc.h
@@ -452,14 +394,10 @@
1
- 17
+ 15
5
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\arch\arm\cortex-m3\keil\cmsis\core_cmInstr.h
core_cmInstr.h
@@ -468,14 +406,10 @@
1
- 18
+ 16
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\components\cpup\los_cpup.c
los_cpup.c
@@ -484,14 +418,10 @@
1
- 19
+ 17
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\kernel\arch\arm\cortex-m3\keil\los_interrupt.c
los_interrupt.c
@@ -500,14 +430,10 @@
1
- 20
+ 18
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\utils\los_error.c
los_error.c
@@ -516,14 +442,10 @@
1
- 21
+ 19
1
0
- 0
- 0
0
- 0
- 0
0
..\..\..\kernel\arch\arm\cortex-m3\keil\los_context.c
los_context.c
@@ -532,14 +454,10 @@
1
- 22
+ 20
1
0
- 0
- 1
0
- 206
- 216
0
..\..\..\kernel\arch\arm\cortex-m3\keil\los_timer.c
los_timer.c
@@ -548,14 +466,10 @@
1
- 23
+ 21
2
0
- 0
- 0
0
- 0
- 0
0
..\..\..\kernel\arch\arm\cortex-m3\keil\los_exc.S
los_exc.S
@@ -564,38 +478,42 @@
1
- 24
+ 22
2
0
- 0
- 0
0
- 26
- 45
0
..\..\..\kernel\arch\arm\cortex-m3\keil\los_startup.s
los_startup.s
0
0
+
+ 1
+ 23
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\utils\los_debug.c
+ los_debug.c
+ 0
+ 0
+
main
- 0
+ 1
0
0
0
2
- 25
+ 24
1
0
- 1
- 49223292
0
- 0
- 5
0
..\Driver\STM32F103\uart.c
uart.c
@@ -604,25 +522,33 @@
2
- 26
+ 25
1
0
- 1
- 0
0
- 113
- 121
0
..\main.c
main.c
0
0
+
+ 2
+ 26
+ 5
+ 0
+ 0
+ 0
+ ..\target_config.h
+ target_config.h
+ 0
+ 0
+
component
- 0
+ 1
0
0
0
@@ -631,11 +557,7 @@
27
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\components\bounds_checking_function\src\memcpy_s.c
memcpy_s.c
@@ -647,11 +569,7 @@
28
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\components\bounds_checking_function\src\memmove_s.c
memmove_s.c
@@ -663,11 +581,7 @@
29
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\components\bounds_checking_function\src\memset_s.c
memset_s.c
@@ -679,11 +593,7 @@
30
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\components\bounds_checking_function\src\strcpy_s.c
strcpy_s.c
@@ -695,17 +605,61 @@
31
1
0
- 1
- 49223292
0
- 0
- 5
0
..\..\..\components\bounds_checking_function\src\strncpy_s.c
strncpy_s.c
0
0
+
+ 3
+ 32
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\components\exchook\los_exc_info.c
+ los_exc_info.c
+ 0
+ 0
+
+
+ 3
+ 33
+ 5
+ 0
+ 0
+ 0
+ ..\..\..\components\exchook\los_exc_info.h
+ los_exc_info.h
+ 0
+ 0
+
+
+ 3
+ 34
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\components\exchook\los_exchook.c
+ los_exchook.c
+ 0
+ 0
+
+
+ 3
+ 35
+ 5
+ 0
+ 0
+ 0
+ ..\..\..\components\exchook\los_exchook.h
+ los_exchook.h
+ 0
+ 0
+
diff --git a/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvproj b/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvproj
index e15f55d2..f8129709 100644
--- a/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvproj
+++ b/targets/cortex-m3_stm32f103_simulator_keil/project/los_demo.uvproj
@@ -10,6 +10,8 @@
los_demo
0x4
ARM-ADS
+ 5060960::V5.06 update 7 (build 960)::.\ARMCC
+ 0
STM32F103RB
@@ -30,6 +32,7 @@
SFD\ST\STM32F1xx\STM32F103xx.sfr
+ 0
0
@@ -71,6 +74,8 @@
0
0
+ 0
+ 0
0
@@ -79,6 +84,8 @@
0
0
+ 0
+ 0
0
@@ -97,6 +104,7 @@
3
+ 1
SARMCM3.DLL
@@ -126,6 +134,7 @@
1
1
0
+ 1
0
@@ -137,6 +146,7 @@
0
1
1
+ 1
0
0
@@ -169,6 +179,10 @@
BIN\UL2CM3.DLL
+
+
+
+ 0
@@ -209,12 +223,15 @@
0
0
0
+ 0
+ 0
0
0
8
1
0
0
+ 0
3
3
0
@@ -347,11 +364,21 @@
0
0
0
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
--gnu
- ..\..\cortex-m3_stm32f103_simulator_keil;..\..\..\kernel\include;..\..\..\kernel\arch\arm\cortex-m3\keil;..\..\..\kernel\arch\arm\cortex-m3\keil\cmsis;..\..\..\kernel\src;..\..\..\components\bounds_checking_function\include;..\..\..\components\cpup;..\..\..\utils;..\..\..\kernel\arch\include
+ ..\..\cortex-m3_stm32f103_simulator_keil;..\..\..\kernel\include;..\..\..\kernel\arch\arm\cortex-m3\keil;..\..\..\kernel\arch\arm\cortex-m3\keil\cmsis;..\..\..\kernel\src;..\..\..\components\bounds_checking_function\include;..\..\..\components\cpup;..\..\..\utils;..\..\..\kernel\arch\include;..\..\..\components\exchook
@@ -363,6 +390,8 @@
0
0
0
+ 0
+ 1
@@ -379,6 +408,7 @@
0
0x08000000
0x20000000
+
.\los_demo.sct
@@ -437,21 +467,11 @@
1
..\..\..\kernel\src\mm\los_membox.c
-
- los_memcheck.c
- 1
- ..\..\..\kernel\src\mm\los_memcheck.c
-
los_memory.c
1
..\..\..\kernel\src\mm\los_memory.c
-
- los_memstat.c
- 1
- ..\..\..\kernel\src\mm\los_memstat.c
-
los_dispatch.S
2
@@ -512,6 +532,11 @@
2
..\..\..\kernel\arch\arm\cortex-m3\keil\los_startup.s
+
+ los_debug.c
+ 1
+ ..\..\..\utils\los_debug.c
+
@@ -527,6 +552,11 @@
1
..\main.c
+
+ target_config.h
+ 5
+ ..\target_config.h
+
@@ -557,6 +587,26 @@
1
..\..\..\components\bounds_checking_function\src\strncpy_s.c
+
+ los_exc_info.c
+ 1
+ ..\..\..\components\exchook\los_exc_info.c
+
+
+ los_exc_info.h
+ 5
+ ..\..\..\components\exchook\los_exc_info.h
+
+
+ los_exchook.c
+ 1
+ ..\..\..\components\exchook\los_exchook.c
+
+
+ los_exchook.h
+ 5
+ ..\..\..\components\exchook\los_exchook.h
+