HardFault_Handler 处理

This commit is contained in:
2026-07-17 12:02:26 +08:00
parent f4a90b18a5
commit 441498390e
3 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ void HardFault_Handler_C(ContextStateFrame_t* frame, uint32_t lr_value){
// "thumb instruction interworking" bit set
frame->xpsr = (1 << 24);
#else
while(1);
while(1){}
#endif
}
+1
View File
@@ -69,6 +69,7 @@ __PendSV_SwitchTo
HardFault_Handler PROC
EXPORT HardFault_Handler
IMPORT HardFault_Handler_C
tst lr, #4 // EXC_RETURN (LR) 2
ite eq
mrseq r0, msp // 2 0 MSP
+1
View File
@@ -78,6 +78,7 @@ cpu_clz:
.section .text.HardFault_Handler,"ax",%progbits
.global HardFault_Handler
.global HardFault_Handler_C
.thumb_func
HardFault_Handler:
tst lr, #4