Author Topic: uTasker v2.0.0 doesn't compile on MCUXpresso v11.5.0 (.text LMA overlaps)  (Read 8613 times)

Offline Caleb

  • Newbie
  • *
  • Posts: 7
    • View Profile
Hi there,
   I tried compiling the latest V2.0.0 branch (and also master), and both fail when compiling with MCUXPresso 11.5.0.   The error is:

Code: [Select]
arm-none-eabi-gcc -nostartfiles -Xlinker -Map="uTaskerBM_loader.map" -Xlinker --gc-sections -Xlinker -print-memory-usage -Xlinker --sort-section=alignment -Xlinker --cref -mcpu=cortex-m7 -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mthumb -T iMX_RT_10XX_FlexSPI_NOR.ld -L "C:/Users/caleb/cobalt/cobalt-nxp-top-board/utasker/Applications/uTaskerBoot/GNU_iMX" -o "uTaskerBM_loader.axf"  ./uTasker/crypto.o  ./stack/SSL/mbedtls-1.3.10/aes_mbedTLS.o  ./Hardware/iMX/iMX.o  ./Applications/uTaskerBoot/uTaskerBootLoader.o   
c:/nxp/mcuxpressoide_11.5.0_7232/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.5.0.202107051138/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: section .text LMA [60000000,60001a25] overlaps section .text LMA [60000000,60001fff]
c:/nxp/mcuxpressoide_11.5.0_7232/ide/plugins/com.nxp.mcuxpresso.tools.win32_11.5.0.202107051138/tools/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld.exe: section .rodata LMA [60000000,60000029] overlaps section .text LMA [60000000,60001a25]

By going back to V11.4.x, it does compile.

Thanks,
 -Caleb

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3240
    • View Profile
    • uTasker
Re: uTasker v2.0.0 doesn't compile on MCUXpresso v11.5.0 (.text LMA overlaps)
« Reply #1 on: February 03, 2022, 03:20:47 AM »
Hi Caleb

I only installed V11.5.0 a couple of days ago but did see this error when trying to use its compiler and the GCC makefile build (so reverted back to the previous version to avoid it until studied).
What looks to be happening is that the new compiler libraries add something that wants to be in a section called LMA but, since there is no such section specified in the linker script file, the linker is trying to place this section either partly on top of itself or on top of other things and thus the overlap.

It means that the linker scripts used by GCC and MCUXpresso projects (when using this compiler version) will need to add such a section.

Taking a slightly closer look I don't know that it is a section but something different in the linker script requirement since it looks like .text and .rodata are being placed at the same location. There are various mentions of this and how to fix it - eg. https://programmerall.com/article/14172010184/ but a first quick try didn't help.
Possibly there is something that is not correct in the original linker script that the previous versions of the compiler/linker were tolerant of but now this needs to be solved correctly (?)
I'll study more but in the meantime I am also using the V11.4 to enable operation.

Regards

Mark

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3240
    • View Profile
    • uTasker