<?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: Modify Binary  in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590733#M29263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Mon Aug 10 13:58:01 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Remember that a "const" value might be optimized away by the compiler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:26:53 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:26:53Z</dc:date>
    <item>
      <title>Modify Binary</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590728#M29258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by GPh on Mon Aug 10 02:36:06 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Probably my need seem's curious but in our process it's usefull.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to modify a const value in the binary program before flash it in the LPC1768.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This value is a customer code and crypto key, and in production we have to put it in the FLASH for security reason.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want : In production they take the axf, change the code and key, and program the flash (we have made an internal tools for automate this tasks).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But i don't understand the axf format and i don't find in it my constant !&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anyone have a suggestion ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Or an advise for help me ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lots, Philippe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:26:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590728#M29258</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Binary</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590729#M29259</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 Aug 10 02:43:25 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;.axf files are in ELF format. Reading and modifying ELF files is not easy... If you really want to go down this route, you can probably start from the GNU 'readelf' utility (GPL licensed).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, you will find it easier to ensure this value is always in a fixed, known location and then convert it to binary and modify that - which what NXP do with the checksum utility.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:26:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590729#M29259</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Binary</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590730#M29260</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 Aug 10 05:33:45 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Another thought.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could surround your value with some magic numbers. Then write a utility to search the AXF file for those magic numbers and then modify your data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will have to be very careful with your choice of magic numbers so there is not an accidental match with other data in your application AXF file. If you do this use a magic number of at least 16 bytes before and after your data.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:26:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590730#M29260</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Binary</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590731#M29261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by GPh on Mon Aug 10 06:58:40 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know it's not simple.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I try the magic way without succes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But i can't let production recompile each time and i can't put it in external EEProm ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if i have a good idea, i share it&amp;nbsp; :) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:26:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590731#M29261</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Binary</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590732#M29262</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 Aug 10 07:02:58 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I gave you a couple of options, both of which will work. The simplest/most reliable is to convert to binary. The use of magic numbers will also work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess you are doing something wrong if you can't make it work. If you want any more help, suggest you tell us what you tried (sharing your code) and then somebody will be able to tell you what you did wrong.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:26:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590732#M29262</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Binary</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590733#M29263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wmues on Mon Aug 10 13:58:01 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Remember that a "const" value might be optimized away by the compiler.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:26:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590733#M29263</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Modify Binary</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590734#M29264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Ramana on Tue Aug 11 21:03:46 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it better to modify the hex file using HEX2BIN/BIN2HEX utilities with required key and then download the converted file into flash, So that no need to recompile the code every time.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:26:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Modify-Binary/m-p/590734#M29264</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:26:54Z</dc:date>
    </item>
  </channel>
</rss>

