<?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>How can I combine Hex files?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14076/how-can-i-combine-hex-files</link><description>Hi.
I&amp;#39;m using nRF51822, SDK10.0.0, S130.
Hex files : Soft device, Application, bootloader.
I want to download at once.
How can I combine Hex files to make them 1 file? 
 And could you let me know BASE ADDRESS of Soft device, Application, bootloader</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 May 2016 23:31:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14076/how-can-i-combine-hex-files" /><item><title>RE: How can I combine Hex files?</title><link>https://devzone.nordicsemi.com/thread/53820?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 23:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75a61276-dcc2-4334-802a-d8f03e09f10d</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;So great! Thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How can I combine Hex files?</title><link>https://devzone.nordicsemi.com/thread/53819?ContentTypeID=1</link><pubDate>Wed, 25 May 2016 13:10:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4f25674-86a9-4333-b6fc-6f40ba842275</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;You can use mergehex included in the nRF5x-Command-Line-Tools package (you can download it from here: &lt;a href="https://www.nordicsemi.com/eng/Products/Bluetooth-Smart-Bluetooth-low-energy/nRF52832#Downloads)"&gt;www.nordicsemi.com/.../nRF52832&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can use it like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mergehex --merge sd.hex app.hex bl.hex --output out.hex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hexfiles already have the offest address information included, so you don&amp;#39;t need to specify this in the command line, assuming that the files have been compiled using the correct offset address.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Softdevice starts at address &lt;strong&gt;0x0&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Application starts where the softdevice ends. You need to look in the softdevice spec to find this address. For S130 v2.0.0 this is &lt;strong&gt;0x1B000&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Bootloader starts at address &lt;strong&gt;0x3C000&lt;/strong&gt;, or whatever you specify in &lt;code&gt;BOOTLOADER_REGION_START&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also check the base address of the hex file by opening it up in a text editor and look at the first two lines:&lt;/p&gt;
&lt;p&gt;:02000004 &lt;strong&gt;0001&lt;/strong&gt; F9&lt;br /&gt;
:10 &lt;strong&gt;B000&lt;/strong&gt; 0088330020F5B001000FB1010011B101003B&lt;/p&gt;
&lt;p&gt;This means that the offset address is 0x1B000 (&lt;a href="https://en.wikipedia.org/wiki/Intel_HEX"&gt;read more here&lt;/a&gt;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>