<?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 Bootloader does not start application</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70612/secure-bootloader-does-not-start-application</link><description>Hello community! 
 I have curious problems with the bootloading process in SDK 17.0.2 . What I am trying to do is the following: 
 1. Create a bootloader settings page with nrfutil 6.1.0 : 
 
 2. Merge the secure bootloader (UART DFU version), the settings</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 25 Jan 2021 07:34:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70612/secure-bootloader-does-not-start-application" /><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/290927?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 07:34:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfbd63f9-3e9d-4bba-a012-78d394122015</guid><dc:creator>Lex</dc:creator><description>&lt;p&gt;Well, then thank you very much for your help and patience! I am glad that everything seems ok now.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/290440?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 10:13:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32e72968-e685-4098-affc-8d6ab529660d</guid><dc:creator>Edvin</dc:creator><description>[quote user="Lex89"] I also find it weird that the application region takes up the SoftDevice region.[/quote]
&lt;p&gt;&amp;nbsp;It does not, it is just nRF Connect -&amp;gt; programmer that struggles to distinguish the application from the softdevice. You can check out the flash content from your hex files, and see that the softdevice region is equal between the two.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The number of black lines near the top is also just nRF Connect that is trying to make sense of something it is not able to. There is nothing wrong in the flash of the nRF. The coloring and naming of the different regions in the flash&amp;nbsp;is just a &amp;quot;nice to have&amp;quot; feature in nRF Connect for Desktop that is not working optimal.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you see in the black lines on the top, there are some parts that have changed from 0xFF to 0x00, which is confusing nRF Connect, but this is just the way that the bootloader updates these settings. There is nothing wrong (as I can tell) in the flash here. It will not be filled/used up or anything. The bootloader will manage this for you.&lt;/p&gt;
&lt;p&gt;So as long as the bootloader and application is working, I wouldn&amp;#39;t be concerned about any of this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/290409?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 08:15:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dcbb483d-4a8f-4e28-b74c-d000e597ba53</guid><dc:creator>Lex</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Here is a flash dump right after programming the Production.hex onto the device:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Production_5F00_flash_5F00_dump.hex"&gt;devzone.nordicsemi.com/.../Production_5F00_flash_5F00_dump.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here is a flash dump after performing a DFU update (the application hex is the same in both cases):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/After_5F00_DFU_5F00_flash_5F00_dump.hex"&gt;devzone.nordicsemi.com/.../After_5F00_DFU_5F00_flash_5F00_dump.hex&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please note that the black lines are not the only thing that looks weird. I also find it weird that the application region takes up the SoftDevice region.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/290269?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 13:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e4aeee9-3bc5-4be0-a613-5d3651d67e5d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you please provide a flash dump of the nRF when there are 3 or 4 black lines? I suspect that this is just the way that nRF Connect for Desktop -&amp;gt; Programmer interprets the flash, and it doesn&amp;#39;t reflect the number of actual flash pages used by the nRF.&lt;/p&gt;
&lt;p&gt;Also attach a flash dump from when there are only two black lines.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To capture a flash dump, you can use the command &amp;quot;nrfjprog --readcode my_flash_dump.hex&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/290199?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 10:36:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fd49722-f887-4b5e-a388-cdcb7bcf7ce3</guid><dc:creator>Lex</dc:creator><description>&lt;p&gt;Hi Edvin,&lt;/p&gt;
&lt;p&gt;Indeed, uninstalling version 10.12.1 of the nRF Command line tools and then installing 10.11.1 has partially solved the problem: nRF Connect -&amp;gt; Programmer does not complain anymore, and as soon as I program the merged hex file onto my device, the application starts running. Very nice!&lt;/p&gt;
&lt;p&gt;But one problem still remains, which is that the way flash memory looks still resembles a horror movie. If you look at the picture below, on the &lt;strong&gt;right side&lt;/strong&gt; you can see how the merged hex file (Production.hex) looks, according to the Programmer.&amp;nbsp;&lt;span style="font-family:inherit;"&gt;The yellow, blue and green regions are correctly recognized as &lt;em&gt;MBR, SoftDevice&lt;/em&gt; and &lt;em&gt;Application&lt;/em&gt;. The red region is also correctly recognized as &lt;em&gt;Bootloader&lt;/em&gt; region. However, there are three black lines instead of two: The first (from bottom) black section and the last are not recognized as any region. The middle one is an &lt;em&gt;MBR Parameters&lt;/em&gt; region.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;On the &lt;strong&gt;left side&lt;/strong&gt;, you can see that the &lt;em&gt;SoftDevice&lt;/em&gt; region is not recognized anymore, but instead, &lt;em&gt;Application&lt;/em&gt; region is written there. The green section above it is also an &lt;em&gt;Application&lt;/em&gt; region. It is followed by a red &lt;em&gt;Bootloader&lt;/em&gt; region, a black &lt;em&gt;MBR Parameters&lt;/em&gt; region and, an unrecognized region.&lt;/p&gt;
&lt;p&gt;&lt;img alt="memory layout with version 10.11.1 of the nRF Command line tools" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Programmed_5F00_w_5F00_mergehex10.11.1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;When on top of this I do a UART DFU process, then the memory looks like this:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Flash memory layout after UART DFU process" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Flash_5F00_updated_5F00_after_5F00_working_5F00_merge.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Yellow: &lt;em&gt;MBR Parameters&lt;/em&gt;;&lt;/p&gt;
&lt;p&gt;Three green regions, each of them &lt;em&gt;Application&lt;/em&gt; regions;&lt;/p&gt;
&lt;p&gt;Red:&amp;nbsp;&lt;em&gt;Bootloader&lt;/em&gt; region;&lt;/p&gt;
&lt;p&gt;1st black: &lt;em&gt;MBR Parameters&lt;/em&gt;;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2nd, 3rd and 4th black: not recognized.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/290136?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 08:18:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b52b4d00-23c4-4737-a46b-2b507cb266ed</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It looks like you are correct. There is an issue with mergehex (probably introduced in version 10.12.x, where it sometimes generates invalid merged files. Until fixed, can you please try to remove nrfjprog&amp;nbsp; and mergehex, and use version 10.11.1 instead?&lt;/p&gt;
&lt;p&gt;mergehex is part of nRF Command line tools, and you can find and download the different versions &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/290120?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 07:11:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a64adbc1-f7a6-455a-8765-160d30f9a1b7</guid><dc:creator>Lex</dc:creator><description>&lt;p&gt;Yes, the right hand window is empty in the beginning. Here is how it looks in full window:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Overlapping data error" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Error_5F00_overlapping_5F00_data_5F00_fullscreen.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Notice the red text at the bottom of the window.&lt;/p&gt;
&lt;p&gt;Below is a full window image about how it looks when I choose the files separately:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Without error overlapping data" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Error_5F00_no_5F00_error.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;Even though this setup does not trigger an error message, I do not believe this is how it should look. There are three black sections on the image although there should only be two: one for the MBR parameters page and one for the bootloader settings page. I don&amp;#39;t know where the extra section comes from...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/289974?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2021 10:51:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63acc386-1030-4aed-9fc2-7f13847cbe60</guid><dc:creator>Edvin</dc:creator><description>[quote user="Lex89"]but if you look at the second sentence in my post, it says:&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;Yes. Sorry. I missed that part when I started looking for possible issues.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="Lex89"]Anyway, I have just found another clue! I get the following message in the desktop&amp;nbsp;&lt;span style="background-color:rgba(204, 255, 255, 1);color:rgba(0, 0, 0, 1);"&gt;nRF Connect v3.6.1 - Programmer&lt;/span&gt;:[/quote]
&lt;p&gt;&amp;nbsp;So before you upload the merged .hex file into nRF Connect for Desktop -&amp;gt; Programmer, is the window to the right completely empty before you do this?&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611053484667v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If not, try to click the &amp;quot;-&amp;quot; signs that appear when you hover your mouse over the regions in the right hand window before you drag and drop your merged .hex file into the programmer app:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611053462779v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/289853?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 16:51:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c05dd83e-4858-4e7f-8aca-e5a59beeb465</guid><dc:creator>Lex</dc:creator><description>&lt;p&gt;Hi, thanks for your fast reply! My wording might have been confusing, but if you look at the second sentence in my post, it says:&amp;nbsp;&lt;/p&gt;
[quote userid="81244" url="~/f/nordic-q-a/70612/secure-bootloader-does-not-start-application"]1. Create a bootloader settings page with &lt;span style="background-color:rgba(204, 255, 255, 1);font-family:arial, helvetica, sans-serif;"&gt;nrfutil 6.1.0&lt;/span&gt;:[/quote]
&lt;p&gt;I mean, it was a previously developed product that I used SDK 15 and an older version of nrfutil. And, in that product, everything worked just fine.&lt;/p&gt;
&lt;p&gt;Anyway, I have just found another clue! I get the following message in the desktop&amp;nbsp;&lt;span style="background-color:#ccffff;color:#000000;"&gt;nRF Connect v3.6.1 - Programmer&lt;/span&gt;:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt="Error, Overlapping data" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Error_5F00_overlapping_5F00_data.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I get this message when I try to program the merged &lt;em&gt;Production.hex&lt;/em&gt; file by clicking the menu option &amp;quot;Add HEX file&amp;quot;, then choosing &lt;em&gt;Production.hex&lt;/em&gt;. It fails to open the hex file. However, if I choose the four hex files separately, in that case I do not get any error messages, but the flash looks the same erroneous after programming it with the option &amp;quot;Erase &amp;amp; write&amp;quot;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/289829?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 15:10:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3af2b176-5e2f-41c3-9fa9-f4165192472f</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;It looks like your setup should work. Perhaps you have a too old version of nrfutil? Since it was working in SDK15.0.0. Does your nrfutil output this warning when you generate the settings?&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;Note: Generating a DFU settings page with backup page included.
This is only required for bootloaders from nRF5 SDK 15.1 and newer.
If you want to skip backup page generation, use --no-backup option.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If not, try to update to nrfutil v6.1.0. You can find the executable here:&amp;nbsp;&lt;a href="https://github.com/NordicSemiconductor/pc-nrfutil/releases"&gt;https://github.com/NordicSemiconductor/pc-nrfutil/releases&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;or you can use python pip:&lt;/p&gt;
&lt;p&gt;pip install nrfutil&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Let me know if upgrading nrfutil doesn&amp;#39;t work, and we will look deeper into this.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Secure Bootloader does not start application</title><link>https://devzone.nordicsemi.com/thread/289783?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 14:07:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:845b92ae-42fa-4d7a-897a-92a531c0fcad</guid><dc:creator>Lex</dc:creator><description>&lt;p&gt;Sorry, I have to clarify my last sentence about successfully implementing a similar bootloading process before. It was the UART bootloader indeed that&amp;nbsp;I used&amp;nbsp;(in SDK 15.0.0), not the BLE bootloader.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>