summaryrefslogtreecommitdiff
path: root/arch/arm/lpc17xx/startup.s
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-01-27 00:57:15 -0800
committerPixel <pixel@nobis-crew.org>2011-01-27 00:57:15 -0800
commite1122d5200cec30e239b18278e2bb5c7ec97a72b (patch)
tree0c5956a7364239fc603e343bba34090864d288d1 /arch/arm/lpc17xx/startup.s
parent03638eaea432ac06456cded2cb743d20664689a7 (diff)
(way) better fault handlers.
Diffstat (limited to 'arch/arm/lpc17xx/startup.s')
-rw-r--r--arch/arm/lpc17xx/startup.s29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/lpc17xx/startup.s b/arch/arm/lpc17xx/startup.s
index a57954a..7537531 100644
--- a/arch/arm/lpc17xx/startup.s
+++ b/arch/arm/lpc17xx/startup.s
@@ -119,6 +119,35 @@ __cs3_interrupt_vector_cortex_m:
.thumb
+/* Fault handlers wrappers */
+
+ .section .privileged_code,"x",%progbits
+ .thumb_func
+ .type NMI_Handler, %function
+NMI_Handler:
+ MOV R0, 2
+ B general_handler
+ .type HardFault_Handler, %function
+HardFault_Handler:
+ MOV R0, 3
+ B general_handler
+ .type MemManage_Handler, %function
+MemManage_Handler:
+ MOV R0, 4
+ B general_handler
+ .type BusFault_Handler, %function
+BusFault_Handler:
+ MOV R0, 5
+ B general_handler
+ .type UsageFault_Handler, %function
+UsageFault_Handler:
+ MOV R0, 6
+ B general_handler
+ .type general_handler, %function
+general_handler:
+ MOV R1, SP
+ PUSH {R4-R11}
+ B general_C_handler
/* Reset Handler */