HardFault_Handler

This commit is contained in:
2026-07-16 01:02:09 +08:00
parent d57a09872d
commit abe5b0c5b9
3 changed files with 122 additions and 0 deletions
+13
View File
@@ -76,5 +76,18 @@ cpu_clz:
CLZ R0, R0
BX LR
.section .text.HardFault_Handler,"ax",%progbits
.global HardFault_Handler
.thumb_func
HardFault_Handler:
tst lr, #4
ite eq
mrseq r0, msp
mrsne r0, psp
mov r1, lr
b HardFault_Handler_C
.align 4
.end