<?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: Setting Variables/Functions to specific memory in MCUXpresso General</title>
    <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964142#M2602</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with the boot process for the iMX1015 part, so I can't comment on what the boot loader will or will not do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your question about loading the initial values into the array - it is your application that does this, automatically. The linker and the startup code does this for you - you do not do anything, but the code and the data are there to do it for you. This is why you have this reserved space at the end of the .text section - to contain the array's initial values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 01 Sep 2019 08:36:00 GMT</pubDate>
    <dc:creator>converse</dc:creator>
    <dc:date>2019-09-01T08:36:00Z</dc:date>
    <item>
      <title>Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964129#M2589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Following these NXP community examples (&lt;A _jive_internal="true" href="https://community.nxp.com/thread/389100"&gt;Placing Data into different RAM Blocks&lt;/A&gt;&amp;nbsp;from &lt;A _jive_internal="true" href="https://community.nxp.com/thread/389099"&gt;Placing Functions into RAM Blocks&lt;/A&gt;) seems to work (compile) - but the MCUXpresso IDE is giving warnings - indicating that maybe the MCUXpresso Indexer&amp;nbsp;can't find the header.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code example:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px; "&gt;&lt;SPAN class=""&gt;#include&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;lt;cr_section_macros.h&amp;gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;SPAN class=""&gt;__DATA(RAM2) &lt;/SPAN&gt;&lt;SPAN class=""&gt;unsigned&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;char&lt;/SPAN&gt;&lt;SPAN class=""&gt;&amp;nbsp;array[]={&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp;0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-size: 12px;"&gt;&amp;nbsp; &amp;nbsp;0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-size: 12px;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Warnings:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;Unresolved inclusion: &amp;lt;cr_section_macros.h&amp;gt;&lt;/P&gt;&lt;P class=""&gt;And syntax error on the array variable.&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;I've tried:&lt;/P&gt;&lt;P class=""&gt;1. Cleaning &amp;amp; rebuilding project&lt;/P&gt;&lt;P class=""&gt;2. Right clicking the project in MCUXpresso&amp;nbsp;-&amp;gt; Index -&amp;gt; Rebuild, Freshen, Update, Re-resolve, Search for unresolved&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;But I couldn't get rid of the yellow warning errors from indexer, even tho no problems show up @ build time in the Problems window.&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;So my questions are:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;1. How do I get rid of the above indexing errors so I don't have all code highlighted w/ yellow?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;2.&amp;nbsp;Are the above 2 referenced NXP Community articles (for&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;LPCXpresso) also valid for the RT1015 in MCUXpresso?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f; "&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 17:33:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964129#M2589</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-08-23T17:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964130#M2590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://mcuoneclipse.com/2012/03/20/fixing-the-eclipse-index/" title="https://mcuoneclipse.com/2012/03/20/fixing-the-eclipse-index/"&gt;Fixing the Eclipse Index | MCU on Eclipse&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 18:12:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964130#M2590</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-08-23T18:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964131#M2591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the quick response, but unfortunately still no dice for the above includes after going to preferences and updating indexer settings (heuristics / use active build) as per the article you mentioned &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/converse"&gt;converse&lt;/A&gt;‌.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could this be specific to trying to use the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;cr_section_macros.h mentioned in an LPCXpresso article for an MCUXpresso iMX project?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Aug 2019 20:16:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964131#M2591</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-08-23T20:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964132#M2592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;Hi variable_andrew &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;cr_section_macros.h is an MCUXpresso IDE include, so it doesn't depend in the device that you have. I have included this library cr_section_macros.h in the sdk example "gpio_led_output.c" and I added the code of the array that you have, and I can see that it was successfully mapped to the RAM2 section. Does the __DATA(RAM2) instruction fail in the code that you have?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Aug 2019 23:10:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964132#M2592</guid>
      <dc:creator>jorge_a_vazquez</dc:creator>
      <dc:date>2019-08-27T23:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964133#M2593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jorgeantonioalcala"&gt;jorgeantonioalcala&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried what you suggested as well and that's working&amp;nbsp; - for the most part, but...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I'm seeing is that the&amp;nbsp;array is allocated in both its original destination and in the specified destination.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ie - if I make the array have 100 elements - 100 bytes will be added to both DTC and ITC in the case where memory output looks like this:&lt;/P&gt;&lt;P class=""&gt;Memory region &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;Used Size&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;Region Size&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;%age Used&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SRAM_DTC: &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;24180 B&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;32 KB &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;73.79%&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SRAM_ITC: &lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;600 B&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;32 KB&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;1.83%&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;SRAM_OC:&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0 GB&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;64 KB&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0.00%&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;BOARD_FLASH:&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0 GB&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;16 MB&lt;SPAN class=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;0.00%]&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;How would I make it so that the memory isn't used in the old region, only in the new region?&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;Thanks!&lt;/P&gt;&lt;P class=""&gt;-Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2019 19:44:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964133#M2593</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-08-28T19:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964134#M2594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As your array has initialised values, those&amp;nbsp;values have to be placed into your code area so that (on reset) those values can be copied&amp;nbsp;into your array. There is no way around this, unless you don’t provide initial values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 06:54:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964134#M2594</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-08-29T06:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964135#M2595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/converse"&gt;converse&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;Thanks for the clarification - according to the below, I should be able to place the array .text into a specific memory section instead?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/389102"&gt;Placing code/rodata into different FLASH blocks&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using code such as:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #f0ece6; border: 0px; color: #646464; font-weight: bold; font-size: 16px;"&gt;&lt;STRONG&gt;__RODATA(Flash2) const int roarray[] = {10,20,30,40,50};&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried this (with the suggested &lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 12px;"&gt;gpio_led_output&lt;/SPAN&gt; demo:&lt;/P&gt;&lt;P class=""&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 11px;"&gt;&lt;SPAN class=""&gt;__RODATA(RAM2) &lt;/SPAN&gt;&lt;SPAN class=""&gt;static&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;const&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;unsigned&lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt;char&lt;/SPAN&gt;&lt;SPAN class=""&gt; array[]={&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-family: 'courier new', courier, monospace; font-size: 11px;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-family: 'courier new', courier, monospace; font-size: 11px;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-family: 'courier new', courier, monospace; font-size: 11px;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-family: 'courier new', courier, monospace; font-size: 11px;"&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt;&lt;SPAN class=""&gt; &lt;/SPAN&gt; &lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;0x00,0x00,0x20,0x20,0x20,0x20,0x20,0x20,0x00,0x20,0x00,0x00,&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class="" style="font-family: 'courier new', courier, monospace; font-size: 11px;"&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I use static const - i don't see memory allocated for this array anywhere.&lt;/P&gt;&lt;P&gt;If I use volatile, the RAM2 destination is ignored..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea as to why I wouldn't see any apparent allocation when using __RODATA with static const vs volatile ignoring the specifier?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 14:24:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964135#M2595</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-08-29T14:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964136#M2596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you data is not used in your program (i.e. nothing references the array), then the linker will discard it. So, if you want to check something like this. make sure your code references the array.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look in the .map file created by the linker, you will see a section called "Discarded input sections" and you will see what the linker has discarded as it is not used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You haven't explained how you are using the array, but I suspect that you want to make it const.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 17:08:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964136#M2596</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-08-29T17:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964137#M2597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;gotcha &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/converse"&gt;converse&lt;/A&gt;‌ - thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My usage of array is basically a bitmap of fonts for a TFT display - so it is going to be const.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I make sure to use the array in the gpio test - as you said - it gets allocated - tho the __RODATA bit is ignored - so it's still placed in the default location instead of... RAM2 for example.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 17:58:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964137#M2597</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-08-29T17:58:51Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964138#M2598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I’m a bit confused by your use case. Perhaps you can explain?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you see I am confused. You have an initialised const array that you want to place in RAM. This means you have to have the data to initialise it stored elsewhere. You may as well just store it in flash and use it directly from there.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 19:40:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964138#M2598</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-08-29T19:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964139#M2599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/converse"&gt;converse&lt;/A&gt;‌,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I'm executing the application from SRAM, not XIP from Flash, so I'm trying to maximize my use of on chip memory.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If my application's small enough to fit in RAM using various spaces, it seemed like the most performant way to move forward... assuming I can fully utilize all the areas of RAM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Aug 2019 20:43:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964139#M2599</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-08-29T20:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964140#M2600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, I think I understand what you are doing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, at the moment, you are using the debugger to load your application into RAM. Is this correct? When you have finished development,&amp;nbsp;how are you planning to deliver the application? I assume you are going to put it into Flash and then copy it from there into RAM? How are you planning to do this? This is really, really important to know, as it affects how you place code and data in your application (see below)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Back to your latest 'issue'. You are trying to place RODATA (that is, initialised, const, data) into RAM. The linker/link scripts know that this makes no sense - for it to be placed into RAM, it is going to have to be initialised, and the only place to put that initialisation data is in code (the text section) and therefore you would&amp;nbsp;end up with two copies of the data - one in the code (which will be used once, to copy into RAM) and one in the RAM - which is&amp;nbsp;pointless.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2019 08:30:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964140#M2600</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-08-30T08:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964141#M2601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/converse"&gt;converse&lt;/A&gt;‌,&amp;nbsp;&lt;/P&gt;&lt;P&gt;That's correct that I'm currently debugging completely in RAM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As I understand from here&amp;nbsp;&lt;A _jive_internal="true" href="https://community.nxp.com/message/1198211#comments" title="https://community.nxp.com/message/1198211#comments"&gt;https://community.nxp.com/message/1198211&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;NAND Flash&amp;nbsp;doesn't&amp;nbsp;support XIP....?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;So the end goal/hope is to boot the application from (NAND) FLASH, with the code/data allocated to RAM - (the bootloader copies&amp;nbsp;the full application (.text/.data/etc) into RAM&amp;nbsp;and then executes).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Back to the original question/resp - if I'm setting array to __DATA(RAM2) - you're saying that initialized data values are somehow becoming considered .text as well?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wouldn't the compiler take the initialized array and put that into the appropriate .data section as initialized data?&lt;/P&gt;&lt;P&gt;And then when accessing said array - it goes to the data section to get the contents without needing to do extra alloc as the space is already alloced in data? It's not like I'm declaring two arrays and then copying one array to the other at runtime?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So going back to your post above -&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;As your array has initialised values, those&amp;nbsp;values have to be placed into your code area so that (on reset) those values can be copied&amp;nbsp;into your array&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On reset - wouldn't the bootloader run and copy the initialized data section from FLASH into RAM?&lt;/P&gt;&lt;P&gt;I don't see why using .text would have anything to do with the bootloader re-running and&amp;nbsp;moving&amp;nbsp;the&amp;nbsp;initialized data into RAM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the .map file - when using __DATA(RAM2) - the array symbol is put in the right place - RAM2.&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the RAM1 section, there isn't any explicit allocation, but after the end of code - it leaves a space the same size as the array&amp;nbsp;between the end of .text and the start of .reserved / .uninit_RESERVED as per this screen shot:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Screen Shot 2019-08-30 at 4.18.19 PM.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/84779iE0716F414830411E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-08-30 at 4.18.19 PM.png" alt="Screen Shot 2019-08-30 at 4.18.19 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Aug 2019 20:22:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964141#M2601</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-08-30T20:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964142#M2602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not familiar with the boot process for the iMX1015 part, so I can't comment on what the boot loader will or will not do.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding your question about loading the initial values into the array - it is your application that does this, automatically. The linker and the startup code does this for you - you do not do anything, but the code and the data are there to do it for you. This is why you have this reserved space at the end of the .text section - to contain the array's initial values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Sep 2019 08:36:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964142#M2602</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-09-01T08:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964143#M2603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/converse"&gt;converse&lt;/A&gt;‌,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if someone wanted to reduce&amp;nbsp;memory usage in the main section of RAM (where .text is located)&amp;nbsp;by moving a predefined array (such as this fonts array) to a different section,&amp;nbsp;is there a recommended way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to have the data values loaded directly via the loader?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems even when I create functions&amp;nbsp;set to specific RAM blocks - as per&amp;nbsp;&lt;A href="https://community.nxp.com/thread/389099"&gt;Placing specific functions into RAM blocks&lt;/A&gt;&amp;nbsp; - the memory again gets doubled (used in RAM for .text, and then again in the newly specificed RAM block).&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2019 15:19:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964143#M2603</guid>
      <dc:creator>variable_andrew</dc:creator>
      <dc:date>2019-09-05T15:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Setting Variables/Functions to specific memory</title>
      <link>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964144#M2604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I feel we are going round in circles here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do not think there is any way for you to do what you think you want. The linker 'knows' that RAM-based data needs to be initialised, and the only way to do that is to place that initialisation data into the code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have constant data, define it a 'const' and the compiler/linker will place it with your code and will not create two copies of it. Otherwise, you will get two 'copies' - one with the initial values and the other that is used in your application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You keep referring to a 'loader'. on MCU's this is a simple bootloader that can copy a simple block of data load the stack and jump to the entry point. That's it. Do not confused this with an application loader in a full-blown operating system (Linux, Windows etc) where it reads the executable file and can do lots a clever things with mapping data, loading RAM etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2019 12:50:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-General/Setting-Variables-Functions-to-specific-memory/m-p/964144#M2604</guid>
      <dc:creator>converse</dc:creator>
      <dc:date>2019-09-06T12:50:32Z</dc:date>
    </item>
  </channel>
</rss>

