Created
January 8, 2020 00:13
-
-
Save pftbest/b95c4caca72faebb55594a8b4e6f3f2b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/asm.s b/asm.s | |
index 50a3fa5..fd7e500 100644 | |
--- a/asm.s | |
+++ b/asm.s | |
@@ -1,11 +1,11 @@ | |
# LLD requires that the section flags are explicitly set here | |
- .section .HardFaultTrampoline, "ax" | |
- .global HardFaultTrampoline | |
+ .section .HardFaultTrampolineAsm, "ax" | |
+ .global HardFaultTrampolineAsm | |
# .type and .thumb_func are both required; otherwise its Thumb bit does not | |
# get set and an invalid vector table is generated | |
- .type HardFaultTrampoline,%function | |
+ .type HardFaultTrampolineAsm,%function | |
.thumb_func | |
-HardFaultTrampoline: | |
+HardFaultTrampolineAsm: | |
# depending on the stack mode in EXC_RETURN, fetch stack pointer from | |
# PSP or MSP | |
mov r0, lr | |
diff --git a/link.x.in b/link.x.in | |
index 30d4af1..9c649f7 100644 | |
--- a/link.x.in | |
+++ b/link.x.in | |
@@ -35,7 +35,8 @@ EXTERN(__EXCEPTIONS); /* depends on all the these PROVIDED symbols */ | |
EXTERN(DefaultHandler); | |
PROVIDE(NonMaskableInt = DefaultHandler); | |
-EXTERN(HardFaultTrampoline); | |
+EXTERN(HardFaultTrampolineAsm); | |
+PROVIDE(HardFaultTrampoline = HardFaultTrampolineAsm); | |
PROVIDE(MemoryManagement = DefaultHandler); | |
PROVIDE(BusFault = DefaultHandler); | |
PROVIDE(UsageFault = DefaultHandler); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment