提交 4d70222c 编写于 作者: B Bernard Xiong

Merge pull request #104 from visitor83/gdb

indent format cortex-m3/cpuport.c, thank peter.uboot@gmail.com
...@@ -102,7 +102,7 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, ...@@ -102,7 +102,7 @@ rt_uint8_t *rt_hw_stack_init(void *tentry,
*/ */
void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context)) void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context))
{ {
rt_exception_hook = exception_handle; rt_exception_hook = exception_handle;
} }
/* /*
...@@ -110,15 +110,16 @@ void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context)) ...@@ -110,15 +110,16 @@ void rt_hw_exception_install(rt_err_t (*exception_handle)(void* context))
*/ */
void rt_hw_hard_fault_exception(struct exception_stack_frame* context) void rt_hw_hard_fault_exception(struct exception_stack_frame* context)
{ {
extern long list_thread(void); extern long list_thread(void);
if (rt_exception_hook != RT_NULL) if (rt_exception_hook != RT_NULL)
{ {
rt_err_t result; rt_err_t result;
result = rt_exception_hook(context); result = rt_exception_hook(context);
if (result == RT_EOK) return; if (result == RT_EOK)
} return;
}
rt_kprintf("psr: 0x%08x\n", context->psr); rt_kprintf("psr: 0x%08x\n", context->psr);
rt_kprintf(" pc: 0x%08x\n", context->pc); rt_kprintf(" pc: 0x%08x\n", context->pc);
...@@ -135,7 +136,8 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame* context) ...@@ -135,7 +136,8 @@ void rt_hw_hard_fault_exception(struct exception_stack_frame* context)
list_thread(); list_thread();
#endif #endif
while (1); while (1)
;
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册