diff --git a/cpu/riscv_common/irq_arch.c b/cpu/riscv_common/irq_arch.c index ebd530f44b..f37b58e550 100644 --- a/cpu/riscv_common/irq_arch.c +++ b/cpu/riscv_common/irq_arch.c @@ -146,8 +146,8 @@ static void handle_trap(uword_t mcause) #ifdef DEVELHELP printf("Unhandled trap:\n"); printf(" mcause: 0x%" PRIx32 "\n", trap); - printf(" mepc: 0x%" PRIx32 "\n", read_csr(mepc)); - printf(" mtval: 0x%" PRIx32 "\n", read_csr(mtval)); + printf(" mepc: 0x%lx\n", read_csr(mepc)); + printf(" mtval: 0x%lx\n", read_csr(mtval)); #endif /* Unknown trap */ core_panic(PANIC_GENERAL_ERROR, "Unhandled trap");