From 6a0d160604306b708896fb725fd0db8edda19cbb Mon Sep 17 00:00:00 2001 From: "bernard.xiong" Date: Tue, 1 Dec 2009 15:28:44 +0000 Subject: [PATCH] when fault occurs, the registers dump shall be output firstly. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@186 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- libcpu/arm/stm32/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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