aboutsummaryrefslogtreecommitdiff
path: root/interrupts.c
diff options
context:
space:
mode:
Diffstat (limited to 'interrupts.c')
-rw-r--r--interrupts.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/interrupts.c b/interrupts.c
index e69de29..3dc3d6f 100644
--- a/interrupts.c
+++ b/interrupts.c
@@ -0,0 +1,15 @@
+#include "uart.h"
+/**
+ @brief The undefined instruction interrupt handler
+
+ If an undefined instruction is encountered, the CPU will start
+ executing this function. Just trap here as a debug solution.
+*/
+void __attribute__((interrupt("UNDEF"))) undefined_instruction_vector(void)
+{
+ uart_puts("Undefined instruction occured");
+ while( 1 )
+ {
+ /* Do Nothing! */
+ }
+} \ No newline at end of file