<?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>LPCXpresso IDEのトピックRe: Debugger won't deposit FLASH contents</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594727#M31076</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RolandWOW on Mon Apr 08 23:46:16 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your comment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As can be seen from my post, I did inform ld about section READONLY and where to place it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Further I did not claim that ld is the problem, as hex-file and symbol table are in order, rather it is the debugger which fails to load section READONLY into FLASH at 0x1F00 and that the debugger is amply confused about symbol almaty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For reasons beyond my comprehension, the debugger behaves properly once I&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;designate 0X1000 as start of section READONLY. Unfortunately the program&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;will be larger than 0X1000 so I need the upper half of LPC1111/201's FLASH also.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Workaround:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the meantime I resort to IAP-API to erase the FLASH and deposit data from within the program at 0X1F00 and beyond. For use of data after a power cyle or other restart I prepare and use a copy of data in RAM.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 22:56:55 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T22:56:55Z</dc:date>
    <item>
      <title>Debugger won't deposit FLASH contents</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594725#M31074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RolandWOW on Mon Apr 08 00:22:26 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I try to maintain an absolute readonly section in FLASH with LPC1111/201.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using 0X1000 as --section-start=READONLY=... it works after downloading via debugger, with 0X1F00, however, I find the previous contents in FLASH. The hex-files seem to be always correct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I prepared a minimal program, which listed subsequently. Linker settings are -nostdlib and --section-start=READONLY=0X... .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; almaty.c &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]extern&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]int[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] almaty[4];[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][SIZE=2][COLOR=#3f7f5f][SIZE=2][COLOR=#3f7f5f]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/* Main Program */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][SIZE=2] [B]main[/B] ([/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]void[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2])[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]return[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] almaty[0];[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt;&amp;lt; data.c &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]#include&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]&amp;lt;stdint.h&amp;gt;[/COLOR][/SIZE][/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][SIZE=2][COLOR=#005032][SIZE=2][COLOR=#005032]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;uint32_t&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/COLOR][/SIZE][SIZE=2] [/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]__attribute__[/COLOR][/SIZE][/COLOR][/SIZE][/B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] ((section ([/SIZE][SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"READONLY"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2]))) almaty[4]={ 1, 2, 3, 4,};[/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][/SIZE][/SIZE]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:56:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594725#M31074</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't deposit FLASH contents</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594726#M31075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Mon Apr 08 01:04:57 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you also modify the linker script? If you didn't then the linker will know nothing about how to link your sections, so I guess it will be discarded. Read about GNU linker scripts to understand about this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, there are plenty of posts in this forum about how to place data at an absolute location in flash.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:56:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594726#M31075</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't deposit FLASH contents</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594727#M31076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RolandWOW on Mon Apr 08 23:46:16 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your comment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;As can be seen from my post, I did inform ld about section READONLY and where to place it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Further I did not claim that ld is the problem, as hex-file and symbol table are in order, rather it is the debugger which fails to load section READONLY into FLASH at 0x1F00 and that the debugger is amply confused about symbol almaty.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For reasons beyond my comprehension, the debugger behaves properly once I&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;designate 0X1000 as start of section READONLY. Unfortunately the program&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;will be larger than 0X1000 so I need the upper half of LPC1111/201's FLASH also.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Workaround:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the meantime I resort to IAP-API to erase the FLASH and deposit data from within the program at 0X1F00 and beyond. For use of data after a power cyle or other restart I prepare and use a copy of data in RAM.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:56:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594727#M31076</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't deposit FLASH contents</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594728#M31077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Tue Apr 09 00:32:39 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;You may have told it where to place the section, but you didn't tell the linker what to put in the section - for that you need to change the linker script&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As I said, search this forum for how to place data at absolute flash locations. Then you won't need workarounds...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:56:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594728#M31077</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:56:56Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't deposit FLASH contents</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594729#M31078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by RolandWOW on Tue Apr 09 22:52:22 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Other than ld, the debugger discards sections althoug they are referenced, a bug which ought to be fixed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Giving --no-gc-sections explicitly to ld, which shouldn't be necessary as according to the manual this is the default, fortunately the debugger stops dropping sections then. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is much simpler than what I proposed earlier and first choice for those preferring managed ld-srcipts over the baroque beauty of the succulent syntax for ld-scripts.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:56:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594729#M31078</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:56:57Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't deposit FLASH contents</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594730#M31079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Wed Apr 10 13:35:02 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: RolandWOW&lt;/STRONG&gt;&lt;BR /&gt;Other than ld, the debugger discards sections althoug they are referenced, a bug which ought to be fixed.&lt;BR /&gt; Giving --no-gc-sections explicitly to ld, which shouldn't be necessary as according to the manual this is the default, fortunately the debugger stops dropping sections then. &lt;BR /&gt;This is much simpler than what I proposed earlier and first choice for those preferring managed ld-srcipts over the baroque beauty of the succulent syntax for ld-scripts.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry, but it is not a bug. The linker only discards unused sections. If you have not added your file to the linker script, it will be unreferenced and so discarded. Please save yourself&amp;nbsp; some time and do it the correct way. Do as thefallguy said and search this forum.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 22:56:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Debugger-won-t-deposit-FLASH-contents/m-p/594730#M31079</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T22:56:57Z</dc:date>
    </item>
  </channel>
</rss>

