Skip to content

Commit 74b50e4

Browse files
GCC: ARM_CM0: Fix L6286E error on Keil MDK
Change the .b instruction to .bx with higher range to solve error reported by MDK descibed bellow. Fix: Error: L6286E: Relocation #REL:0 in portasm.o(.text.SVC_Handler) with respect to vPortSVCHandler_C. Value(0x1a04) out of range(-0x800 - 0x7fe) for (R_ARM_THM_JUMP11) Compiler: Keil MDK ARMClang 6.22.0 https://developer.arm.com/documentation/ka002847/latest/ https://developer.arm.com/documentation/dui0496/m/Linker-Errors-and-Warnings/List-of-the-armlink-error-and-warning-messages Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
1 parent 23cfd11 commit 74b50e4

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

portable/GCC/ARM_CM0/portasm.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,8 @@ void vClearInterruptMask( __attribute__( ( unused ) ) uint32_t ulMask ) /* __att
472472
" ldr r3, =%1 \n"
473473
" cmp r2, r3 \n"
474474
" beq system_call_exit \n"
475-
" b vPortSVCHandler_C \n"
475+
" ldr r3, =vPortSVCHandler_C \n"
476+
" bx r3 \n"
476477
" \n"
477478
" system_call_enter: \n"
478479
" push {lr} \n"
@@ -508,11 +509,13 @@ void vClearInterruptMask( __attribute__( ( unused ) ) uint32_t ulMask ) /* __att
508509
" \n"
509510
" stacking_used_psp: \n"
510511
" mrs r0, psp \n"
511-
" b vPortSVCHandler_C \n"
512+
" ldr r3, =vPortSVCHandler_C \n"
513+
" bx r3 \n"
512514
" \n"
513515
" stacking_used_msp: \n"
514516
" mrs r0, msp \n"
515-
" b vPortSVCHandler_C \n"
517+
" ldr r3, =vPortSVCHandler_C \n"
518+
" bx r3 \n"
516519
" \n"
517520
" .align 4 \n"
518521
);

0 commit comments

Comments
 (0)