<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>[nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/470/nrf51822-how-to-merge-software-device-and-application-code-to-one-hex-file</link><description>Hi sir
In order to simplify the flow of programming hex file to nRF51, we want to merge Softdevice hex file with application hex file. Then, generate a new hex file. Could &amp;quot;mergehex&amp;quot; tool make it? If yes, please make a instance how to work it. Thanks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 26 Dec 2015 02:38:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/470/nrf51822-how-to-merge-software-device-and-application-code-to-one-hex-file" /><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2444?ContentTypeID=1</link><pubDate>Sat, 26 Dec 2015 02:38:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b26a7b4d-c875-4faa-97df-f91b5224ce0d</guid><dc:creator>caram5555</dc:creator><description>&lt;p&gt;Hi. Jeffery.
I saw your nRF mass production post.
If you still have this problem please refer our website.
(&lt;a href="http://www.mobilian.biz/#/app/product/jig"&gt;Mobilian Prouction page : http://www.mobilian.biz/#/app/product/jig&lt;/a&gt;
This will give you a some inspiration how to proceed your mass production with nRF5x.
Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2458?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2013 00:37:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09b71f51-6012-480c-877c-9164be3d5d0c</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Dear Ole Morten
I had tried mergehex to combine two hex files. Then, program the single combined hex file to the test module. It can work normally. Thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2448?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2013 18:55:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b80c725-729d-4770-aaab-de8cb0d62ceb</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;Just in case someone finds this later: This isn&amp;#39;t quite correct as it stands here. Please see my answer another place in this thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2457?ContentTypeID=1</link><pubDate>Tue, 24 Sep 2013 18:54:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e72a85d8-dcdf-4611-94fb-45e65fbb896a</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;As I said above, a softdevice hex and an application hex can be combined using mergehex without any problems. Our softdevice hex is not encrypted, and the hex file itself is not protected in any way. The softdevice will however enable run-time protection when started, but this is not affected by how it is programmed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2456?ContentTypeID=1</link><pubDate>Mon, 23 Sep 2013 02:20:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:289c792e-3141-4300-a736-5d5646ab1711</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;I feel confused about the comments. So, can I use mergehex.exe to combine SoftDev hex with application code hex? Even if SoftDev hex is encrypted and protected. Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2453?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 12:44:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e481455-ff90-48b9-b7a9-4894e714b806</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;Ah ok, i thought the new hex file could only be placed in 1 region.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2455?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 12:44:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62636161-ca6b-4255-aa6a-b44aba64f8c3</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;Ah ok, i thought the new hex file could only be placed in 1 region.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2452?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 12:42:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea3e15cc-83fd-47c9-b1db-b183370e6b4b</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;How you flash the softdevice and application doesn&amp;#39;t affect the run-time protection in any way, so I&amp;#39;m not quite sure I understand what you mean.&lt;/p&gt;
&lt;p&gt;All the RAM protection is set up at run-time, so even if the softdevice and application were programmed combined, this will still work as it&amp;#39;s supposed to.&lt;/p&gt;
&lt;p&gt;Beware that the mergehex doesn&amp;#39;t do any magic, the application is still located in code region 1 and the softdevice in code region 0, it just combines the hex files. Everything that mergehex does can be easily done with Python and IntelHex if you want to. Let me know if anything is still unclear.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2454?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 12:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a710be17-33b9-48dd-bdb2-8f3e7bbb3572</guid><dc:creator>Guest</dc:creator><description>&lt;p&gt;But how do you make sure the softdevice code is protected for the application? if you merge the softdevice with application code then the application can read softdevice ram data, right?&lt;/p&gt;
&lt;p&gt;I assume it is not possible to place the combined hex in application space because the peripherals will be blocked for the softdevice as well. And placing the application code in region 0 will generate some really bad security issues. It is now possible for the application code to read/write the softdevice ram etc.&lt;/p&gt;
&lt;p&gt;So why would nordic approve this?&lt;/p&gt;
&lt;p&gt;We are busy with our own softdevice, but reading this makes me a bit concerned about the purpose of code region protection when the application can be merged with softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2459?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 12:37:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e61c66d9-d5de-43d8-bbe7-faae33443834</guid><dc:creator>Bastiaan</dc:creator><description>&lt;p&gt;But how do you make sure the softdevice code is protected for the application? if you merge the softdevice with application code then the application can read softdevice ram data, right?&lt;/p&gt;
&lt;p&gt;I assume it is not possible to place the combined hex in application space because the peripherals will be blocked for the softdevice as well. And placing the application code in region 0 will generate some really bad security issues. It is now possible for the application code to read/write the softdevice ram etc.&lt;/p&gt;
&lt;p&gt;So why would nordic approve this?&lt;/p&gt;
&lt;p&gt;We are busy with our own softdevice, but reading this makes me a bit concerned about the purpose of code region protection when the application can be merged with softdevice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2451?ContentTypeID=1</link><pubDate>Fri, 20 Sep 2013 11:44:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d729156d-3d22-404f-bc25-69af0182fd25</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;There is a tool called mergehex in the C:\Program Files (x86)\Nordic Semiconductor\nrf51\bin folder that can do this. Its syntax can be seen in its built-in help-function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
C:\Program Files (x86)\Nordic Semiconductor\nrf51\bin&amp;gt;mergehex --help

Usage:
-------------------------------------------------------------------------------

 -h  --help                  Prints this help.

 -q  --quiet                 Reduces the stdout text info. Must be combined
                             with another command.

 -v  --version               Prints the version of this utility.

 -m  --merge &amp;lt;hex_file_1&amp;gt; &amp;lt;hex_file_2&amp;gt;  Hex files to be merged.

 -o  --output &amp;lt;hex_file&amp;gt;                Hex file result of the merge.

-------------------------------------------------------------------------------

This small application is used to merge two hex files.
Example use: mergehex.hex -m hex_file_1.hex hex_file_2.hex -o output_file.hex

&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2450?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2013 04:12:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5151d73-51b1-4881-b3c4-df908a7341bc</guid><dc:creator>andy2003hunan</dc:creator><description>&lt;p&gt;i think it is easy to do.you just reserve some pins for programming and power supply on your PCBA,then you provide programmer for your supplier. in production line the worker can use nRF STUDIO to program the nrf51822 on the PCBA .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2449?ContentTypeID=1</link><pubDate>Wed, 18 Sep 2013 00:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ad170ed-32b2-4c31-be3d-7f129c83c4fd</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Dears
It would be a big problem for us. So, it&amp;#39;s no use to combine protected SoftDev hex and application hex by mergehex?
nRFgo is not suitable for programing nRF51822 in production line. In mass production, the job to program nRF51822 is charged by outsourcing vendor. We shall provide them only hex file to program. They program nRF51822 in chip level but not in PCB level.
Do you have any idea to solve this problem? I appreciate it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2447?ContentTypeID=1</link><pubDate>Tue, 17 Sep 2013 16:10:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d01653d7-ab33-4525-8eb3-680b978be95a</guid><dc:creator>Martijn</dc:creator><description>&lt;p&gt;I don&amp;#39;t think that is desireable ... The softdevice ram and code is placed in a protected region, and by generating a single file this will not be possible. The softdevice ram will be available to application code.&lt;/p&gt;
&lt;p&gt;We created our own softdevice and we do not want anyone to be able to read our ram data, this causes some really bad security issues!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2446?ContentTypeID=1</link><pubDate>Mon, 16 Sep 2013 23:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ed7c9b9-2200-41c8-9c29-b4d10349b25d</guid><dc:creator>Jeffery</dc:creator><description>&lt;p&gt;Dear Nordic
Could you tell me how to do it? Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [nRF51822] How to merge software device and application code to one hex file</title><link>https://devzone.nordicsemi.com/thread/2445?ContentTypeID=1</link><pubDate>Sat, 14 Sep 2013 05:22:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:255794c4-73ab-4408-8cbb-f8ef2aea9cb8</guid><dc:creator>andy2003hunan</dc:creator><description>&lt;p&gt;yeah,it is a good ideal.i hope someone can help you.also i want to know the solution too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>