diff --git a/libcpu/arm/stm32/fault.c b/libcpu/arm/stm32/fault.c index c3cf747018..7e45d2569d 100644 --- a/libcpu/arm/stm32/fault.c +++ b/libcpu/arm/stm32/fault.c @@ -17,7 +17,6 @@ extern void list_thread(void); extern rt_thread_t rt_current_thread; void rt_hw_hard_fault_exception(struct stack_contex* contex) { - rt_kprintf("hard fault on thread: %s\n", rt_current_thread->name); rt_kprintf("psr: 0x%08x\n", contex->psr); rt_kprintf(" pc: 0x%08x\n", contex->pc); rt_kprintf(" lr: 0x%08x\n", contex->lr); @@ -27,6 +26,7 @@ void rt_hw_hard_fault_exception(struct stack_contex* contex) rt_kprintf("r01: 0x%08x\n", contex->r1); rt_kprintf("r00: 0x%08x\n", contex->r0); + rt_kprintf("hard fault on thread: %s\n", rt_current_thread->name); #ifdef RT_USING_FINSH list_thread(); #endif