<?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>App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77720/app-will-not-launch-after-updating-bootloader-with-ble-dfu</link><description>I am trying to update the bootloader using BLE DFU and it does not seem like the app is launching after the bootloader update. 
 I currently have an app that works with the original bootloader built off one of the secure bootloader examples. ( examples</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 26 Aug 2021 12:47:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77720/app-will-not-launch-after-updating-bootloader-with-ble-dfu" /><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/326801?ContentTypeID=1</link><pubDate>Thu, 26 Aug 2021 12:47:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1a82557-8f6f-4ed1-97c4-27e53e1b4b45</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Q1)&lt;br /&gt;Is this log from the bootloader?&lt;/p&gt;
&lt;p&gt;00&amp;gt; &amp;lt;info&amp;gt; app: Inside main&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; app: In nrf_bootloader_init&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_settings: Using settings page.&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; nrf_dfu_settings: Destination settings are identical to source, write not needed. Skipping.&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; app: Enter nrf_bootloader_fw_activate&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; app: Valid BL&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; app: Verifying BL: Addr: 0x000F1000, Src: 0x00059000, Len: 0x0000C598&lt;br /&gt;00&amp;gt; &amp;lt;debug&amp;gt; app: No bootloader copy needed, bootloader update complete.&lt;br /&gt;00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_settings: Settings write aborted since it tries writing to forbidden settings.&lt;br /&gt;00&amp;gt; Received a fault! id: 0x00004002, pc: 0x00000000, info: 0x2003ffa0&lt;/p&gt;
&lt;p&gt;Q2)&lt;/p&gt;
&lt;p&gt;If yes on Q1, then it seems like NRF_DFU_IN_APP somehow must be incorrectly set to 1 in the bootloader.&lt;br /&gt;Could you double check the value of NRF_DFU_IN_APP ?&lt;/p&gt;
[quote user=""]I also have the ability to add additional log messages to the bootloader.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;Maybe you could print/log the value of&amp;nbsp;&lt;span&gt;NRF_DFU_IN_APP&amp;nbsp;?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/326024?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2021 16:31:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6f72e18-cf82-4bbd-9dc3-7d908205239a</guid><dc:creator>csulz</dc:creator><description>&lt;p&gt;To be clear, the in-app DFU is working once the correct bootloader is in place. This is not the issue to be focusing on.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The app includes a bluetooth DFU service and I am able to initiate and complete an app update with an android phone. However when I attempt to update the bootloader with this exact same process it fails every time.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/325970?ContentTypeID=1</link><pubDate>Fri, 20 Aug 2021 12:50:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41ad47bb-2be0-479c-9f40-49e4c87ba91a</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;&lt;span&gt;Are you able to put the device into normal bootloader mode, and do a non in-app/background DFU ?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/325802?ContentTypeID=1</link><pubDate>Thu, 19 Aug 2021 16:11:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95b9a216-3e8a-44ad-867a-6ca9019e11ae</guid><dc:creator>csulz</dc:creator><description>&lt;p&gt;Bootloader project:&lt;/p&gt;
&lt;p&gt;#define NRF_DFU_IN_APP 0&lt;/p&gt;
&lt;p&gt;(also #define&amp;nbsp;NRF_BL_DFU_ALLOW_UPDATE_FROM_APP&amp;nbsp;1)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Application project:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#define NRF_DFU_IN_APP 1&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Do you think this means that the app is running and just crashing here? What is the app trying to write to the settings page? Anyway to change what is being written?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/325773?ContentTypeID=1</link><pubDate>Thu, 19 Aug 2021 13:51:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b90e036f-37d0-411a-b0b1-778c294a9f59</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;The code that prints this:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;00&amp;gt; &amp;lt;warning&amp;gt; nrf_dfu_settings: Settings write aborted since it tries writing to forbidden settings.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Looks like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    if (NRF_DFU_IN_APP &amp;amp;&amp;amp; !settings_forbidden_parts_equal_to_backup((uint8_t *)&amp;amp;s_dfu_settings))
    {
        NRF_LOG_WARNING(&amp;quot;Settings write aborted since it tries writing to forbidden settings.&amp;quot;);
        return NRF_ERROR_FORBIDDEN;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;NRF_DFU_IN_APP is documented as this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;// &amp;lt;q&amp;gt; NRF_DFU_IN_APP  - Specifies that this code is in the app, not the bootloader, so some settings are off-limits.
 

// &amp;lt;i&amp;gt; Enable this to disable writing to areas of the settings that are protected
// &amp;lt;i&amp;gt; by the bootlader. If this is not enabled in the app, certain settings write
// &amp;lt;i&amp;gt; operations will cause HardFaults or will be ignored. Enabling this option
// &amp;lt;i&amp;gt; also causes postvalidation to be disabled since this is meant to be done
// &amp;lt;i&amp;gt; in the bootloader. NRF_BL_DFU_ALLOW_UPDATE_FROM_APP must be enabled in the bootloader.

#ifndef NRF_DFU_IN_APP
#define NRF_DFU_IN_APP 0
#endif&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What did you set NRF_DFU_IN_APP to in your bootloader project?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/324711?ContentTypeID=1</link><pubDate>Thu, 12 Aug 2021 16:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1db7193-f5a3-4a8e-bebb-bcd54333278b</guid><dc:creator>csulz</dc:creator><description>&lt;p&gt;nRF5 SDK 15.3.0&lt;/p&gt;
&lt;p&gt;nRFutil version 6.0.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/324692?ContentTypeID=1</link><pubDate>Thu, 12 Aug 2021 14:07:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9cc8a426-b1dc-453e-9335-303cff5cb255</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;What version of nrfutil did you use?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I see that e.g. we have this statement, &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/dfu_package_combinations.html"&gt;here&lt;/a&gt;, that might be relevant:&lt;br /&gt;&amp;quot;&lt;sup&gt;1&lt;/sup&gt;&lt;span&gt;Use nRF Util v5.0.0 or later when creating update packages of bootloaders compiled from nRF5 SDK 15.3.0 or later to ensure the correct size of generated packages.&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/324316?ContentTypeID=1</link><pubDate>Tue, 10 Aug 2021 16:33:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37828973-4379-4e9e-818d-994198a2648e</guid><dc:creator>csulz</dc:creator><description>&lt;p&gt;The &amp;#39;in-app/background&amp;#39; DFU process does not work with &amp;#39;bootloader v1&amp;#39; which is the reason for the upgrade.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The DFU process to attempt the upgrade from &amp;#39;bootloader v1&amp;#39; to &amp;#39;bootloader v2&amp;#39; was performed by connecting to the device via Bluetooth nRF Connect Android application while the device was running the application code, which includes a DFU service. The process appears to finish correctly and there is a verification message from the android app, but when the device reboots the application does not run. This same process works for application updates but not for bootloader updates.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/324091?ContentTypeID=1</link><pubDate>Mon, 09 Aug 2021 20:57:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4321c613-5924-4437-b1a9-fc4d15514333</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="csulz"]The DFU process appears to complete but the app still does not seem to boot after this[/quote]
&lt;p&gt;Was this DFU process a &amp;quot;in-app DFU&amp;quot;/ background DFU &lt;span&gt;process&amp;nbsp;&lt;/span&gt;, or was it done when the device was in &amp;quot;regular&amp;quot; bootloader mode ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/322537?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 19:10:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a79128ce-3a99-453d-93bf-5ec882ee4f27</guid><dc:creator>csulz</dc:creator><description>&lt;p&gt;Any other ideas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/321908?ContentTypeID=1</link><pubDate>Mon, 26 Jul 2021 21:04:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05e523ea-5646-4a63-b0c2-54634808897f</guid><dc:creator>csulz</dc:creator><description>&lt;p&gt;I generated a bootloader package with this command and loaded it onto a device running our app and our bootloader v1. The DFU process appears to complete but the app still does not seem to boot after this. There appears to be no change with this new command.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App will not launch after updating Bootloader with BLE DFU</title><link>https://devzone.nordicsemi.com/thread/321656?ContentTypeID=1</link><pubDate>Sun, 25 Jul 2021 13:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc2f200a-d44a-4dd3-996b-b24bde2afee1</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;&amp;nbsp;Hi,&lt;/p&gt;
&lt;p&gt;Can you try to generate the bootloader packet using the following command:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil pkg generate --bootloader secure_bootloader.hex --bootloader-version 2 --hw-version 52 --sd-req 0xB6 --key-file private.pem BL2.zip&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The --sd-id is the new softdevice ID to be used as --sd-req for the application update in case the ZIP contains a Softdevice and an application. Since the ZIP contains only a bootloader then this setting is not needed.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>