<?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: Place a few variables in fixed location in RAM with NOINIT attribute in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1240887#M13022</link>
    <description>&lt;P&gt;Hi, Crist&lt;/P&gt;&lt;P&gt;tried second one as following:&lt;/P&gt;&lt;P&gt;__attribute__((section(".bss.ARM.__at_0x20019000"))) uint8_t testBuf2[128];&lt;/P&gt;&lt;P&gt;it is not working, it still put variables at another address, it seems 0-inited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first one doesn't compile.&lt;/P&gt;&lt;P&gt;Not sure what I did wrong? I am using NXP MCUXpresso v11.3.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;</description>
    <pubDate>Fri, 05 Mar 2021 09:43:33 GMT</pubDate>
    <dc:creator>ping1</dc:creator>
    <dc:date>2021-03-05T09:43:33Z</dc:date>
    <item>
      <title>Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1238080#M12953</link>
      <description>&lt;P&gt;Hello, All&lt;/P&gt;&lt;P&gt;I need to put a few of them into fixed location, purpose of this is to pass some settings between second bootloader and application,&amp;nbsp;I can put variables with&amp;nbsp; __SECTION(noinit, bank) attribute, but I am not sure how to put it into fixed location in that bank, read this post here : &lt;A href="https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Placing-data-at-an-address/m-p/473552" target="_blank"&gt;https://community.nxp.com/t5/LPCXpresso-IDE-FAQs/Placing-data-at-an-address/m-p/473552&lt;/A&gt;&lt;/P&gt;&lt;P&gt;however, not all information is there on how to create own sections and own linker script, and it is not only one variable needs to be in fixed location, there is a few. I wonder what is the way to do that, it is easy with TI's compiler with following #progma&lt;/P&gt;&lt;P&gt;#pragma NOINIT (myVariables)&lt;BR /&gt;#pragma location = 0x20000000&lt;BR /&gt;uint32_t myVariables;&lt;/P&gt;&lt;P&gt;Anything equivalent for NXP?&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Mar 2021 16:29:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1238080#M12953</guid>
      <dc:creator>ping1</dc:creator>
      <dc:date>2021-03-01T16:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1238877#M12972</link>
      <description>&lt;P&gt;Hello Ping,&lt;/P&gt;
&lt;P&gt;There following Community Document has some more information on how to handle variables in the NoInit section. While it’s not based on an i.MXRT, the basic concepts remain.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32K144-noinit-section-usage/ta-p/1127254" target="_blank"&gt;https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/EXAMPLE-S32K144-noinit-section-usage/ta-p/1127254&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I hope that this information helps!&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Gustavo&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 20:13:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1238877#M12972</guid>
      <dc:creator>gusarambula</dc:creator>
      <dc:date>2021-03-02T20:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1239232#M12981</link>
      <description>&lt;P&gt;Hello, Gustavo&lt;/P&gt;&lt;P&gt;Thanks for reply, the link answered how to make variable NoInit, which can be done by __SECTION(noinit, bank), but didn't say how to make it at fixed location.&lt;/P&gt;&lt;P&gt;Is there a way to do let a variable at a fixed location pls?&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 08:48:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1239232#M12981</guid>
      <dc:creator>ping1</dc:creator>
      <dc:date>2021-03-03T08:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1240736#M13016</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;you can try&lt;STRONG&gt;&amp;nbsp;__attribute__((at(address), zero_init))&lt;/STRONG&gt;, the address is where you want to place your data if you use keil compiler v5,&lt;/P&gt;
&lt;P&gt;and with&amp;nbsp;&lt;STRONG&gt;__attribute__((section(".bss.ARM.__at_address")))&lt;/STRONG&gt;, the addres has the same meaning, if you use keil compiler v6. And i think&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the GCC has the same funtions as the Keil.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Crist&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 06:10:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1240736#M13016</guid>
      <dc:creator>crist_xu</dc:creator>
      <dc:date>2021-03-05T06:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1240868#M13021</link>
      <description>&lt;P&gt;Hi, Crist,&lt;/P&gt;&lt;P&gt;Thanks for your input!&lt;/P&gt;&lt;P&gt;The first one doesn't compile, I get a warning saying zero_init attribute ignored, changed to noinit, got same warning.&lt;/P&gt;&lt;P&gt;The second one seems hopeful, but how to input the absolute address there? could you give an example please?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 09:09:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1240868#M13021</guid>
      <dc:creator>ping1</dc:creator>
      <dc:date>2021-03-05T09:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1240887#M13022</link>
      <description>&lt;P&gt;Hi, Crist&lt;/P&gt;&lt;P&gt;tried second one as following:&lt;/P&gt;&lt;P&gt;__attribute__((section(".bss.ARM.__at_0x20019000"))) uint8_t testBuf2[128];&lt;/P&gt;&lt;P&gt;it is not working, it still put variables at another address, it seems 0-inited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The first one doesn't compile.&lt;/P&gt;&lt;P&gt;Not sure what I did wrong? I am using NXP MCUXpresso v11.3.&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;&lt;P&gt;Ping&lt;/P&gt;</description>
      <pubDate>Fri, 05 Mar 2021 09:43:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1240887#M13022</guid>
      <dc:creator>ping1</dc:creator>
      <dc:date>2021-03-05T09:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1241373#M13031</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; It seems that that two codes are all for Keil. So if you want to use this in MCUXpresso, i think you&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can try this, i have tried this under the GCC, sorry for that i do not have the MCUXpresso installed, but i think that this can work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;put this in your link file:&lt;/P&gt;
&lt;P&gt;address (RW) : ORIGIN = &lt;STRONG&gt;the absolute address(such as 0x20000000)&lt;/STRONG&gt;, LENGTH = &lt;STRONG&gt;array_size(such as100)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;.noninit (NOLOAD):&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;*(.noninit)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;} &amp;gt; address&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;and&amp;nbsp; in your main code, define the variable like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;__attribute__((section(".noninit"))) __attribute__((used)) int noninit_var[100];&lt;/P&gt;
&lt;P&gt;&amp;nbsp; After that, the noninit_var will be placed into the address you just want, and under noiniting. So the way is&amp;nbsp;to define a section which has only your variable, and then place it at the address.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Crist&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Mar 2021 14:30:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1241373#M13031</guid>
      <dc:creator>crist_xu</dc:creator>
      <dc:date>2021-03-07T14:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1241648#M13049</link>
      <description>&lt;P&gt;Hi, Crist&lt;/P&gt;&lt;P&gt;Thanks for reply, I am new to NXP and linker script and currently use Managed Linker script from IDE. So have a few questions:&lt;/P&gt;&lt;P&gt;1. Do I need to modify memory configuration? I think the address part need to be put in memory region.&lt;/P&gt;&lt;P&gt;2. Same question for new&amp;nbsp;&lt;FONT face="inherit"&gt;.noinit&amp;nbsp; section, it won't be generated &lt;/FONT&gt;automatically, shall do a separate small linker file for this too?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Or do I need to create another linker file for this only, will it be work together with the automatically generated one? or will it in conflict with each other?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Or shall I stop use the automatically generated one, and create my own - which I need some instructions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ping&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 09:20:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1241648#M13049</guid>
      <dc:creator>ping1</dc:creator>
      <dc:date>2021-03-08T09:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1241667#M13052</link>
      <description>&lt;P&gt;Hi, Crist&lt;/P&gt;&lt;P&gt;I tried add small two linker files with your additional memory and section defines, unfortunately, the&amp;nbsp;&lt;SPAN&gt;noninit_var[100] is not end up in the intended address, it is only noinited.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also tried to modify the automatically generated linker file and add the sections, it ends up with a hard fault&amp;nbsp;when running.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Could you provide a simple example with a whole project please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Regards!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Ping&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 09:49:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1241667#M13052</guid>
      <dc:creator>ping1</dc:creator>
      <dc:date>2021-03-08T09:49:58Z</dc:date>
    </item>
    <item>
      <title>Re: Place a few variables in fixed location in RAM with NOINIT attribute</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1242059#M13064</link>
      <description>&lt;P&gt;Hi, Ping,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Sorry, i am not so familiar for the MCUXpresso, i am using the ARM-NONE-EABI-GCC under the linux, I think you shoud create a new linker script by yourself, I will attach the link file and the main.c of the GCC, you can take it as a reference.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Also, if it is possiable, could you please attach your project? I think it will be helpful for your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; Crist&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 01:41:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/Place-a-few-variables-in-fixed-location-in-RAM-with-NOINIT/m-p/1242059#M13064</guid>
      <dc:creator>crist_xu</dc:creator>
      <dc:date>2021-03-09T01:41:14Z</dc:date>
    </item>
  </channel>
</rss>

