<?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: variables initialization table badly loaded with LPCXpresso-6 (hole in binary file) in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567329#M18833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mjulier on Wed Nov 06 07:42:49 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;My motivations were:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) leaving an unused block for storing some configuration. The first blocks are smaller, so I needed a gap at 0x1000-0x1FFF, and to put parts of the code below 0x1000 and the rest after 0x2000. The hole is the section named ".bloc1flash", and it is not loaded because I want it not to be erased when I reprogram the CPU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) knowing which is the last byte used in the flash, because I store some data after the end. Not the end of the code, but the end of everything stored in the flash. This the symbol "_endflash".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) for some reason, in a previous version, there was a problem that I could track to be caused by the data section not to be aligned on 8 bytes. I don't remember the exact reason, but I have to reason to worry about possibly losing 4 bytes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I can solve my problem, but the fact is that the linker produces some code and the debugger does not put all of it into the CPU in LPCXpresso-6, while it puts on the debug log that it has done just what is needed, and there is no problem in LPCXpresso-5 with exactly the same code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:46:05 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:46:05Z</dc:date>
    <item>
      <title>variables initialization table badly loaded with LPCXpresso-6 (hole in binary file)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567325#M18829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mjulier on Wed Nov 06 03:06:13 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using LPCXpress with LPC-Link and an LPC1769 CPU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;With LPCXpresso-5, it works correctly, except on the first use of LPC-Link (I have to disconnect it, connect it again, then it works).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With LPCXpresso-6 however, the initialization table of the static variables are not downloaded into the CPU. But the debugger works.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The HEX file is good: it is strictly identical to the file produced with LPCXpresso-5, and works when used independently.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the relevant part of the HEX file, notice that there is a hole at 0x1962c-0x1962f due to alignment&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;:020000021000EC&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;= goes to 0x10000
(...)
:1095F000660000000000003F000000BFD1F71737F1
:10960000D1F717B78071313F807131BF6937AC3105
:1096100068212233B40F14336821A2333863ED3E3E
:0C962000DA0F493F5E987B3FDA0FC93F2C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;= 0x1962c = end of code, before alignment
:1096300028000000000080004000C0002000A000C2 &amp;lt;= 0x19630 = _etext = start of table
:109640006000E000100090005000D0003000B0003A
:109650007000F000080088004800C8002800A8003A
:109660006800E800180098005800D8003800B800DA&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And here is the content, as read by Flash Magic, notice junk starting from 0x1962c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;[img=425x110]&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fmjulier.free.fr%2Ffichiers%2Fmem.png%5B%2Fimg%5D" rel="nofollow noopener noreferrer" target="_blank"&gt;http://mjulier.free.fr/fichiers/mem.png[/img]&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There is another hole in my hex file, but for a whole flash block (0x1000-0x1FFF), and that one seems not to cause problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the debug log, with no obvious error (the "invalid reset vector" is also found of LPCXpresso-5 and causes no problem, and the table contains indeed 1632 bytes starting from 0x19630, unfortunately these byte are not correctly loaded:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;LPCXpresso Debug Driver v6.0 (Oct 16 2013 02:04:27 - crt_emu_cm3_nxp build 1212)
Looked for chip XML file in E:/nxp/LPCXpresso_6.1.0_164/lpcxpresso/bin/LPC1769.xml
Looked for vendor directory XML file in E:/nxp/LPCXpresso_6.1.0_164/lpcxpresso/bin/nxp_directory.xml
Found generic directory XML file in E:/nxp/LPCXpresso_6.1.0_164/lpcxpresso/bin/crt_directory.xml
Emu(0): Conn&amp;amp;Reset. DpID: 2BA01477. Info: HID64HS12
SWD Frequency: 3000 KHz. RTCK: False. Vector catch: False.
Packet delay: 0&amp;nbsp; Poll delay: 0.
Loaded LPC175x_6x_512.cfx: LPC175x_6x (512K) Apr 22 2013 12:14:31&amp;nbsp; On-chip Flash Memory
NXP: LPC1769&amp;nbsp; Part ID: 0x00000000
Connected: was_reset=true. was_stopped=false
v LPCXpresso Free License - Download limit is 256K
Writing 2744 bytes to 0000 in Flash (assumed clock: 4.0MHz)
Erased/Wrote page&amp;nbsp; 0-0 with 2744 bytes in 533msec
Flash write Done
Writing 95788 bytes to 2000 in Flash (assumed clock: 4.0MHz)
Erased/Wrote page&amp;nbsp; 2-9 with 32768 bytes in 4092msec
Erased/Wrote page&amp;nbsp; 10-16 with 24576 bytes in 3072msec
Erased/Wrote page&amp;nbsp; 16-16 with 32768 bytes in 2857msec
Erased/Wrote page&amp;nbsp; 17-17 with 5676 bytes in 704msec
Flash write Done
43: Invalid Reset vector - out of range
Writing 1632 bytes to 19630 in Flash (assumed clock: 4.0MHz)
Erased/Wrote page&amp;nbsp; 17-17 with 1632 bytes in 1002msec
Flash write Done
nSRST assert (if available)
Executing in bootloader.

Stopped: Breakpoint #1&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think that there is something here that should be fixed!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Miguel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567325#M18829</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:03Z</dc:date>
    </item>
    <item>
      <title>Re: variables initialization table badly loaded with LPCXpresso-6 (hole in binary file)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567326#M18830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Wed Nov 06 04:19:40 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Please post:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[list=1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]The AXF that you are loading&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]The map file generated by the linker when building that AXF file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; [*]The linker script files (.ld) used to build the AXF file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/list]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These will typically all be found in the Debug/Release directory of your project&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567326#M18830</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: variables initialization table badly loaded with LPCXpresso-6 (hole in binary file)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567327#M18831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mjulier on Wed Nov 06 06:29:35 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a work-around, by modifying the .ld file for removing the hole: there is a hole because I use a section just for aligning, and the section is removed if it contains only alignment, even with "FILL".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here are the files in the configuration that cause the problem, in a Zip archive:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1) the AXF file with causes this problem&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) the Map file&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) the .ld files. Note that Pegasus.ld is the main file, and that a solution is obtained by uncommenting at line #115 so that the section does not contain only alignment.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567327#M18831</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: variables initialization table badly loaded with LPCXpresso-6 (hole in binary file)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567328#M18832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Wed Nov 06 07:17:22 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;What exactly are you trying to achieve with this rather strange linker script???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And why do you seem to think that you need to align the load address of the data section on an 8 byte boundary. There should be no need to do this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LPCXpresso Support&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567328#M18832</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: variables initialization table badly loaded with LPCXpresso-6 (hole in binary file)</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567329#M18833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by mjulier on Wed Nov 06 07:42:49 MST 2013&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;My motivations were:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) leaving an unused block for storing some configuration. The first blocks are smaller, so I needed a gap at 0x1000-0x1FFF, and to put parts of the code below 0x1000 and the rest after 0x2000. The hole is the section named ".bloc1flash", and it is not loaded because I want it not to be erased when I reprogram the CPU.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2) knowing which is the last byte used in the flash, because I store some data after the end. Not the end of the code, but the end of everything stored in the flash. This the symbol "_endflash".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3) for some reason, in a previous version, there was a problem that I could track to be caused by the data section not to be aligned on 8 bytes. I don't remember the exact reason, but I have to reason to worry about possibly losing 4 bytes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, I can solve my problem, but the fact is that the linker produces some code and the debugger does not put all of it into the CPU in LPCXpresso-6, while it puts on the debug log that it has done just what is needed, and there is no problem in LPCXpresso-5 with exactly the same code.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/variables-initialization-table-badly-loaded-with-LPCXpresso-6/m-p/567329#M18833</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:05Z</dc:date>
    </item>
  </channel>
</rss>

