<?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>Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53662/secure-dfu-successful-but-application-not-loading</link><description>placeholder</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jul 2020 07:51:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53662/secure-dfu-successful-but-application-not-loading" /><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/258530?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 07:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c03cfe2-bf8c-4b68-8abb-5989db0f2cd1</guid><dc:creator>Luke Galea</dc:creator><description>&lt;p&gt;Hi Peter, honestly I forgot by heart since this time was still a learning curve for me. I&amp;#39;d suggest re-downloading the SDK and starting from scratch again with an example program.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/257457?ContentTypeID=1</link><pubDate>Mon, 29 Jun 2020 19:06:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33736657-543d-4f6f-9b31-e7bdacd3226b</guid><dc:creator>PeterInStillwater</dc:creator><description>&lt;p&gt;Luke - I realize this was posted 8 months ago, however, I&amp;#39;m having a similar issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see how it was resolved.&amp;nbsp; Would you have time to relate your findings?&amp;nbsp; That would be much appreciated.&amp;nbsp; Thank You.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/216796?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 10:32:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b91b08e5-5f3e-4584-8bc5-c0e0aaf6d3ec</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Could you please post all the details you do for each step, and also what the logging of the bootloader shows?&lt;/p&gt;
&lt;p&gt;I cannot help you unless you provide this information.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/216739?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 06:55:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7963272-6f73-4765-bff1-293c11cbbe42</guid><dc:creator>Luke Galea</dc:creator><description>&lt;p&gt;Hi Andreas, I followed all of those steps and I can see the device advertising as&amp;nbsp;&lt;span&gt;Nordic_BMS. My issue is when I want to upload an application other than that described in the tutorial. Take for example the blinky or soft led examples, I manage to package and upload these packages successfully to the device OTA by bluetooth but the NRF52840 is not booting into these applications after restart. If I restart the device the same thing happens. Then when I press button 4 the device enters DFU.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/216738?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 06:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d364c046-a270-46ae-9323-25ac28a8772e</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;br /&gt;&lt;br /&gt;Please follow all these steps, and paste the output of all you do.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 1.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Generate a private key by running this command in cmd in your SDK 15.3 folder:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;nrfutil keys generate priv.pem&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 2.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Generate a public key file from that private key by running this command in cmd in your SDK 15.3 folder:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;nrfutil keys display --key pk --format code priv.pem --out_file dfu_public_key.c&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;You should now have a file named dfu_public_key.c in your SDK 15.3 folder.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 3.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Open the folder nRF5_SDK_15.3.0_59ac345\examples\dfu&lt;br /&gt;&lt;br /&gt;You see that there is a file named dfu_public_key.c, delete this file.&lt;br /&gt;&lt;br /&gt;Take the file you generated in step 2 and move it to this folder.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 4.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Open up the SES project in the folder nRF5_SDK_15.3.0_59ac345\examples\dfu\secure_bootloader\pca10056_ble_debug and build it in your preferred IDE.&lt;br /&gt;&lt;br /&gt;After you have built it the folders: \Output\Release\Exe will appear in the folder structure. Open these folders and copy the file named secure_bootloader_ble_s140_pca10056.hex to your SDK 15.3 folder. This is the .hex file for the secure bootloader you have created. (If you for example use Segger Embedded Studio)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 5.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Open the folder nRF5_SDK_15.3.0_59ac345\components\softdevice\s140\hex, and copy the .hex file s140_nrf52_6.1.1_softdevice.hex to your SDK 15 folder.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 6.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Create an application, for example the ble_app_bms example, and copy the .hex file as you did for the bootloader to your SDK 15.3 folder (you find the .hex file in nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_bms\pca10056\s140\ses\Output\Release\Exe, named ble_app_bms_pca10056_s140.hex, if you use Segger Embedded Studio)&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 7.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Generate a bootloader settings page by running this command in cmd in your SDK 15.3 folder:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;nrfutil settings generate --family NRF52840 --application ble_app_bms_pca10056_s140.hex --application-version 3 --bootloader-version 2 --bl-settings-version 1 settings.hex&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The output looks like this:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 8.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Merge the settings.hex and secure_bootloader_ble_s140_pca10056.hex together by running this command in cmd in your SDK 15 folder:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;mergehex.exe --merge settings.hex secure_bootloader_ble_s140_pca10056.hex --output my_bootloader.hex&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The output looks like this:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 9.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Generate the DFU packet by running this command in cmd in your SDK 15 folder:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;nrfutil pkg generate --hw-version 52 --application-version 3 --application ble_app_bms_pca10056_s140.hex --sd-req 0xB6 --key-file priv.pem app_dfu_package.zip&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The output looks like this:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 10.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;You should now have these files in the SDK 15 folder:&lt;br /&gt;&lt;br /&gt;app_dfu_package.zip&lt;br /&gt;&lt;br /&gt;ble_app_bms_pca10056_s140.hex&lt;br /&gt;&lt;br /&gt;my_bootloader.hex&lt;br /&gt;&lt;br /&gt;priv.pem&lt;br /&gt;&lt;br /&gt;s140_nrf52_6.1.1_softdevice.hex&lt;br /&gt;&lt;br /&gt;secure_bootloader_ble_s140_pca10056.hex&lt;br /&gt;&lt;br /&gt;settings.hex&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 11.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Open RTT-Viewer and select the board you&amp;#39;re using.&lt;br /&gt;&lt;br /&gt;Open the SDK 15 folder in cmd, and write the commands:&lt;br /&gt;&lt;br /&gt;&lt;em&gt;nrfjprog.exe -e&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;nrfjprog.exe --program s140_nrf52_6.1.1_softdevice.hex --verify&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;nrfjprog.exe --program my_bootloader.hex --verify -r&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;You have now programmed the SoftDevice and the Bootloader including the bootloader settings page.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step 12.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Open nRF Connect on your mobile phone and scan:&lt;br /&gt;&lt;br /&gt;When you find DfuTarg click on Connect.&lt;br /&gt;&lt;br /&gt;And click on the DFU button and Select distribution packet (ZIP)&lt;br /&gt;&lt;br /&gt;And select the file app_dfu_package.zip.&lt;br /&gt;&lt;br /&gt;After you have finished the device will reset and start advertising as Nordic_BMS&lt;br /&gt;&lt;br /&gt;Does this make things a bit clearer?&lt;/p&gt;
&lt;p&gt;Could you also please post all the output from RTT-Viewer if this does not work?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/216735?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 06:35:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7636786c-f745-441c-a7cc-75f33702972f</guid><dc:creator>Luke Galea</dc:creator><description>&lt;p&gt;Hi Andreas, Sorry for being unclear but the problem persists after the following the steps which you described in your previous reply. If I use the debug bootloader then what private key should I assign to my HEX files for zipping? Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/216734?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2019 06:33:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ccff301-43fc-4b79-805a-20b02245c58a</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi Luke.&lt;/p&gt;
&lt;p&gt;It would be nice if you could do as I suggested in my previous reply.&lt;/p&gt;
&lt;p&gt;Also it would be great if you could build the debug bootloader.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/216731?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 12:54:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e40964b6-0b79-4706-a4fe-9bb15f647ebd</guid><dc:creator>Luke Galea</dc:creator><description>&lt;p&gt;Hi Andreas,&lt;/p&gt;
&lt;p&gt;Unfortunately the problem persists.&lt;/p&gt;
&lt;p&gt;When I generate a zip file using the ble_app_bms example this works fine (i.e. the zip file is uploaded to the device and works).&lt;/p&gt;
&lt;p&gt;When I generate a zip file using the led soft blink example I experience the same issue as before. The package is successfully uploaded but upon restart/reset the microcontroller does not boot into the program but remains in bootloader mode. In fact when pressing Button 4 it then enters DFU mode.&lt;/p&gt;
&lt;p&gt;I think that the issue seems to be related to the hex file chosen? Is there a setting perhaps that affects the boot functionality in the hex?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Luke&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure DFU Successful but Application not loading</title><link>https://devzone.nordicsemi.com/thread/216730?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2019 11:26:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10bc3fd9-9d1f-4034-a82c-c685031d5ef5</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Could you please try to follow the steps as described &lt;a href="https://devzone.nordicsemi.com/support-private/support/222994#permalink=440682"&gt;here&lt;/a&gt;, and post every command you ran in your command line?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>