<?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>CodeWarrior for MCUのトピックData in DFLASH</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Data-in-DFLASH/m-p/684262#M14005</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm planning to put some data in the dflash of SPC5602B and for that reason creating some variables with addresses starting from 0x00800000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a new memory area in the LCF:&lt;/P&gt;&lt;P&gt;dFlash_sector0: org = 0x00800000, len = 0x00004000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and created a section:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #006699; font-size: small;"&gt;GROUP&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; : {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;.__DflashStorage : {}&lt;/P&gt;&lt;P&gt;} &amp;gt; dFlash_sector0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in .c file:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; push &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Save the current state */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; section const_type &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;".__DflashStorage"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;__declspec&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;".__DflashStorage"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;char my_data&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;char my_data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; pop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;When trying to compile this I get the error :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;section '.__DflashStorage' must have an uninitialized data section for object 'nodeIdDflash'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;I don't know if I have done a minor error or if the approach is totally wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;Bengt Andersson&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 May 2017 07:50:38 GMT</pubDate>
    <dc:creator>bengtandersson</dc:creator>
    <dc:date>2017-05-18T07:50:38Z</dc:date>
    <item>
      <title>Data in DFLASH</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Data-in-DFLASH/m-p/684262#M14005</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm planning to put some data in the dflash of SPC5602B and for that reason creating some variables with addresses starting from 0x00800000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a new memory area in the LCF:&lt;/P&gt;&lt;P&gt;dFlash_sector0: org = 0x00800000, len = 0x00004000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and created a section:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #006699; font-size: small;"&gt;GROUP&lt;/STRONG&gt;&lt;SPAN style="font-size: small;"&gt; : {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;.__DflashStorage : {}&lt;/P&gt;&lt;P&gt;} &amp;gt; dFlash_sector0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in .c file:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; push &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; font-size: small;"&gt;/* Save the current state */&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; section const_type &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;".__DflashStorage"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;__declspec&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;(section &lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; font-size: small;"&gt;".__DflashStorage"&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #005032; font-size: small;"&gt;char my_data&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: small;"&gt;char my_data;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #7f0055; font-size: small;"&gt;&lt;STRONG&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: small;"&gt; pop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;When trying to compile this I get the error :&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;section '.__DflashStorage' must have an uninitialized data section for object 'nodeIdDflash'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;I don't know if I have done a minor error or if the approach is totally wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: small;"&gt;Bengt Andersson&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 May 2017 07:50:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Data-in-DFLASH/m-p/684262#M14005</guid>
      <dc:creator>bengtandersson</dc:creator>
      <dc:date>2017-05-18T07:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Data in DFLASH</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Data-in-DFLASH/m-p/684263#M14006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Bengt&lt;/P&gt;&lt;P&gt;Your approach is right, but please try to adjust your pragma section to include also uninitialized consts and small consts too. I also removed __declspec since if there is #pragma section const_type... it's not needed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #7f0055; border: 0px; font-weight: inherit; font-size: small;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 13px;"&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: small;"&gt; push &lt;/SPAN&gt;&lt;SPAN style="color: #3f7f5f; border: 0px; font-weight: inherit; font-size: small;"&gt;/* Save the current state */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #7f0055; border: 0px; font-weight: inherit; font-size: small;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 13px;"&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: small;"&gt; section const_type sconst_type&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #2a00ff; border: 0px; font-weight: inherit; font-size: small;"&gt;".__DflashStorage"&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;".__DflashStorage"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #005032; border: 0px; font-weight: inherit; font-size: small;"&gt;char my_data&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: small;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #7f0055; border: 0px; font-weight: inherit; font-size: small;"&gt;&lt;STRONG style="border: 0px; font-weight: bold; font-size: 13px;"&gt;#pragma&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: small;"&gt; pop&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: small;"&gt;hope it helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: small;"&gt;Stan&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 May 2017 08:11:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Data-in-DFLASH/m-p/684263#M14006</guid>
      <dc:creator>stanish</dc:creator>
      <dc:date>2017-05-24T08:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Data in DFLASH</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Data-in-DFLASH/m-p/684264#M14007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have finally had some time to try this fix. I works but only almost. It compiles and links without problems but at __init_data() in __start.c it tries to copy data from address 0xC000 to my address in DFLASH which is impossible and I think this is the reason why my application finally craches. If I could find a way to avoid this copying I think it will work. Any suggestions??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Bengt Andersson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Dec 2017 13:02:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Data-in-DFLASH/m-p/684264#M14007</guid>
      <dc:creator>bengtandersson</dc:creator>
      <dc:date>2017-12-14T13:02:50Z</dc:date>
    </item>
  </channel>
</rss>

