mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-21 00:27:19 +08:00
Revert "repair hard fault return bug"
This reverts commit e7fc0c89d2367533dcd1b77e46acaeea7bc3f876.
This commit is contained in:
parent
fdfdb9001b
commit
5d33302992
@ -10,7 +10,6 @@
|
|||||||
; * 2013-06-18 aozima add restore MSP feature.
|
; * 2013-06-18 aozima add restore MSP feature.
|
||||||
; * 2013-06-23 aozima support lazy stack optimized.
|
; * 2013-06-23 aozima support lazy stack optimized.
|
||||||
; * 2018-07-24 aozima enhancement hard fault exception handler.
|
; * 2018-07-24 aozima enhancement hard fault exception handler.
|
||||||
; * 2021-02-15 lizhirui repair hard fault return bug
|
|
||||||
; */
|
; */
|
||||||
|
|
||||||
;/**
|
;/**
|
||||||
@ -236,6 +235,11 @@ MemManage_Handler
|
|||||||
ENDIF
|
ENDIF
|
||||||
STMFD r0!, {lr} ; push exec_return register
|
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}
|
PUSH {lr}
|
||||||
BL rt_hw_hard_fault_exception
|
BL rt_hw_hard_fault_exception
|
||||||
POP {lr}
|
POP {lr}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user