<?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: Linkscripts and how to put all data from a specific object file into a specific part of memory in MCUXpresso IDE</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/Linkscripts-and-how-to-put-all-data-from-a-specific-object-file/m-p/1172486#M6264</link>
    <description>&lt;P&gt;I also had to add fsl_usdhc.o to the list.&amp;nbsp; Now I just have problems in my own code (well, ESP32's code).&amp;nbsp; Some of this code uses "buffers" on the stack/heap (uint32_ts and such).&amp;nbsp; I just have to figure out a good way to make those end up in DTC (because the stack/heap is in OC by default).&lt;/P&gt;</description>
    <pubDate>Fri, 23 Oct 2020 13:48:26 GMT</pubDate>
    <dc:creator>nxp16</dc:creator>
    <dc:date>2020-10-23T13:48:26Z</dc:date>
    <item>
      <title>Linkscripts and how to put all data from a specific object file into a specific part of memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Linkscripts-and-how-to-put-all-data-from-a-specific-object-file/m-p/1172042#M6262</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have at least two object files whose data (.data and .bss) needs to go into SRAM_DTC, and not just their globals.&amp;nbsp; I have an app that uses USDHC.&amp;nbsp; If I build a version of this app with all data put in SRAM_DTC by default (using C/C++ Build &amp;gt;Settings &amp;gt;&amp;nbsp;Linker &amp;gt; Managed Linker Script settings), it works perfectly.&amp;nbsp; However, if I build a version that puts all data into SRAM_OC by default, it doesn't work at all.&amp;nbsp; I think it's due to some things being accessed via DMA that need to be in DTC.&amp;nbsp; I know I can use __attribute__ section tags inside my code, but this is not helping.&amp;nbsp; I need to be able to be able to tell the linker to put an entire .o file of .data/.bss into DTC using a linker file (unless there is another way).&amp;nbsp; I tried this using the flexspi nor example as a base and modifying it thusly:&lt;/P&gt;&lt;P&gt;linkscripts/bss.ldt:&lt;/P&gt;&lt;P&gt;&amp;lt;#if memory.name=="SRAM_DTC"&amp;gt;&lt;BR /&gt;*esp_sdio.o(.bss*)&lt;BR /&gt;*esp_slave.o(.bss*)&lt;BR /&gt;&amp;lt;/#if&amp;gt;&lt;/P&gt;&lt;P&gt;data.ldt:&lt;/P&gt;&lt;P&gt;&amp;lt;#if memory.name=="SRAM_DTC"&amp;gt;&lt;BR /&gt;*esp_sdio.o(.data*)&lt;BR /&gt;*esp_slave.o(.data*)&lt;BR /&gt;&amp;lt;/#if&amp;gt;&lt;/P&gt;&lt;P&gt;main_bss.ldt:&lt;/P&gt;&lt;P&gt;*(EXCLUDE_FILE(*esp_sdio.o *esp_slave.o) .bss*)&lt;/P&gt;&lt;P&gt;main_data.ldt:&lt;/P&gt;&lt;P&gt;*(EXCLUDE_FILE(*esp_sdio.o *esp_slave.o) .data*)&lt;/P&gt;&lt;P&gt;But unfortunately, this causes problems with any other data where I've specifically used __attribute__ section to put things into DTC (they end up in OC instead!) in other object modules.&lt;/P&gt;&lt;P&gt;Can anyone help me with this?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 21:29:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Linkscripts-and-how-to-put-all-data-from-a-specific-object-file/m-p/1172042#M6262</guid>
      <dc:creator>nxp16</dc:creator>
      <dc:date>2020-10-22T21:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Linkscripts and how to put all data from a specific object file into a specific part of memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Linkscripts-and-how-to-put-all-data-from-a-specific-object-file/m-p/1172053#M6263</link>
      <description>&lt;P&gt;It turns out, that it's not just my code.&amp;nbsp; The sdmmc drivers provided with the sdk do NOT work at all if you default global data placement to SRAM_OC (which I have to do because my full app uses too much ram for DTC).&amp;nbsp; I was somewhat able to get this working by adding sections to the link settings but not fully yet:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sdio-ram-stuff-10-22-2020 6-14-02 PM.jpg" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/128079i01B90F34453F6BEC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sdio-ram-stuff-10-22-2020 6-14-02 PM.jpg" alt="sdio-ram-stuff-10-22-2020 6-14-02 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I will update here when I've figured it out fully.&amp;nbsp; I wonder if the same problem happens using SDRAM as the default?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Oct 2020 22:17:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Linkscripts-and-how-to-put-all-data-from-a-specific-object-file/m-p/1172053#M6263</guid>
      <dc:creator>nxp16</dc:creator>
      <dc:date>2020-10-22T22:17:03Z</dc:date>
    </item>
    <item>
      <title>Re: Linkscripts and how to put all data from a specific object file into a specific part of memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/Linkscripts-and-how-to-put-all-data-from-a-specific-object-file/m-p/1172486#M6264</link>
      <description>&lt;P&gt;I also had to add fsl_usdhc.o to the list.&amp;nbsp; Now I just have problems in my own code (well, ESP32's code).&amp;nbsp; Some of this code uses "buffers" on the stack/heap (uint32_ts and such).&amp;nbsp; I just have to figure out a good way to make those end up in DTC (because the stack/heap is in OC by default).&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2020 13:48:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/Linkscripts-and-how-to-put-all-data-from-a-specific-object-file/m-p/1172486#M6264</guid>
      <dc:creator>nxp16</dc:creator>
      <dc:date>2020-10-23T13:48:26Z</dc:date>
    </item>
  </channel>
</rss>

