Use a dummy fault handler in core and move the "user defined" one to main.c
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 17 Apr 2014 09:19:26 +0000 (11:19 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:04 +0000 (17:03 +0100)
core/fault_handlers.c

index d1bfe25..56bc0d0 100644 (file)
 #include "core/lpc_regs_12xx.h"
 #include "drivers/serial.h"
 
-void fault_info(const char* name, uint32_t len)
-{
-       serial_write(1, name, len);
+void fault_info(const char* name, uint32_t len) __attribute__ ((weak, alias ("Dummy_Fault_Handler")));
+
+void Dummy_Fault_Handler(const char* name, uint32_t len) {
+       while (1);
 }
 
 /* Cortex M0 core interrupt handlers */