<?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>DFU cannot upload merged hex file after changing the starting address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16895/dfu-cannot-upload-merged-hex-file-after-changing-the-starting-address</link><description>I am using nrf51822, I have two firmwares with different offset address, one is having offset address of 0x16000 another at 0x28000.Both are 60kb of size each. I want to start the second application sits at 0x25000 from the bootloader. For uploading these</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Oct 2016 13:41:37 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16895/dfu-cannot-upload-merged-hex-file-after-changing-the-starting-address" /><item><title>RE: DFU cannot upload merged hex file after changing the starting address</title><link>https://devzone.nordicsemi.com/thread/64715?ContentTypeID=1</link><pubDate>Thu, 13 Oct 2016 13:41:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea656e7c-b366-44f4-bf93-ac26c4df5cac</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Muckesh,
you need to replace &lt;code&gt;DFU_BANK_0_REGION_START&lt;/code&gt; with 0x249f0 in the two if statements before  NVIC_SystemReset() in main, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  if (dfu_start || (!bootloader_app_is_valid(0x249f0)))
    {
        nrf_gpio_pin_clear(UPDATE_IN_PROGRESS_LED);

        // Initiate an update of the firmware.
        err_code = bootloader_dfu_start();
        APP_ERROR_CHECK(err_code);

        nrf_gpio_pin_set(UPDATE_IN_PROGRESS_LED);
    }

    if (bootloader_app_is_valid(0x249f0) &amp;amp;&amp;amp; !bootloader_dfu_sd_in_progress())
    {
        // Select a bank region to use as application region.
        // @note: Only applications running from DFU_BANK_0_REGION_START is supported.
        bootloader_app_start(0x249f0);//DFU_BANK_0_REGION_START
    }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You also have to edit the &lt;code&gt;bootloader_app_start&lt;/code&gt;function, as the argument app_addr is not used, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void bootloader_app_start(uint32_t app_addr)
{
    // If the applications CRC has been checked and passed, the magic number will be written and we
    // can start the application safely.
    uint32_t err_code = sd_softdevice_disable();
    APP_ERROR_CHECK(err_code);

    interrupts_disable();

    err_code = sd_softdevice_vector_table_base_set(0x249f0);//CODE_REGION_1_START
    APP_ERROR_CHECK(err_code);

    bootloader_util_app_start(0x249f0);//CODE_REGION_1_START
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;-Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>