diff --git a/arch/risc-v/src/common/riscv_backtrace.c b/arch/risc-v/src/common/riscv_backtrace.c index b7be33d744..c59c10d9bc 100644 --- a/arch/risc-v/src/common/riscv_backtrace.c +++ b/arch/risc-v/src/common/riscv_backtrace.c @@ -142,8 +142,9 @@ int up_backtrace(struct tcb_s *tcb, void **buffer, int size, int skip) if (up_interrupt_context()) { #if CONFIG_ARCH_INTERRUPTSTACK > 15 - ret = backtrace(g_intstackalloc, - g_intstackalloc + CONFIG_ARCH_INTERRUPTSTACK, + ret = backtrace((uintptr_t *)g_intstackalloc, + (uintptr_t *)(g_intstackalloc + + CONFIG_ARCH_INTERRUPTSTACK), (void *)getfp(), NULL, buffer, size, &skip); #else ret = backtrace(rtcb->stack_base_ptr,