<?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>Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/4610/combining-sd-dfu-and-application-hex-and-programming</link><description>Hi guys, 
 First issue: is that the mergehex.exe fails everytime when trying to Write the merged file. The Error is ERROR: An error occured while writing the file. this has occurred on every attempted combination of SD, DFU and Application. 
 Second</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Apr 2018 11:03:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/4610/combining-sd-dfu-and-application-hex-and-programming" /><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/128950?ContentTypeID=1</link><pubDate>Thu, 19 Apr 2018 11:03:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f4e1442-33b3-4a83-a0ff-3e99a0805ec7</guid><dc:creator>AmiguelS</dc:creator><description>&lt;p&gt;Hello. On the topic of the nRF52832 variation, I am using gcc and DFU keys, and the final part of my merged hex (SD+BL+APP) looks like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;:10D6300000300800AD8507000000000085A8070045
:04D64000E9A707004F
:10F000000100000000000000FE000000FFFFFFFF05
:10F010000000000000000000146B01009EE2ED59AA
:10F0200001000000000000000000000000000000DF
:10F0300000000000000000000000000000000000D0
:10F0400000000000000000000000000000000000C0
:0CF05000000000000000000000000000B4
:020000041000EA
:081014000080070000E0070066
:00000001FF&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have tried replacing the info on just address F000, as well as replacing in F000 and removing the info in addresses F010-F050.&lt;br /&gt;None of the options worked.&lt;br /&gt;&lt;br /&gt;Is this due to the use of signing keys?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/128857?ContentTypeID=1</link><pubDate>Wed, 18 Apr 2018 15:11:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5afc349-78f5-49fa-ba6d-e66c82078f33</guid><dc:creator>schoensn</dc:creator><description>&lt;p&gt;is there also a app_valid_setting file for the nrf52840 available? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16347?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 11:43:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:268b6442-3263-42fb-8b89-0e791e37337f</guid><dc:creator>Shay Ohayon</dc:creator><description>&lt;p&gt;Please ignore my last comment. It does work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16348?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 02:12:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38fdafeb-a003-4c1e-986b-0077ce8cb719</guid><dc:creator>Shay Ohayon</dc:creator><description>&lt;p&gt;I&amp;#39;m trying this with NRF51822QFAC and S130 (SDK 10), but none of the app_valid_setting_apply.hex files work.  Stefan Birnir Sverrisson , do you have a solution for that configuration? I usually run these two lines, which do the job: 1) nrfjprog --memwr 0x03fc00 --val 0x1   2) nrfjprog --memwr 0x03fc04 --val 0x0   but I would like to merge everything into a single file for easy flashing
Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16336?ContentTypeID=1</link><pubDate>Sat, 12 Mar 2016 14:22:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56219296-177b-4d72-9099-4d2b89beffe3</guid><dc:creator>Fabien Comte</dc:creator><description>&lt;p&gt;Did my own too. Used srec_info.exe (srecord) to check if CRC is correct and adjust with outputs (command is srec_info.exe BootloaderSettingsValidApplication.hex -Intel)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16335?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2016 17:11:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59a9ff26-0af8-4001-811a-a8279e1963c0</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Hi
I&amp;#39;ve created my hex file manually. To find out how this format is defined you could see &lt;a href="https://de.m.wikipedia.org/wiki/Intel_HEX"&gt;link&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16334?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2016 16:57:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efa653dc-154d-454c-a40b-26a07323f81d</guid><dc:creator>Raj</dc:creator><description>&lt;p&gt;Hi Adrian Eggenberger, can you tell me how to create own BootloaderSettingsValidApplication.hex because in my project bootloader settings address is 0x0003D800 so the hex file you posted (BootloaderSettingsValidApplication.hex) is not works with my bootloader. If I manually edit the hex it gives an error invalid hex file. can you tell me the process how to create valid app settings hex&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16333?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2016 18:34:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b930d4ee-0ee2-41fe-af51-0a1c389b8519</guid><dc:creator>Raj</dc:creator><description>&lt;p&gt;Hi, these process is working. when I merged sodtdevice+bootloader+application+app_valid_settings_apply and the final hex is programmed by using nrfjprog it working. But these not working for signed bootloader  I merged softdevice+nrf_sec(nrf security module)+bootloader+application in the same order but If I programmed the final hex using nrfjproj it directly enters to bootloader. If I programmed softdevice,nrf_sec,bootloader one by one and application is programmed through dfu it works fine. Is the app_valid_setting_apply.hex is work for signed bootloader? can any one help me to solve these problem. I am using nRF51_SDK_9.0.0_2e23562, s110 soft device and nRF51_SDK_9.0.0_2e23562\examples\dfu\experimental\bootloader_signing bootloader program.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16341?ContentTypeID=1</link><pubDate>Tue, 23 Dec 2014 21:45:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c30d5cf2-e981-4e10-b137-3e284c5c60a1</guid><dc:creator>tim</dc:creator><description>&lt;p&gt;I have attached my files to this question&lt;/p&gt;
&lt;p&gt;I think things match&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/23501/s310v2-mergehex-bootloaderhex-bootloader_settingshex-conflict/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16344?ContentTypeID=1</link><pubDate>Tue, 23 Dec 2014 19:45:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eacae1ce-6be1-466a-a03e-2f0677fec24f</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;Are you compiling your bootloader with full optimization?   Can you post the addresses you have set in your linker file?   Do they match the settings in dfu_types.h?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16343?ContentTypeID=1</link><pubDate>Tue, 23 Dec 2014 19:41:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e276c1df-9e13-493d-a8e6-69ade0632155</guid><dc:creator>tim</dc:creator><description>&lt;p&gt;Thx Locky,&lt;/p&gt;
&lt;p&gt;I guess my problem is probably a real conflict&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/23501/s310v2-mergehex-bootloaderhex-bootloader_settingshex-conflict/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16342?ContentTypeID=1</link><pubDate>Tue, 23 Dec 2014 19:20:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f44d51a4-96a2-42a1-8f48-1db4672d76b4</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;Hi tim,&lt;/p&gt;
&lt;p&gt;I made sure that I placed the files in the same folder as mergehex.exe, and that the folder was a Windows User folder.  This means that non-administrators can write/create files in that folder.  An example would be   User\My Documents\Merge Firmware\mergehex.exe&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16345?ContentTypeID=1</link><pubDate>Tue, 23 Dec 2014 18:45:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:58f45166-87ea-48cb-a4bf-fcc3a92edfb4</guid><dc:creator>tim</dc:creator><description>&lt;p&gt;Locky, I think I may have as similar problem with mergehex&lt;/p&gt;
&lt;p&gt;C:\Users\timw\nordic\src\SofM\dfu\bootloader [v6master]&amp;gt; mergehex -m arm_build&lt;br /&gt;
bootloader.hex .\bootloader_settings.hex -o bootloadercrc.hex
Parsing arm_build\bootloader.hex file.
Parsing .\bootloader_settings.hex file.
Merging files.
ERROR: Merge not possible due to conflict in files.&lt;/p&gt;
&lt;p&gt;How did you resolve the windows problem you had&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16346?ContentTypeID=1</link><pubDate>Thu, 18 Dec 2014 22:21:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6aae7637-e9a1-406f-965d-30d52f870dd3</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;Thanks for the update Stefan.  The Manual edit of the merged file did fix my problem.  I created a Batch file to merge the images and everything works perfectly.  Thank you for the assistance.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16340?ContentTypeID=1</link><pubDate>Fri, 05 Dec 2014 14:17:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b01bba02-ce0b-40ef-b5a4-9ad47f09a366</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Apparently, gcc creates the hex file differently from Keil. The bootloader compiled with gcc writes to the last flash page where the bootloader settings are stored and where the app_valid_setting_apply.hex is writing as well, and that is why the two files conflict. I tried to have  the gcc bootloader not write to the last page but some other conflicts come up. I will have to investigate this further next week in order to find a solution that works for gcc.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16339?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2014 23:07:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:628f4f52-9a77-421b-985e-a0cb978f3d7f</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;I still cannot seem to merge with the Setting.hex files you provided with my own Bootloader.hex file.   &lt;strong&gt;ERROR: Merge not possible due to conflict in files&lt;/strong&gt;.   I know the bootloader settings should be set to 0x0003FC00.    I believe I have done this properly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;- dfu_types.h  -&lt;/strong&gt; #define BOOTLOADER_REGION_START         0x0003FC00&lt;br /&gt;
#define BOOTLOADER_SETTINGS_ADDRESS     0x0003FC00&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;em&gt;/&lt;/em&gt; Linker script to configure memory regions. &lt;em&gt;/&lt;/em&gt;&lt;/em&gt;
SEARCH_DIR(.)
GROUP(-lgcc -lc -lnosys)&lt;/p&gt;
&lt;p&gt;MEMORY
{
FLASH (rx) : ORIGIN = 0x00035000, LENGTH = 44K&lt;br /&gt;
RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 8K&lt;br /&gt;
BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 1K&lt;/p&gt;
&lt;p&gt;}
SECTIONS
{
/* placing my named section at given address: */
.bootloaderSettings 0x0003FC00 :
{&lt;/p&gt;
&lt;p&gt;}
.uicrBootStartAddress 0x10001014 :
{&lt;/p&gt;
&lt;p&gt;}
/* other placements follow here... &lt;em&gt;/
}
/&lt;/em&gt;
.bootloaderSettings (NOLOAD):
{
*(.bootloaderSettings)
} &amp;gt; BOOTLOADER_SETTINGS
*/
INCLUDE &amp;quot;gcc_nrf51_common.ld&amp;quot;&lt;/p&gt;
&lt;p&gt;Is there anything else I&amp;#39;m missing?   Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16338?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2014 22:15:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46247223-bd51-41a4-ad21-4f95a89afab9</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;The merge issue was a Windows issue, the OS wasn&amp;#39;t giving file write permission to mergehex.  Thanks for the help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16349?ContentTypeID=1</link><pubDate>Thu, 04 Dec 2014 22:05:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f273fd55-2609-4fe5-97e3-30638bd24a3e</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;I still seem to get the same error trying to merge your files together.  The Error is ERROR: An error occured while writing the file.  Could be a windows issue, I&amp;#39;m looking into this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16337?ContentTypeID=1</link><pubDate>Mon, 01 Dec 2014 14:43:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:189c6dde-6057-4ac1-9b42-dc2d7afbbe82</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have successfully merged softdevice S110 7.0.0, the bootloader from nRF51 SDK 6.1.0, and application from SDK 6.1.0 with using the mergehex.exe tool. Additionally, the attached app_valid_setting_apply.hex file must be merged into the final .hex file to create valid bootloader settings. The mergehex.exe tool can only merge two files at a time, so you need to merge three times in order to merge together the four .hex files. The procedure is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Merge softdevice and bootloader: mergehex -m s110_nrf51822_7.0.0_softdevice.hex bootloader.hex -o SD_BL.hex&lt;/li&gt;
&lt;li&gt;Merge softdevice+bootloader and application: mergehex -m SD_BL.hex ble_app_hrs_dfu.hex -o SD_BL_APP.hex&lt;/li&gt;
&lt;li&gt;Merge softdevice+bootloader+application and bootloader settings file: mergehex -m SD_BL_APP.hex app_valid_setting_apply.hex -o SD_BL_APP_Settings.hex&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I attach the files that I merged to gether:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_valid_5F00_setting_5F00_apply.hex"&gt;app_valid_setting_apply.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs_5F00_dfu.hex"&gt;ble_app_hrs_dfu.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3465.bootloader.hex"&gt;bootloader.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/s110_5F00_nrf51822_5F00_7.0.0_5F00_softdevice.hex"&gt;s110_nrf51822_7.0.0_softdevice.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The following steps are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Erase the nRF51 chip: nrfjprog --eraseall&lt;/li&gt;
&lt;li&gt;Program the merged file: nrfjprog --program SD_BL_APP_Settings.hex&lt;/li&gt;
&lt;li&gt;Then power-reset the device&lt;/li&gt;
&lt;li&gt;or combine all three above into one command: nrfjprog --eraseall --program SD_BL_APP_Settings.hex --pinreset&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now the nRF51 device should be advertising as Nordic_HRM.
Press Button_7 on the nRFgo motherboard while power-resetting in order to enable bootloader mode, or enable bootloader mode from the central device (buttonless) with the procedure described &lt;a href="http://developer.nordicsemi.com/nRF51_SDK/doc/7.0.1/s110/html/a00067.html"&gt;here&lt;/a&gt; in the &amp;quot;Testing&amp;quot; section.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 5.12.2014 for gcc compiler&lt;/strong&gt;
If using gcc to compile the bootloader and application the above method will not work. The gcc compiler writes the .hex files a little differently than the Keil compiler. The best method to merge the files when compiling with gcc is to merge the softdevice, bootloader and application with mergehex and then manually add the contents of the app_valid_settings_apply.hex file into the softdevice+bootloader+application merged file. Actually, only line 2 should be copied from app_valid_settings_apply.hex into the correct location of the merged file as shown in the image below:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Capture-_2D00_-GCC-bootloader-and-applicaiton-merge-fix.JPG" alt="image description" /&gt;&lt;/p&gt;
&lt;p&gt;The &amp;quot;FC00&amp;quot; code in the selected line in the image above represents the flash address the data is written to (see intel hex format) and you should replace the line with the same &amp;quot;FC00&amp;quot; address code in the merged file.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 5.12.2014 for 128kB flash (QFAB)&lt;/strong&gt;
nRF51x22QFAB chips have 128kB flash and the above method will not work for those chips. Included below is a new setting file that works for 128kB flash and the bootloader provided on &lt;a href="https://github.com/NordicSemiconductor/nrf51-dfu-single-bank-ble/tree/SDKv6.0.0_S110v7.0.0_nRF51822QFAB"&gt;this thread&lt;/a&gt; for 128kB nRF51 chips. I include also the other hex files I used for the merge and the three output files. The ble_app_hrs_dfu_16kB.hex is the heart rate example with DFU service, compressed to take only 16 kB. If not compressed, it will take 25kB and will therefore not fit in the application space for the 128kB chip.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_valid_5F00_setting_5F00_apply_5F00_QFAB.hex"&gt;app_valid_setting_apply_QFAB.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs_5F00_dfu_5F00_16kB.hex"&gt;ble_app_hrs_dfu_16kB.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/bootloader_5F00_QFAB.hex"&gt;bootloader_QFAB.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2045.s110_5F00_nrf51822_5F00_7.0.0_5F00_softdevice.hex"&gt;s110_nrf51822_7.0.0_softdevice.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/SD_5F00_BL_5F00_APP_5F00_QFAB.hex"&gt;SD_BL_APP_QFAB.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/SD_5F00_BL_5F00_APP_5F00_Settings_5F00_QFAB.hex"&gt;SD_BL_APP_Settings_QFAB.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/SD_5F00_BL_5F00_QFAB.hex"&gt;SD_BL_QFAB.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 20.4.2015 Flash files seperately&lt;/strong&gt;
It is also possible to upload the files separately without merging them. Flash it in the following order:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/s110_5F00_nrf51822_5F00_7.0.0_5F00_softdevice.hex"&gt;s110_nrf51822_7.0.0_softdevice.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3465.bootloader.hex"&gt;bootloader.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_hrs_5F00_dfu.hex"&gt;ble_app_hrs_dfu.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_valid_5F00_setting_5F00_apply.hex"&gt;app_valid_setting_apply.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 20.4.2015 for softdevice 8&lt;/strong&gt;
This also works with the same app_valid_setting_apply.hex file for softdevice 8 if you flash first S110 v8 and the bootloader and application from SDK 8.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 28.10.2015 Procedure and example files for S110 7&lt;/strong&gt;
With S110 7 and bootloader from SDK 7, softdevice and bootloader updates were possible with an over the air update. This means that if you have i.e. S110 7 + bootloader from SDK 7, it is possible to update the device over the air (via Master Control Panel for Windows PC or nFR Toolbox app for Android, IOS or Windows phone) to contain S110 8 and bootloader from SDK 8 or SDK 9.&lt;/p&gt;
&lt;p&gt;You can merge e.g. the following files with mergehex.exe&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/s110_5F00_nrf51822_5F00_7.3.0_5F00_softdevice.hex"&gt;s110_nrf51822_7.3.0_softdevice.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/BL7_5F00_1.hex"&gt;BL7_1.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_app_5F00_bps_5F00_SDK_5F00_7_5F00_1_5F00_0.hex"&gt;ble_app_bps_SDK_7_1_0.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/3175.app_5F00_valid_5F00_setting_5F00_apply.hex"&gt;app_valid_setting_apply.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;into one file&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/SD_5F00_BL_5F00_APP_5F00_valid.hex"&gt;SD_BL_APP_valid.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;with the following command sequence:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mergehex --merge s110_nrf51822_7.3.0_softdevice.hex BL7_1.hex --output SD_BL.hex
mergehex --merge SD_BL.hex ble_app_bps_SDK_7_1_0.hex --output SD_BL_APP.hex
mergehex --merge SD_BL_APP.hex app_valid_setting_apply.hex --output SD_BL_APP_valid.hex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and then flash the file onto your nRF51-DK board (PCA10028) using nrfjprog.exe with&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfjprog --program SD_BL_APP_valid.hex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;then the ble_app_bps application should be advertising on your nRF51-DK.&lt;/p&gt;
&lt;p&gt;Another method of obtaining the same thing without merging the files is with flashing the 4 files directly with the following command sequence:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfjprog --eraseall
nrfjprog --dfu --programs s110_nrf51822_7.3.0_softdevice.hex
nrfjprog --program BL7_1.hex
nrfjprog --program ble_app_bps_SDK_7_1_0.hex
nrfjprog --program app_valid_setting_apply.hex
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Update 6.5.2016&lt;/strong&gt;
If you want to merge nRF52832 hex files into one, then you need to use the following app valid setting file:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/app_5F00_valid_5F00_setting_5F00_apply_5F00_nRF52832.hex"&gt;app_valid_setting_apply_nRF52832.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and merge it together with the softdevice, bootloader and application with mergehex.exe in the same way as has been described for nRF51. I have merged the following hex files with the app_valid_setting_apply_nRF52832.hex file, i.e. S132 2.0.0 softdevice, bootloader and heart rate example from SDK 11.0.0:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/s132_5F00_nrf52_5F00_2.0.0_5F00_softdevice.hex"&gt;s132_nrf52_2.0.0_softdevice.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dfu_5F00_test_5F00_bootloader_5F00_b_5F00_s132.hex"&gt;dfu_test_bootloader_b_s132.hex&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/dfu_5F00_test_5F00_app_5F00_hrm_5F00_s132.hex"&gt;dfu_test_app_hrm_s132.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;when they are merged, they create the following combined file that can be flashed directly to the nRF52832:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/SD_5F00_BL_5F00_APP_5F00_valid_5F00_nRF52832.hex"&gt;SD_BL_APP_valid_nRF52832.hex&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16332?ContentTypeID=1</link><pubDate>Sat, 29 Nov 2014 01:32:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37bcc78c-3059-46d4-8dd7-1205f7cf9dec</guid><dc:creator>Locky</dc:creator><description>&lt;p&gt;Thanks for the reply,  I tried you .hex file, but was not able to merge it with my bootloader .hex file.  The error I got was &lt;strong&gt;ERROR: Merge not possible due to conflict in files&lt;/strong&gt;  Though it seems like it could be the location of my bootloader,  I was sure to set the
#define BOOTLOADER_REGION_START         0x0003FC00&lt;/p&gt;
&lt;p&gt;which matches the linkerfile&lt;/p&gt;
&lt;p&gt;BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00&lt;/p&gt;
&lt;p&gt;Perhaps someone from Nordic could chime in on a solution?&lt;/p&gt;
&lt;p&gt;For the &lt;strong&gt;First Issue:&lt;/strong&gt;  my command line merge code is:
mergehex.exe -m s110_nrf51822_7.1.0_softdevice.hex gcc_nrf51_bootloader_xxaa.hex -o output_file.hex&lt;/p&gt;
&lt;p&gt;This was just trying to merge the SoftDevice and my bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Combining SD, DFU and Application .hex and Programming</title><link>https://devzone.nordicsemi.com/thread/16331?ContentTypeID=1</link><pubDate>Thu, 27 Nov 2014 07:55:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b810b4a-6c3d-47e3-b64b-c7b918748660</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;&lt;strong&gt;Third Issue:&lt;/strong&gt;
We also tried a lot of things taken from the devzone to get this working. The most promising thing was to patch bootloader_util_arm, but it didn&amp;#39;t work properly with one of the later versions. So we were looking for another way of doing this. We think, that the patch to make a application valid shouldn&amp;#39;t be in the bootloader code as most given answers suggest. If we only program the bootloader the existing behavior is just fine (enter bootmode automatically).
So the patch has to be related to the programming of the chip. We have built a intel-hex file that contains the bootloader settings for a valid application. This hexfile can be merged in the hex-file to be programmed later with nrfjprog.exe.&lt;/p&gt;
&lt;p&gt;NOTE: The file works only if the location of the bootloader settings has not be changed (=&amp;gt; 0x3FC00)&lt;/p&gt;
&lt;p&gt;Hex-File to set valid application in bootloader settings: &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/BootloaderSettingsValidApplication.hex"&gt;BootloaderSettingsValidApplication.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First Issue:&lt;/strong&gt;
We are using mergehex.exe without any problem for the same thing as you do. Actually we merge SD, bootloader, application and the hex-file with the bootloader-settings to one hex-file. Can you maybe post the command line of your merge operation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>