<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: iMX8M Nano Memory Map in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1355782#M181552</link>
    <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192397"&gt;@ycx&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Generally the linker file lines below are intended for code / data&amp;nbsp; relocation.&lt;BR /&gt;&lt;BR /&gt;_&lt;EM&gt;_DATA_ROM = .; /* Symbol is used by startup for data initialization */&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;.data : AT(__DATA_ROM)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Please use the linked below file with explanation how to do it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/Relocating-Code-and-Data-Using-the-KDS-GCC-Linker-File-for/ta-p/1121931" target="_blank"&gt;https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/Relocating-Code-and-Data-Using-the-KDS-GCC-Linker-File-for/ta-p/1121931 &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In Your case - perhaps - it would be better to try using DRAM configuration; *_cm7_ddr_ram.ld&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Yuri.&lt;/P&gt;</description>
    <pubDate>Thu, 14 Oct 2021 10:32:46 GMT</pubDate>
    <dc:creator>Yuri</dc:creator>
    <dc:date>2021-10-14T10:32:46Z</dc:date>
    <item>
      <title>iMX8M Nano Memory Map</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1355059#M181492</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am currently developing a firmware on the Cortex-M7 of the i.MX8M Nano (MIMX8MN4CVTIZ) based on an example using RPmsg-lite, remoteproc, FreeRTOS and CMSIS-DSP.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to build using the linker file&amp;nbsp;MIMX8MN4xxxxx_cm7_ram.ld provided by the MCUXpresso SDK with the following configuration :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;/* Specify the memory areas */&lt;BR /&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt;  m_interrupts          (RX)  : ORIGIN = 0x00000000, LENGTH = 0x00000240&lt;BR /&gt;  m_text                (RX)  : ORIGIN = 0x00000240, LENGTH = 0x0001FDC0&lt;BR /&gt;  m_data                (RW)  : ORIGIN = 0x20000000, LENGTH = 0x00020000&lt;BR /&gt;  m_data2               (RW)  : ORIGIN = 0x80000000, LENGTH = 0x01000000&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Which would apparently start at the ITCM of the system according to the declared memory map :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ycx_0-1634135413179.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/159010i574F2872963B31BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ycx_0-1634135413179.png" alt="ycx_0-1634135413179.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I build the text section is quite big (mostly due to CMSIS-DSP) :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Memory region         Used Size  Region Size  %age Used
    m_interrupts:         576 B        576 B    100.00%
          m_text:      123704 B     130496 B     94.80%
          m_data:       61032 B       128 KB     46.56%
         m_data2:          0 GB        16 MB      0.00%&lt;/PRE&gt;&lt;P&gt;And when I run it I get this error :&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;[ 82.135828] imx-rproc imx8mn-cm7: Translation failed: da = 0x1e578 len = 0xee68&lt;BR /&gt;[ 82.143174] remoteproc remoteproc0: bad phdr da 0x1e578 mem 0xee68&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;In the output.map I see the address in error corresponds to __DATA_ROM, the end of the text section :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;                0x000000000001e578                __etext = .
                0x000000000001e578                __DATA_ROM = .

.data           0x0000000020000000       0x98 load address 0x000000000001e578
                0x0000000020000000                . = ALIGN (0x4)
                0x0000000020000000                __DATA_RAM = .
                0x0000000020000000                __data_start__ = .
 *(.data)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is regarding the section declaration of the same linker file :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   /* The program code and other data goes into internal RAM */&lt;BR /&gt; .text :&lt;BR /&gt; {&lt;BR /&gt;   . = ALIGN(4);&lt;BR /&gt;   *(.text)                 /* .text sections (code) */&lt;BR /&gt;   *(.text*)                /* .text* sections (code) */&lt;BR /&gt;   *(.rodata)               /* .rodata sections (constants, strings, etc.) */&lt;BR /&gt;   *(.rodata*)              /* .rodata* sections (constants, strings, etc.) */&lt;BR /&gt;   *(.glue_7)               /* glue arm to thumb code */&lt;BR /&gt;   *(.glue_7t)              /* glue thumb to arm code */&lt;BR /&gt;   *(.eh_frame)&lt;BR /&gt;   KEEP (*(.init))&lt;BR /&gt;   KEEP (*(.fini))&lt;BR /&gt;   . = ALIGN(4);&lt;BR /&gt; } &amp;gt; m_text&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt; __etext = .;    /* define a global symbol at end of code */&lt;BR /&gt; __DATA_ROM = .; /* Symbol is used by startup for data initialization */&lt;BR /&gt;&lt;BR /&gt; .data : AT(__DATA_ROM)&lt;BR /&gt; {&lt;BR /&gt;   . = ALIGN(4);&lt;BR /&gt;   __DATA_RAM = .;&lt;BR /&gt;   __data_start__ = .;      /* create a global symbol at data start */&lt;BR /&gt;   *(.data)                 /* .data sections */&lt;BR /&gt;   *(.data*)                /* .data* sections */&lt;BR /&gt;   KEEP(*(.jcr*))&lt;BR /&gt;   . = ALIGN(4);&lt;BR /&gt;   __data_end__ = .;        /* define a global symbol at data end */&lt;BR /&gt; } &amp;gt; m_data&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does ".data : AT(__DATA_ROM)" mean that the .data section starts at the end of the .text section ? Why is that and therefore what is the point declaring the start address of m_data in MEMORY {} ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand correctly this would mean that .data section could overflow the ITCM range, especially when .text is close to its maximum size like my fw. What am I or the linker doing wrong ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks a lot your help!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 14:31:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1355059#M181492</guid>
      <dc:creator>ycx</dc:creator>
      <dc:date>2021-10-13T14:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Nano Memory Map</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1355782#M181552</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192397"&gt;@ycx&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Generally the linker file lines below are intended for code / data&amp;nbsp; relocation.&lt;BR /&gt;&lt;BR /&gt;_&lt;EM&gt;_DATA_ROM = .; /* Symbol is used by startup for data initialization */&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;.data : AT(__DATA_ROM)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Please use the linked below file with explanation how to do it.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/Relocating-Code-and-Data-Using-the-KDS-GCC-Linker-File-for/ta-p/1121931" target="_blank"&gt;https://community.nxp.com/t5/Kinetis-Design-Studio-Knowledge/Relocating-Code-and-Data-Using-the-KDS-GCC-Linker-File-for/ta-p/1121931 &lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;In Your case - perhaps - it would be better to try using DRAM configuration; *_cm7_ddr_ram.ld&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Yuri.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 10:32:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1355782#M181552</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2021-10-14T10:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Nano Memory Map</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1359579#M181911</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I build with _cm7_ddr_ram.ld and it cannot boot when loaded from linux with remoteproc :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[ 1302.815264] remoteproc remoteproc0: Booting fw image octopus_fw_m7.elf.elf, size 515580&lt;BR /&gt;[ 1302.823689] remoteproc remoteproc0: bad phdr da 0x80000000 mem 0x240&lt;BR /&gt;[ 1302.830075] remoteproc remoteproc0: Failed to load program segments: -22&lt;BR /&gt;[ 1302.837157] remoteproc remoteproc0: Boot failed: -22&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I have reserve the memory on linux' size :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;reserved-memory&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#address-cells = &amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;#size-cells = &amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;ranges;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;m7_reserved&lt;/SPAN&gt;&lt;SPAN&gt;: m7@&lt;/SPAN&gt;&lt;SPAN&gt;0x80000000&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;no-map;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;reg = &amp;lt;&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt; &lt;SPAN&gt;0x80000000&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt; &lt;SPAN&gt;0x1000000&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:26:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1359579#M181911</guid>
      <dc:creator>ycx</dc:creator>
      <dc:date>2021-10-21T15:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Nano Memory Map</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1360780#M182063</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192397"&gt;@ycx&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have some doubts regarding memory address of 8000_0000 for CM7&lt;BR /&gt;address area. According to chapter 2.1.3 (Cortex-M7 Memory Map) of &lt;BR /&gt;i.MX 8M Nano&amp;nbsp; Reference Manual (Rev. 1, 11/2020) :&lt;/P&gt;
&lt;P&gt;4000_0000 - BFFF_FFFF is DDR Address of 2048MB &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Yuri.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Oct 2021 09:51:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1360780#M182063</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2021-10-25T09:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Nano Memory Map</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1363982#M182337</link>
      <description>&lt;P&gt;Hi Yuri,&lt;BR /&gt;&lt;BR /&gt;Yes and my system only has 512MB DDR which only makes ranges 0x4000_0000 - 0x6000_0000 available (for M7 this range is peripheral: Execute Never). How do I configure the linker script so that I can load M7 firmware in DDR from uboot ?&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;BR /&gt;Yann&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 14:45:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1363982#M182337</guid>
      <dc:creator>ycx</dc:creator>
      <dc:date>2021-10-29T14:45:43Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Nano Memory Map</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1363988#M182338</link>
      <description>&lt;P&gt;My guess is I should use aliased range that is (M7) 0x1000_0000 - 0x1FFD_FFFF according to memory map, which makes (A53) 0x4000_0000 - 0x4FFD_FFFF.&lt;/P&gt;&lt;P&gt;So after moving kernel load address etc and reserving e.g. (A53) 0x4000_0000 - 0x40FF_FFFF, I should put offset 0x1000_0000 in the linker script and, in uboot, load fw at address 0x4000_0000.&lt;/P&gt;&lt;P&gt;Correct ?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 14:57:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1363988#M182338</guid>
      <dc:creator>ycx</dc:creator>
      <dc:date>2021-10-29T14:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: iMX8M Nano Memory Map</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1364353#M182388</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/192397"&gt;@ycx&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Yes, generally Your approach is correct.&lt;/P&gt;
&lt;P&gt;Note: aliased range (M7) 0x1000_0000 - 0x1FFD_FFFF corresponds (M7)&lt;BR /&gt;0x4000_0000 - BFFF_FFFF, which in its turn maps to A53 0x4000_0000 - BFFF_FFFF.&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Yuri.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 06:33:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/iMX8M-Nano-Memory-Map/m-p/1364353#M182388</guid>
      <dc:creator>Yuri</dc:creator>
      <dc:date>2021-11-01T06:33:51Z</dc:date>
    </item>
  </channel>
</rss>

