<?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>nRF52DK programmed and debugged ok within Segger Studio but dragging hex file to JLINK drive does not give the same result</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51259/nrf52dk-programmed-and-debugged-ok-within-segger-studio-but-dragging-hex-file-to-jlink-drive-does-not-give-the-same-result</link><description>Hi 
 I have been developing ok with Segger Tools and nRF52DK. My application works as expected. However now I need to send hex files to a customer who also has the nRF52 DK. So I tried dragging my generated hex file to the JLINK drive to simulate what</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Aug 2019 13:55:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51259/nrf52dk-programmed-and-debugged-ok-within-segger-studio-but-dragging-hex-file-to-jlink-drive-does-not-give-the-same-result" /><item><title>RE: nRF52DK programmed and debugged ok within Segger Studio but dragging hex file to JLINK drive does not give the same result</title><link>https://devzone.nordicsemi.com/thread/205350?ContentTypeID=1</link><pubDate>Wed, 21 Aug 2019 13:55:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4d2bbc7-ad17-48e4-b428-d28e5a14fd95</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The reason why the precompiled .hex file is bigger is that it contains the softdevice merged with the application.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t use the drag&amp;#39;n&amp;#39;drop too much, but it looks like it isn&amp;#39;t too found of being programmed by two .hex files (softdevice and application). I am not quite sure why, but if you merge the application&amp;nbsp;and&amp;nbsp;the softdevice into one .hex file, it looks like it works.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To merge two .hex files, you can use mergehex, which is included in the &lt;a href="https://www.nordicsemi.com/?sc_itemid=%7B56868165-9553-444D-AA57-15BDE1BF6B49%7D" rel="noopener noreferrer" target="_blank"&gt;Nordic Command Line Tools&lt;/a&gt; (same as nrfjprog).&lt;/p&gt;
&lt;p&gt;To merge two files, use the command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="batchfile"&gt;mergehex --merge &amp;lt;path to file 1&amp;gt; &amp;lt;path to file 2&amp;gt; --output &amp;lt;my_merged.hex&amp;gt;
For example:
mergehex --merge s132_nrf52_6.1.1_softdevice.hex ble_app_blinky_pca10040_s132.hex --output my_merged_application.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If the files are located in the folder from which you run your cmd line.&lt;/p&gt;
&lt;p&gt;You should be able to drag&amp;#39;n&amp;#39;drop the file my_merged_application.hex.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>