diff options
Diffstat (limited to 'interrupts.c')
-rw-r--r-- | interrupts.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/interrupts.c b/interrupts.c new file mode 100644 index 0000000..3dc3d6f --- /dev/null +++ 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 |