diff options
| author | lizhirui <[email protected]> | 2021-02-18 16:27:50 +0800 |
|---|---|---|
| committer | lizhirui <[email protected]> | 2021-02-18 16:27:50 +0800 |
| commit | e7fc0c89d2367533dcd1b77e46acaeea7bc3f876 (patch) | |
| tree | dc72b499e5ad31d894355f0cf00d9f1fc764e9ff /libcpu | |
| parent | e596921019839fdaf1c0c2c76a1aa13f4c083299 (diff) | |
repair hard fault return bug
before modify,when exception hook returns true,programs can't return to normal execution flow
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/arm/cortex-m7/context_rvds.S | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/libcpu/arm/cortex-m7/context_rvds.S b/libcpu/arm/cortex-m7/context_rvds.S index d051f819c1..6caed09e38 100644 --- a/libcpu/arm/cortex-m7/context_rvds.S +++ b/libcpu/arm/cortex-m7/context_rvds.S @@ -10,6 +10,7 @@ ; * 2013-06-18 aozima add restore MSP feature. ; * 2013-06-23 aozima support lazy stack optimized. ; * 2018-07-24 aozima enhancement hard fault exception handler. +; * 2021-02-15 lizhirui repair hard fault return bug ; */ ;/** @@ -235,11 +236,6 @@ MemManage_Handler ENDIF STMFD r0!, {lr} ; push exec_return register - TST lr, #0x04 ; if(!EXC_RETURN[2]) - ITE EQ - MSREQ msp, r0 ; [2]=0 ==> Z=1, update stack pointer to MSP. - MSRNE psp, r0 ; [2]=1 ==> Z=0, update stack pointer to PSP. - PUSH {lr} BL rt_hw_hard_fault_exception POP {lr} |
