<?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>Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27862/update-sd-bl-app-from-sdk-v13-to-v14-via-dfu-fails</link><description>Hi. I am trying to create a dfu zip file that contains the softdevice, bootloader, and application. I am DFU upgrading an NRF52 device from SDK v13 to SDK v14 via Nordic&amp;#39;s Android nRF
Toolbox DFU app. I can create a zip file that contains the softdevice</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Oct 2019 14:58:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27862/update-sd-bl-app-from-sdk-v13-to-v14-via-dfu-fails" /><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/216428?ContentTypeID=1</link><pubDate>Wed, 23 Oct 2019 14:58:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da1cd19c-5a9c-4156-948d-9d3da3f1fd1e</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Manuel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;so you are updating from SDK v14.2.0 to SDK 15.3.0 and you are still not able to get the SD+BL update to go through successfully using a nrfutil version between&amp;nbsp; v1.5.0 and v4.0.0?&lt;/p&gt;
&lt;p&gt;If it complets, then can you try do debug the bootloader and see if you enter its main() function?&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/214993?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2019 08:33:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15961437-d281-413d-84c8-8f996b26cb87</guid><dc:creator>ManuelF</dc:creator><description>&lt;p&gt;I checked again, I have version 14.2.0 installed, sorry I misread. I&amp;#39;m using nrfutil v5.1.0.&lt;/p&gt;
&lt;p&gt;I now tried your fix, but it does not help. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/214985?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2019 08:17:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fa0c9d3-22fc-433d-b41e-3029e6e39d00</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Manuel,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;since the way we generate DFU images have changed between SDK v12.x.x and SDK v15.3 you will have to generate a SD+BL image with nrfutil v1.5.0 as its the SDK v12 bootloader that receives this image. Then after the SD+BL update you need to generate a APP image using nrfutil v&lt;span&gt;5.0.0&amp;nbsp; or later.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bj&amp;oslash;rn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/214978?ContentTypeID=1</link><pubDate>Tue, 15 Oct 2019 08:03:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b98ffac-42b9-4bc0-b57a-6a341251991a</guid><dc:creator>ManuelF</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/bjorn_2d00_spockeli"&gt;bjorn-spockeli&lt;/a&gt;: I have SD+BL+APP from SDK v12.x.x installed and I now try to update to SDK 15.3. I created a zip with SD+BL+APP with following command:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil pkg generate --hw-version 52 --key-file private.key \
        --application-version 2 --application application.hex \
        --sd-req 0x9D,0xB7 --softdevice softdevice.hex --sd-id 0xB7 \
        --bootloader bootloader.hex --bootloader-version 2 \
        app_dfu_package.zip&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I update with nrfutil dfu serial. Now the first step updating SoftDevice+Bootloader is successfull. But the second step updating the Application fails! Is it possible the I now have the same problem, because the softdevice size increased? nrfutil failed on &amp;quot;Set Packet Receipt Notification 0&amp;quot; =&amp;gt; TypeError: &amp;#39;NoneType&amp;#39; object is not iterable.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/189207?ContentTypeID=1</link><pubDate>Mon, 27 May 2019 07:31:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3e6c46c-bb2e-4441-a386-f3baf6091509</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/koniho0"&gt;koniho&lt;/a&gt;: Yes, this issue has been fixed in SDK v15.x.x.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/189078?ContentTypeID=1</link><pubDate>Fri, 24 May 2019 13:59:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f83561a1-efaf-42e0-b5fb-c55264336c46</guid><dc:creator>koniho</dc:creator><description>&lt;p&gt;Is this issue addressed in a general way in bootloader built on SDK v15.2.0? What about SDK v15.3.0 - since it looks like there are significant differences between 15.2.0 and 15.3.0.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109838?ContentTypeID=1</link><pubDate>Thu, 07 Dec 2017 11:17:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb4a1839-97e4-4634-8105-1723e1a65fb5</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@koniho: Yes, if you&amp;#39;re updating to a newer SoftDevice that is larger than the SoftDevice present on the device with SDK v12.x.x or later, then you need to implement the fix mentioned above.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109837?ContentTypeID=1</link><pubDate>Wed, 06 Dec 2017 19:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a67018ec-5d3d-4012-ac1b-fc7c816ef487</guid><dc:creator>koniho</dc:creator><description>&lt;p&gt;Does this issue affect older SDK based bootloaders as well (i.e. v12.3.0)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109839?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2017 13:41:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29ed108d-bb61-4a41-80b1-10607d77cfeb</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@amy60024: Could you try using the nRF Connect app instead of the nRF Toolbox app?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109836?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2017 13:42:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29debff2-2b6a-4cf5-9e03-6b376cdc0227</guid><dc:creator>Amy</dc:creator><description>&lt;p&gt;Hi Bjorn,
I use the non-debug example, thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109835?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2017 13:39:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7da9cc38-279a-408b-a394-bbe74b6fb958</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@amy60024: Which bootloader project did you use, the debug or non-debug example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109834?ContentTypeID=1</link><pubDate>Fri, 20 Oct 2017 13:30:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:726ffb01-786a-4219-ab42-bd3823b25019</guid><dc:creator>Amy</dc:creator><description>&lt;p&gt;Hi Bjorn,
I faced the same issue. And also modified the bootloader for SDK14.0.0.
The different is that I want to update the SD+BL+APP from from SDK12.2.0 to SDK14.0.0.
I create the SD+BL+APP zip file by using nrfutil as following command.
&amp;quot;nrfutil pkg generate --application app.hex --application-version 2 --bootloader bootloader.hex --bootloader-version 2 --softdevice softdevice.hex --hw-version 52 --sd-req 0x9D,0x8C --sd-id 0x9D --key-file private_key.pem sd_bl_app_firmware_image.zip&amp;quot;&lt;/p&gt;
&lt;p&gt;But got the error message &amp;quot;upload failed: UNKOWN (8202)&amp;quot;&lt;/p&gt;
&lt;p&gt;I tried the command as following to create the file for updating from SDK14.0.0 to SDK14.0.0, it works well.
&amp;quot;nrfutil pkg generate --application app.hex --application-version 2 --bootloader bootloader.hex --bootloader-version 2 --softdevice softdevice.hex --hw-version 52 --sd-req 0x9D --sd-id 0x9D --key-file private_key.pem sd_bl_app_firmware_image.zip&amp;quot;&lt;/p&gt;
&lt;p&gt;I also tried updating from SDK12.2.0 to SDK12.2.0, it works fine as well.&lt;/p&gt;
&lt;p&gt;Thanks for help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109833?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 11:35:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38b5e0c7-4dfc-4633-adb5-dbf593e9a986</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;@adrian: Yes, this solution is not generic and will only be valid for a DFU update from S132 v3.x.x. or S132 v4.x.x to S132 v5.0.0. A generic fix that will work for all SoftDevices will be included in the next SDK release.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109832?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2017 11:26:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9c494a8-da80-4dcf-9539-e98467e78a65</guid><dc:creator>Adrian Eggenberger</dc:creator><description>&lt;p&gt;Hi Bjorn&lt;/p&gt;
&lt;p&gt;As far as I see this is not a generic solution, isn&amp;#39;t it? The offset of 0x4000 is correct at the moment for the updated from S132 4.0.4 to S132 5.0.0, but it could be wrong in some other cases. Is there a bugfix to fix this issue in a general way?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109831?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2017 08:26:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c07c46da-c322-4729-91b8-2d3e68cda2f0</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;We&amp;#39;ve found an issue with the Secure Bootloader&amp;#39;s  bootloader copy routine ( &lt;code&gt;nrf_dfu_bl_continue()&lt;/code&gt; in &lt;code&gt;nrf_dfu_utils.c&lt;/code&gt; ) - the logic in this routine breaks when doing a combined softdevice and bootloader update and the new softdevice is of a different size compared to previous version.&lt;/p&gt;
&lt;p&gt;After the old bootloader has been swapped with the new bootloader,  the new bootloader will compare itself against the banked version to verify that the MBR performed the swap correctly. The start address of BANK1, where the bootloader image is stored, is equal to the end of the SoftDevice. However, due to the change in SoftDevice size, from 0x1F000 with  S132 v4.0.2 to 0x23000 with the S132 v5.0.0, the new bootloader will use 0x23000 as the start address instead of the old at 0x1F000. This leads to the memory compare operation being performed with a 0x4000 offset, which will fail.&lt;/p&gt;
&lt;p&gt;The workaround is to modify the &lt;code&gt;nrf_dfu_bl_continue()&lt;/code&gt; in the SDK v14.0.0 bootloader to check both the new and the old Bank1 start addresses, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static uint32_t nrf_dfu_bl_continue(uint32_t src_addr, nrf_dfu_bank_t * p_bank)
{
    uint32_t       err_code      = NRF_SUCCESS;
    uint32_t       ret_val      = NRF_SUCCESS;
    uint32_t const len          = (p_bank-&amp;gt;image_size - s_dfu_settings.sd_size);
    uint32_t       old_src_addr;
    
    // if the update is a combination of BL + SD, offset with SD size to get BL start address
    src_addr += s_dfu_settings.sd_size;
    // Offset by 16K due to change in softdevice size. 0x1F000 -&amp;gt; 0x23000
    old_src_addr = src_addr - 0x4000;
    
    NRF_LOG_DEBUG(&amp;quot;Verifying BL: Addr: 0x%08x, Src: 0x%08x, Len: 0x%08x&amp;quot;, MAIN_APPLICATION_START_ADDR, src_addr, len);
    
    //Check new and old bank1 address to prevent new bootloader from repeating the swap with wrong src_addr
    err_code = nrf_dfu_mbr_compare((uint32_t*)BOOTLOADER_START_ADDR, (uint32_t*)old_src_addr, len);
        
    // If the bootloader is the same as the banked version, the copy is finished
    ret_val = nrf_dfu_mbr_compare((uint32_t*)BOOTLOADER_START_ADDR, (uint32_t*)src_addr, len);
    if (ret_val == NRF_SUCCESS || err_code == NRF_SUCCESS)
    {
        NRF_LOG_DEBUG(&amp;quot;Bootloader was verified&amp;quot;);

        // Invalidate bank, marking completion
        nrf_dfu_invalidate_bank(p_bank);

        // Upon successful completion, the callback function will be called and reset the device. If a valid app is present, it will launch.
        NRF_LOG_DEBUG(&amp;quot;Writing settings and reseting device.&amp;quot;);
        ret_val = nrf_dfu_settings_write(reset_device_callback);
    }
    else
    {
        NRF_LOG_DEBUG(&amp;quot;Bootloader not verified, copying: Src: 0x%08x, Len: 0x%08x&amp;quot;, src_addr, len);
        // Bootloader is different than the banked version. Continue copy
        // Note that if the SD and BL was combined, then the split point between them is in s_dfu_settings.sd_size
        ret_val = nrf_dfu_mbr_copy_bl((uint32_t*)src_addr, len);
        if (ret_val != NRF_SUCCESS)
        {
            NRF_LOG_ERROR(&amp;quot;Request to copy BL failed&amp;quot;);
        }
    }

    return ret_val;
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109830?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 16:38:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1595fc65-2946-4c5a-9c33-a235ca8ab782</guid><dc:creator>tanekaf</dc:creator><description>&lt;p&gt;Hi Bjorn.  thank you for your reply. Success.  Looks like is was missing &amp;quot;--sd-id 0x9d&amp;quot;.  Now, when the DFU app is used, it shows uploading part 1/2.  After uploading part 1, the device disconnects and the app reports a failure.  Using nRFgo Studio, the bootloader and softdevice are upgraded successfully.  However, the application code does not upgrade.  As an experiment, I programmed the board with SDKv14&amp;#39;s softdevice and bootloader and used the same zip file to perform a DFU.  DFU was successful.  I suspect the issue is that SDKv13 used softdevice version 4.0.2 and SDKv14 uses softdevice version 5.0.0.  Please advise.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update SD+BL+APP from SDK v13 to v14 via DFU Fails</title><link>https://devzone.nordicsemi.com/thread/109829?ContentTypeID=1</link><pubDate>Wed, 20 Sep 2017 13:33:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:019f87b0-4bb6-4239-8f6e-d6a6ae6d31d5</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;You should be able to create a single SD+BL+ APP firmware image using nrfutil, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrfutil --application app.hex --application-version 1 --bootloader bootloader.hex --bootloader-version 1 --softdevice softdevice.hex --hw-version 52 --sd-req 0x9D,0x98 --sd-id 0x9D --key-file private_key.pem sd_bl_app_firmware_image.zip
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>