<?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: Diective to force data into flash in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Diective-to-force-data-into-flash/m-p/696308#M14084</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;you need to tell this to the linker with a KEEP, see &lt;A class="link-titled" href="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/" title="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/"&gt;Defining Variables at Absolute Addresses with gcc | MCU on Eclipse&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Aug 2017 16:22:59 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2017-08-10T16:22:59Z</dc:date>
    <item>
      <title>Diective to force data into flash</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Diective-to-force-data-into-flash/m-p/696307#M14083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone please explain to me how to force the compiler to store a variable into NVM? I am using CodeWarrior 10.5 with a Kinetis EA MCU. My problem is I declare an array into NVM in a fixed flash area by way of this:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;__attribute__ ((section(".startupDat")))&lt;/P&gt;&lt;P&gt;volatile const UINT16 LEDStat[4] = {45, 18, 0, 0xCCCC};&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The data is discarded unless I add something like the following in my code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;x = LEDStat[0];&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;How can I force the compiler to do what I want? Many thanks for your support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 15:27:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Diective-to-force-data-into-flash/m-p/696307#M14083</guid>
      <dc:creator>rmaier</dc:creator>
      <dc:date>2017-08-10T15:27:35Z</dc:date>
    </item>
    <item>
      <title>Re: Diective to force data into flash</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Diective-to-force-data-into-flash/m-p/696308#M14084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Robert,&lt;/P&gt;&lt;P&gt;you need to tell this to the linker with a KEEP, see &lt;A class="link-titled" href="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/" title="https://mcuoneclipse.com/2012/11/01/defining-variables-at-absolute-addresses-with-gcc/"&gt;Defining Variables at Absolute Addresses with gcc | MCU on Eclipse&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 16:22:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Diective-to-force-data-into-flash/m-p/696308#M14084</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2017-08-10T16:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Diective to force data into flash</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Diective-to-force-data-into-flash/m-p/696309#M14085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Erich. Just what I was looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 19:44:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Diective-to-force-data-into-flash/m-p/696309#M14085</guid>
      <dc:creator>rmaier</dc:creator>
      <dc:date>2017-08-10T19:44:41Z</dc:date>
    </item>
  </channel>
</rss>

