Bugfix/fix weak handle trap in riscv common crash rv64 trap handling (#9189)

* [bsp][hpmicro] add weak handle_trap implementation

- added weak handle_trap implementation

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>

* [libcpu][risc-v][common] remove weak handle_trap function

- removed weak handle_trap function from trap_common.c

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>

---------

Signed-off-by: Fan YANG <fan.yang@hpmicro.com>
This commit is contained in:
Fan Yang 2024-07-15 17:51:32 +08:00 committed by GitHub
parent ca4645000a
commit 96ba787e25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 56 additions and 7 deletions

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -302,3 +302,10 @@ void trap_entry(void)
write_fcsr(fcsr); write_fcsr(fcsr);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}

View File

@ -109,10 +109,3 @@ rt_weak void rt_show_stack_frame(void)
rt_kprintf("t6 : 0x%08x\r\n", s_stack_frame->t6); rt_kprintf("t6 : 0x%08x\r\n", s_stack_frame->t6);
#endif #endif
} }
/**
* Trap Handler
*/
rt_weak void handle_trap(rt_uint32_t mcause, rt_uint32_t mepc, rt_uint32_t sp)
{
}