Add chDbgPanic for unhandled exceptions.

This commit is contained in:
Jared Boone 2016-02-27 12:05:29 -08:00
parent 6101ca36cd
commit eb294c8e1c
2 changed files with 16 additions and 4 deletions

View file

@ -81,18 +81,27 @@ void port_halt(void) {
#if defined(LPC43XX_M4)
CH_IRQ_HANDLER(MemManageVector) {
CH_IRQ_PROLOGUE();
#if CH_DBG_ENABLED
chDbgPanic("MemManage");
#else
chSysHalt();
#endif
}
CH_IRQ_HANDLER(BusFaultVector) {
CH_IRQ_PROLOGUE();
#if CH_DBG_ENABLED
chDbgPanic("BusFault");
#else
chSysHalt();
#endif
}
CH_IRQ_HANDLER(UsageFaultVector) {
CH_IRQ_PROLOGUE();
#if CH_DBG_ENABLED
chDbgPanic("UsageFault");
#else
chSysHalt();
#endif
}
#endif