This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MCU-PLUS-SDK-AM243X: Linker error

Part Number: MCU-PLUS-SDK-AM243X

HI all,

I am using

  • mcu_plus_sdk_am243x_08_03_00_18
  • CCS 11.1 with ARM compiler  TI Clang V1.3.0 LTS

I used the I2e Blink example and added some C++ code from a company project (without that, everything is fine). I get the Linker error:

warning #17003-D: relocation to symbol "__TI_exidx_linkto_scn_start_1" overflowed; the 32-bit relocated address 0x8ff11f98 is too large to encode in the 31-bit signed PC-Relative field (type = 'R_ARM_PREL31' (42), file = "<internal>", offset = 0x00000000, section = ".ARM.exidx.vectors:freertos.am243x.r5f.ti-arm-clang.debug.lib<HwiP_armv7r_vectors_freertos_asm.obj>")
warning #10015-D: output file "drive_r5_0_0.out" cannot be loaded and run on a target system
Finished building target: "drive_r5_0_0.out"

It seems to me that the "relocated address" is -address(.ARM.exidx),

  • I could not solve the issue by moving that section. I cannot move it above 0x80000000, since the board has no DDR RAM.
  • I disabled exception handling and support for C++ runtime information, tbus did not help

What can I do?

Best regards

Alexander

Below is the head of my map file:

******************************************************************************
TI ARM Clang Linker PC v1.3.0
******************************************************************************
>> Linked Thu Sep 1 19:53:40 2022

OUTPUT FILE NAME: <drive_r5_0_0.out>
ENTRY POINT SYMBOL: "_vectors" address: 00000000


MEMORY CONFIGURATION

name origin length used unused attr fill
---------------------- -------- --------- -------- -------- ---- --------
R5F_VECS 00000000 00000040 00000040 00000000 RWIX
R5F_TCMA 00000040 00007fc0 00000000 00007fc0 RWIX
R5F_TCMB0 41010000 00008000 00000000 00008000 RWIX
FLASH 60100000 00080000 00000000 00080000 RWIX
NON_CACHE_MEM 70060000 00008000 00000000 00008000 RWIX
MSRAM 70080000 00100000 0006e080 00091f80 RWIX
USER_SHM_MEM 701d0000 00000180 00000000 00000180 RWIX
LOG_SHM_MEM 701d0180 00003e80 00000000 00003e80 RWIX
RTOS_NORTOS_IPC_SHM_M 701d4000 0000c000 00000000 0000c000 RWIX


SEGMENT ALLOCATION MAP

run origin load origin length init length attrs members
---------- ----------- ---------- ----------- ----- -------
00000000 00000000 00000040 00000040 r-x
00000000 00000000 00000040 00000040 r-x .vectors
70080000 70080000 00056da0 00056da0 r-x
70080000 70080000 00052010 00052010 r-x .text
700d2010 700d2010 00004d90 00004d90 r-- .rodata
700d6da0 700d6da0 00013400 00000000 rw-
700d6da0 700d6da0 00007400 00000000 rw- .bss
700de1a0 700de1a0 00008000 00000000 rw- .sysmem
700e61a0 700e61a0 00004000 00000000 rw- .stack
700ea1a0 700ea1a0 00001608 00001608 rw-
700ea1a0 700ea1a0 00001608 00001608 rw- .data
700eb7b0 700eb7b0 000028b8 000014b8 r-x
700eb7b0 700eb7b0 00000c10 00000c10 r-x .text.hwi
700ec3c0 700ec3c0 00000490 00000490 r-x .text.cache
700ec850 700ec850 000002d0 000002d0 r-x .text.mpu
700ecb20 700ecb20 00000140 00000140 r-x .text.boot
700ecc60 700ecc60 00000008 00000008 r-x .text:abort
700ecc68 700ecc68 00000100 00000000 r-- .irqstack
700ecd68 700ecd68 00000100 00000000 r-- .fiqstack
700ece68 700ece68 00001000 00000000 r-- .svcstack
700ede68 700ede68 00000100 00000000 r-- .abortstack
700edf68 700edf68 00000100 00000000 r-- .undefinedstack
700ee068 700ee068 00000020 00000020 r--
700ee068 700ee068 00000008 00000008 r-- .ARM.exidx
700ee070 700ee070 00000018 00000018 r-- .init_array

  • It appears you have the problem discussed in this forum thread.  The section .ARM.exidx should not be created.  But, due to a problem in the compiler, it is.  In that case, the workaround was to change the linker command file to allocate the section .ARM.exidx into the memory range R5F_VECS.  The solution in your case might be the same.

    Please let me know if this suggestion resolves the problem.

    Thanks and regards,

    -George

  • R5F_VECS is full, but linking .ARM.extidx to R5F_TCMB0 solves the problem.

    Thanks

    Alexander