STM32F407VE adaptations, tried to find initialization bug

This commit is contained in:
2017-04-15 19:50:17 +02:00
parent 6d5b9578b9
commit 79d476e1eb
8 changed files with 113 additions and 56 deletions

View 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