#include <link.h>
#include <led.h>
#include <uart.h>
+#include <panic.h>
/* Initialize just enough to be able to handle a fault. */
__attribute__ ((noinline, used)) static void
asm ("b kentry");
}
+/* TODO write proper exception handlers, this is just a test */
+__attribute__ ((noreturn)) static void
+fault_handler (void)
+{
+ panic ("Fault");
+}
+
__attribute__ ((section (".vector_table"), used))
static unsigned long const vector_table[] = {
- (unsigned long) &_sram_end,
- (unsigned long) reset_handler,
+ [0] = (unsigned long) &_sram_end,
+ [1] = (unsigned long) reset_handler,
+ [3] = (unsigned long) fault_handler, /* ??? */
+ [6] = (unsigned long) fault_handler,
};