From 25d180a09b87b94003a8bc2c8628b610c106ad79 Mon Sep 17 00:00:00 2001 From: Ming Yue Date: Tue, 15 Feb 2022 14:56:13 -0800 Subject: [PATCH] Use a dedicated symbol for in-function loop to avoid the weak symbol JAL range error when a strong symbol is defined outside. (#455) --- portable/GCC/RISC-V/portASM.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/portable/GCC/RISC-V/portASM.S b/portable/GCC/RISC-V/portASM.S index ca50d437e..aa86b0ca5 100644 --- a/portable/GCC/RISC-V/portASM.S +++ b/portable/GCC/RISC-V/portASM.S @@ -274,17 +274,19 @@ xPortStartFirstTask: /*-----------------------------------------------------------*/ freertos_risc_v_application_exception_handler: +__application_exception_handler_loop: csrr t0, mcause /* For viewing in the debugger only. */ csrr t1, mepc /* For viewing in the debugger only */ csrr t2, mstatus /* For viewing in the debugger only */ - j freertos_risc_v_application_exception_handler + j __application_exception_handler_loop /*-----------------------------------------------------------*/ freertos_risc_v_application_interrupt_handler: +__application_interrupt_handler_loop: csrr t0, mcause /* For viewing in the debugger only. */ csrr t1, mepc /* For viewing in the debugger only */ csrr t2, mstatus /* For viewing in the debugger only */ - j freertos_risc_v_application_interrupt_handler + j __application_interrupt_handler_loop /*-----------------------------------------------------------*/ .section .text.freertos_risc_v_exception_handler