<?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>New application doesn&amp;#39;t run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29319/new-application-doesn-t-run-after-secure-dfu-process-reaches-100</link><description>Hi to everyone! 
 I&amp;#39;m following this guide to learn how to use secure DFU on a nRF52832DK board. 
 All steps have been done successfully, or I think so, until I reach the D4 step where the new program has to start automatically after DFU process, but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jan 2018 14:03:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29319/new-application-doesn-t-run-after-secure-dfu-process-reaches-100" /><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116661?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 14:03:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80f8c593-e827-4c50-95d4-3a528c2e1df4</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;No worries. :) Great to here that you figured it out! I also made the mistake of using the blank example first (without the SD). You are correct that you will need to use the blinky example that uses the softdevice, as you flash the softdevice to the DK first in step D1 of the &lt;a href="https://devzone.nordicsemi.com/blogs/1085/getting-started-with-nordics-secure-dfu-bootloader/"&gt;Secure DFU blog post&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116660?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 13:34:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cbbe6fe-f50c-4450-adef-d26b60e874cd</guid><dc:creator>nemunoz</dc:creator><description>&lt;p&gt;Ok, it worked!&lt;/p&gt;
&lt;p&gt;But it looks like only works with the hex file which has references to SoftDevice.
I mean that only works the hex file obtained by compiling (in Keil) the next project:
&lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7\examples\peripheral\blinky\pca10040\s132\arm4&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Because the hex one which is in this project &lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7\examples\peripheral\blinky\pca10040\blank\arm4&lt;/code&gt; doesn&amp;#39;t work (I can&amp;#39;t even create the zip with it).&lt;/p&gt;
&lt;p&gt;I think is because SoftDevice is programmed in the board memory. So, any program which doesn&amp;#39;t use SoftDevice will not work (as if I upload a program without SoftDevice through USB to the board when the board has SoftDevice).&lt;/p&gt;
&lt;p&gt;In conclusion, I think I get the answer to my question #3. And the answer is yes, the hex file must use SoftDevice. Thats why my first hex didn&amp;#39;t work either, because it didn&amp;#39;t have SoftDevice.&lt;/p&gt;
&lt;p&gt;Thank you so much @Bjørn Kvaale!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116659?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2018 11:47:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89035c08-85d2-4d2d-893b-9f9f74d0d4cf</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;I tried your way with the precompiled hex file, but that didn&amp;#39;t work. The reason it doesn&amp;#39;t work is because the precompiled hex file has the softdevice included, but in the secure DFU blog post you are looking at, you only want to update the application (not the softdevice too). Try building the blinky example using Keil instead (like it says &lt;a href="https://devzone.nordicsemi.com/blogs/1085/getting-started-with-nordics-secure-dfu-bootloader/"&gt;in step C1&lt;/a&gt;). The hex file built by Keil in the _build folder does not include the softdevice. You can check this in nrfgostudio by uploading the precompiled hex file found in the hex folder as an application and seeing that there is a softdevice &amp;amp; application section in memory. If you program the hex file built by Keil, the softdevice will not be in memory.&lt;/p&gt;
&lt;p&gt;Like you said previously, you get errors if you try to create a zip file by using the precompiled blinky_pca10040.hex file. I am pretty sure you are doing everything else correctly. So essentially just follow the blog post and build your application using Keil &amp;amp; not using the precompiled hex files. Hope that helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116658?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 13:46:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48ba6b6f-bd95-4551-9a04-bcc67ecfe0af</guid><dc:creator>nemunoz</dc:creator><description>&lt;p&gt;To generate the zip file I put in the same folder &lt;code&gt;blinky_pca10040_s132.hex&lt;/code&gt;, &lt;code&gt;nrfutil.exe&lt;/code&gt; and &lt;code&gt;private.key&lt;/code&gt; and execute the next command: &lt;code&gt;nrfutil.exe pkg generate --hw-version 52 --application-version 1 --application blinky_pca10040_s132.hex --sd-req 0x9D --key-file private.key blinky_SD.zip&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The console outputs: &lt;code&gt;zip created at blinky_SD.zip&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Afterwards I upload this zip file to my phone. I used to use AirDroid, but in my last try I used my email.&lt;/p&gt;
&lt;p&gt;Finally I use either nRF Connect or nRF Toolbox to upload the application through DFU proccess. But the blinky application never runs. Again it reaches the 100% in the upload proccess in both programs.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116657?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 13:43:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5f3d1e3-10ca-4781-84f0-e631d7674124</guid><dc:creator>nemunoz</dc:creator><description>&lt;p&gt;Hi Bjørn Kvaale.&lt;/p&gt;
&lt;p&gt;I take the hex file in the folder: &lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7\examples\peripheral\blinky\hex&lt;/code&gt;.
Here there are three hex files: one for PCA 10056 and two for PCA 10040. The first one is the blinky without SoftDevice (&lt;code&gt;blinky_pca10040.hex&lt;/code&gt;) and the other one is the blinky with SoftDevice (&lt;code&gt;blinky_pca10040_s132.hex&lt;/code&gt;). I take the last one because the hex without SoftDevice can not be used to generate the zip file.&lt;/p&gt;
&lt;p&gt;Then:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;I erase all in my development board.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Program SoftDevice (I take &lt;code&gt;s132_nrf52_5.0.0_softdevice.hex&lt;/code&gt; file from &lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7/components/softdevice/s132/hex/&lt;/code&gt;) using nRFgo Studio.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download the bootloader from Keil (the project is in &lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7\examples\dfu\bootloader_secure_ble\pca10040&lt;/code&gt;, but I know I can also program it from nRFgo Studio).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;And generate the zip file.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116655?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2018 12:23:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48012f70-068c-4082-83cb-f9bc439a3b1d</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Hi nemunoz, I just tried doing a secure dfu with the blinky app found in the folder: &lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7\examples\peripheral\blinky\pca10040\s132&lt;/code&gt;. Have you tested the blinky program without the bootloader? I had two issues when doing this: firstly, I had to use the blinky example in the peripheral folder that uses the softdevice to be able to create the zip file in step C2 of the &lt;a href="https://devzone.nordicsemi.com/blogs/1085/getting-started-with-nordics-secure-dfu-bootloader/"&gt;secure dfu blog post&lt;/a&gt;. Remember to use the 0x9D value after &lt;code&gt;--sd-req&lt;/code&gt;, as you are using the SD 132 v 5.0.0 (this can be verified by looking at this folder: &lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7\components\softdevice\s132\hex&lt;/code&gt;). What output code did you get once you created the zip file? I got Zip created at app_dfu_package.zip (depends on what you call the zip file). It could be something with the version rule maybe? For me it worked if I set it to 1. Lastly, I used nrfgostudio to flash the softdevice first (located in the &lt;code&gt;nRF5_SDK_14.0.0_3bcc1f7\components\softdevice\s132\hex&lt;/code&gt; folder) &amp;amp; then the correct bootloader which I built using Keil. Then, I sent the zip file I generated to myself via email, opened the email on my phone &amp;amp; opened the zip file with nrf toolbox. From there, it should be straight forward. Lastly, after the DFU process was complete, the LEDs started blinking like they should in the blinky example. Hope that helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116654?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 19:49:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a859f23-baac-4e94-9cc9-814f3916de0c</guid><dc:creator>nemunoz</dc:creator><description>&lt;p&gt;Hi Bjørn Kvaale.&lt;/p&gt;
&lt;p&gt;My blinky example blinks LED1 and LED2 each 100ms (because my custom board only have two LEDS).&lt;/p&gt;
&lt;p&gt;But I just tried, in the development board, the Nordic Blinky example (provided in SDK 14.0.0, blinky_pca10040_s132.hex) and it also doesn&amp;#39;t run after DFU process. It reach 100% and says the upload was successful, but the application never start.&lt;/p&gt;
&lt;p&gt;Again I get stuck in the step D4.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: New application doesn't run after secure DFU process reaches 100%</title><link>https://devzone.nordicsemi.com/thread/116656?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2018 13:54:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:34da35f1-a417-48f4-be68-0e16fa0d9555</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Hi nemunoz, if you are referring to the BLE Secure DFU Bootloader example in question 1, then yes the example is only a bootloader (&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v14.2.0/ble_sdk_app_dfu_bootloader.html?cp=4_0_0_4_4_0"&gt;see link&lt;/a&gt;).
So if I understand you correctly, you essentially want to do secure DFU with your own blinky example, which is most likely similar to the Blinky example found in the examples/peripheral/blinky folder, right? The Nordic blinky example found here does not require the softdevice either.&lt;/p&gt;
&lt;p&gt;Essentially, you just want to &lt;a href="https://devzone.nordicsemi.com/blogs/1085/getting-started-with-nordics-secure-dfu-bootloader/"&gt;follow the guide&lt;/a&gt; you refer to &amp;amp; in step C1, you just build your own blinky application hex file. If you were using the Nordic blinky example, you could build the program in Keil or Segger Embedded Studio for example. Then, you can find the hex file inside the _build folder if you are using Keil (Output folder for SES). You will have to use the softdevice since you are doing a secure dfu over the air. Essentially, just follow the blog post until step D4. This should hopefully work without any issues. If it doesn&amp;#39;t work, let me know &amp;amp; I will test this process using the Nordic Blinky example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>