Hi Vadim, Add an entry in section .flashxip or .text for the _udivmoddi4.o and move it to see if you can clear the error.
See https://github.com/PX4/PX4-Autopilot/blob/master/boards/nxp/fmurt1062-v1/nuttx-config/scripts/ocram-script.ld#L105-L137 For what it takes to position an obj module. David -----Original Message----- From: Вадим Ястребов [mailto:woody_haw...@mail.ru.INVALID] Sent: Monday, November 23, 2020 11:33 AM To: dev@nuttx.apache.org Subject: Re[2]: iMXRT1064-EVK nshocram linking issue Thank you for your prompt reply, David! I already have nsh config working from 4MB internal flash which starts from 0x70000000. I am not using neither Hyperflash nor external flash. This has also been verified by measuring voltage values on CE low pins of each chip. Someone else was also successful in making it work from internal flash as described on github: https://github.com/apache/incubator-nuttx/issues/1494 The problem is making it work for nshocram configuration. I cannot seem to understand what that linking error means. Thank you. Vadim >Понедельник, 23 ноября 2020, 19:09 +03:00 от David Sidrane ><david.sidr...@nscdg.com>: > >Hi Vadim, > >I do not recall all the deltas from the 1062 to the 1064. But the 1064 may >have other IP changes, and memory map differences > >You should create a board new directory imxrt1060-evk. And make the changes >there. > >You will need to know what kind of memory is embedded. Hyper flash or QSPI > >Also start with nsh config as nshocram is more complex. > >David > > >-----Original Message----- >From: Вадим Ястребов [mailto:woody_haw...@mail.ru.INVALID] >Sent: Monday, November 23, 2020 7:56 AM >To: dev@nuttx.apache.org >Subject: iMXRT1064-EVK nshocram linking issue > > >Hello, > >My name is Vadim. I am new to NuttX and to the embedded world in general. I >am trying to compile NuttX nshocram configuration for IMXRT1064-EVK board >using 1060 configuration with changes to flash-ocram.ld and >imxrt_flexspi_nor_boot.h. > >In imxrt_flexspi_nor_boot.h, I changed FLASH_BASE from 0x60000000 to >0x70000000 . > >In flash-ocram.ld, I changed: >flash (rx) : ORIGIN and LENGTH from 0x60000000 and 7M to 0x70000000 >and 3M → changing origin address alone leads to this error. Everything >links >with no issue otherwise (even with other changes excluding this one). >flashxip (rx) : ORIGIN and LENGTH from 0x60700000 and 1M to 0x70300000 >and 1M > > >I am getting relocation truncated to fit error: > >make[2]: Entering directory >'/home/vadim/Downloads/nuttx_nov20/nuttx/boards/arm/imxrt/imxrt1060-evk/src' >CC: imxrt_boot.c >CC: imxrt_flexspi_nor_boot.c >CC: imxrt_flexspi_nor_flash.c >CC: imxrt_appinit.c >CC: imxrt_bringup.c >CC: imxrt_autoleds.c >AR (create): libboard.a imxrt_boot.o imxrt_flexspi_nor_boot.o >imxrt_flexspi_nor_flash.o imxrt_appinit.o imxrt_bringup.o imxrt_autoleds.o >make[2]: Leaving directory >'/home/vadim/Downloads/nuttx_nov20/nuttx/boards/arm/imxrt/imxrt1060-evk/src' >LD: nuttx >/usr/lib/gcc/arm-none-eabi/10.2.0/thumb/v7e-m+dp/hard/libgcc.a(_udivmoddi4.o):(.ARM.exidx.text.__udivmoddi4+0x0): >relocation truncated to fit : R_ARM_PREL31 against `.text.__udivmoddi4' >make[1]: *** [Makefile:172: nuttx] Error 1 >make[1]: Leaving directory >'/home/vadim/Downloads/nuttx_nov20/nuttx/arch/arm/src' >make: *** [tools/Makefile.unix:423: nuttx] Error 2 > > > >I was wondering what needs to be done to make it work? > >Please, let me know. > >Thank you for your time. > >Regards, >Vadim