aboutsummaryrefslogtreecommitdiff
path: root/playground/src/init_low.s
diff options
context:
space:
mode:
Diffstat (limited to 'playground/src/init_low.s')
-rw-r--r--playground/src/init_low.s42
1 files changed, 42 insertions, 0 deletions
diff --git a/playground/src/init_low.s b/playground/src/init_low.s
new file mode 100644
index 0000000..bc12b5b
--- /dev/null
+++ b/playground/src/init_low.s
@@ -0,0 +1,42 @@
+.syntax unified
+.cpu cortex-m3
+.thumb
+
+.section .text
+
+.thumb_func
+.global _Reset_Handler
+_Reset_Handler:
+ bl init_high
+ b halt
+
+.thumb_func
+.global halt
+halt:
+ b .
+
+.thumb_func
+NMI_Handler:
+ b halt
+
+.thumb_func
+HardFault_Handler:
+ tst lr, #4
+ ite eq
+ mrseq r0, msp
+ mrsne r0, psp
+ b HardFault_Handler_C
+
+.thumb_func
+MemManage_Handler:
+ b halt
+
+.thumb_func
+BusFault_Handler:
+ b halt
+
+.thumb_func
+UsageFault_Handler:
+ b halt
+
+.end