X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fdrv%2Firq_lm3s.c;h=2ff83575fd699c2f8fb31e81e34149e8c297cb7a;hb=a61181f8614fe8257dc21bf1762a380165932348;hp=c1df50193b9fd34e958b65a957204ec4f2df4e96;hpb=73a7e9cb144007905b5b9de8e3086423e79b6d71;p=bertos.git diff --git a/bertos/cpu/cortex-m3/drv/irq_lm3s.c b/bertos/cpu/cortex-m3/drv/irq_lm3s.c index c1df5019..2ff83575 100644 --- a/bertos/cpu/cortex-m3/drv/irq_lm3s.c +++ b/bertos/cpu/cortex-m3/drv/irq_lm3s.c @@ -35,7 +35,8 @@ * \author Andrea Righi */ -#include +#include /* ASSERT() */ +#include /* LOG_ERR() */ #include #include "io/lm3s.h" #include "irq_lm3s.h" @@ -43,9 +44,15 @@ static void (*irq_table[NUM_INTERRUPTS])(void) __attribute__((section("vtable"))); -static void unhandled_isr(void) +/* Unhandled IRQ */ +static NORETURN NAKED void unhandled_isr(void) { - /* Unhandled IRQ */ + reg32_t reg; + + asm volatile ("mrs %0, ipsr" : "=r"(reg)); + LOG_ERR("unhandled IRQ %lu\n", reg); + PAUSE; + UNREACHABLE(); ASSERT(0); }