Skip to content

Commit 2f19ba6

Browse files
authored
[libcpu ][cm3]The parameter passed to the unified rt_exception_hook is exception_stack. (#10619)
1 parent f4e4188 commit 2f19ba6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libcpu/arm/cortex-m3/cpuport.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,14 @@ void rt_hw_hard_fault_exception(struct exception_info * exception_info)
294294
#if defined(RT_USING_FINSH) && defined(MSH_USING_BUILT_IN_COMMANDS)
295295
extern long list_thread(void);
296296
#endif
297-
struct stack_frame* context = &exception_info->stack_frame;
297+
struct exception_stack_frame *exception_stack = &exception_info->stack_frame.exception_stack_frame;
298+
struct stack_frame *context = &exception_info->stack_frame;
298299

299300
if (rt_exception_hook != RT_NULL)
300301
{
301302
rt_err_t result;
302303

303-
result = rt_exception_hook(exception_info);
304+
result = rt_exception_hook(exception_stack);
304305
if (result == RT_EOK)
305306
return;
306307
}

0 commit comments

Comments
 (0)