STM32F407VE adaptations, tried to find initialization bug
This commit is contained in:
20
hardfault/hardfault_prehandler.S
Normal file
20
hardfault/hardfault_prehandler.S
Normal file
@@ -0,0 +1,20 @@
|
||||
/* Preliminary Header: Author: Mario Huettel */
|
||||
|
||||
.syntax unified
|
||||
.cpu cortex-m4
|
||||
.thumb
|
||||
.type HardFault_PreHandler, %function
|
||||
.global HardFault_PreHandler
|
||||
.type HardFault_PreHandler, %function
|
||||
HardFault_PreHandler:
|
||||
TST LR, #4 // Test bit 2. If active => PSP was used, else MSP
|
||||
ITE EQ
|
||||
MRSEQ R0, MSP // Bit not set => MSP as argument
|
||||
MRSNE R0, PSP // Bit set => PSP
|
||||
LDR R1, =HardFault_Handler
|
||||
BX R1
|
||||
|
||||
//.weak HardFault_Handler
|
||||
//.thumb_set HardFault_Handler, HardFault_Handler_Default
|
||||
//HardFault_Handler_Default:
|
||||
//B HardFault_Handler_Default
|
Reference in New Issue
Block a user