FreeRTOS / FreeRTOS-Kernel

FreeRTOS kernel files only, submoduled into https://github.com/FreeRTOS/FreeRTOS and various other repos.
https://www.FreeRTOS.org
MIT License
2.66k stars 1.1k forks source link

Keil MDK Compilation for CM0 core reports L6286E: Relocation #REL:0 in portasm.o #1130

Closed TomasGalbickaNXP closed 2 weeks ago

TomasGalbickaNXP commented 2 weeks ago

Describe the bug

When building portasm.c after update with adding MPU port see commit bellow: https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/345a86d49bca4f278ecb38516f675f3732255267

The build with Keil MDK reports following error.

Error: L6286E: Relocation #REL:0 in portasm.o(.text.SVC_Handler) with respect to vPortSVCHandler_C. Value(0x19dc) out of range(-0x800 - 0x7fe) for (R_ARM_THM_JUMP11)

Target

Host

To Reproduce git clone https://github.com/TomasGalbickaNXP/freertos-port-cm0-core-issue.git Checkout the Example with added CM0 MPU port. git checkout 40af92d06408450e11ca10ad17cd578760fd861a Open MDK Project and build. It will fail with error reported above. Checkout fix git checkout 72a9d6246277ae32594bab69fef66c6e13af3cd1 Open MDK Project and build. The build reports no Errors.

Expected behavior The linking step reports no Errors.

felicityzhao9 commented 2 weeks ago

Hi @TomasGalbickaNXP, thank you for notifying us about your issue and pointing out the bug. We’ll include it in our queue and work on a solution shortly.

TomasGalbickaNXP commented 2 weeks ago

Hello, issue si being solved in this PR #1131.