<?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>Debug secure bootloader shows invalid app while secure bootloader shows valid app after programming board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/88049/debug-secure-bootloader-shows-invalid-app-while-secure-bootloader-shows-valid-app-after-programming-board</link><description>Hi, 
 
 I&amp;#39;m working on modifying the secure bootloader (SDK 17, nRF52840, s140) to store the old app before the new app is programmed into Bank 0 (see this other thread ). Since I need to debug the bootloader, I need to use the debug bootloader ( pca10056_s140_ble_debug</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 20 May 2022 12:05:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/88049/debug-secure-bootloader-shows-invalid-app-while-secure-bootloader-shows-valid-app-after-programming-board" /><item><title>RE: Debug secure bootloader shows invalid app while secure bootloader shows valid app after programming board</title><link>https://devzone.nordicsemi.com/thread/368828?ContentTypeID=1</link><pubDate>Fri, 20 May 2022 12:05:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc457494-650b-4b6b-b2f6-9834899df496</guid><dc:creator>alberto.</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It seems that now it&amp;#39;s working properly. Unfortunately, I&amp;#39;m not 100% sure what fixed it, but I think your suggestions worked in the end.&lt;/p&gt;
&lt;p&gt;Thanks again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug secure bootloader shows invalid app while secure bootloader shows valid app after programming board</title><link>https://devzone.nordicsemi.com/thread/368559?ContentTypeID=1</link><pubDate>Thu, 19 May 2022 09:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21367123-270f-498f-a1f2-e66887c072e8</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Sorry, but I&amp;#39;m a bit out of ideas. Have you tried to see if what happens if you use the same settings.hex with the &amp;quot;release&amp;quot; build? Also, are you able to share the debug version of the bootloader so I can try to reproduce the same here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug secure bootloader shows invalid app while secure bootloader shows valid app after programming board</title><link>https://devzone.nordicsemi.com/thread/368506?ContentTypeID=1</link><pubDate>Thu, 19 May 2022 06:34:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f62e660-d822-4443-9d69-d3d2de61aae8</guid><dc:creator>alberto.</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I used the commands&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil settings generate --family NRF52840 --application _build/nrf52840_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex
nrfjprog --program settings.hex --sectorerase -r&lt;/pre&gt;to program the new bootloader settings and still got the same warning&amp;nbsp;&lt;code&gt;&amp;lt;warning&amp;gt; nrf_dfu_settings: Resetting bootloader settings since neither the settings page nor the backup are valid (CRC error).&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug secure bootloader shows invalid app while secure bootloader shows valid app after programming board</title><link>https://devzone.nordicsemi.com/thread/368398?ContentTypeID=1</link><pubDate>Wed, 18 May 2022 13:58:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:568c0556-234d-485a-8389-33ef56e43239</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m surprised it says the settings page is invalid. The correct command for you SDK version should be (--app-boot-validation defaults to VALIDATE_GENERATED_CRC anyway):&lt;pre class="ui-code" data-mode="text"&gt;nrfutil settings generate --family NRF52840 --application $(OUTPUT_DIRECTORY)/nrf52840_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 2 settings.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here i omitted the --no-backup argument and set the settings version to &amp;#39;2&amp;#39; as required for this SDK version you are using.&lt;/p&gt;
&lt;p&gt;Could you please try with the command above again and program the settings.hex with the nrfjprog command below?&lt;/p&gt;
&lt;p&gt;$ nrfjprog --program settings.hex --sectorerase -r&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug secure bootloader shows invalid app while secure bootloader shows valid app after programming board</title><link>https://devzone.nordicsemi.com/thread/368332?ContentTypeID=1</link><pubDate>Wed, 18 May 2022 12:09:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d72af6b0-bfee-4434-bb2e-a2a6c1f1db67</guid><dc:creator>alberto.</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;In order to generate the bootloader settings I have been using the command&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;nrfutil settings generate --family NRF52840 --application $(OUTPUT_DIRECTORY)/nrf52840_xxaa.hex --application-version 1 --bootloader-version 1 --bl-settings-version 1 --no-backup settings.hex&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So I have not been including the flag&amp;nbsp;&lt;code&gt;&lt;span&gt;--app-boot-validation&amp;nbsp;VALIDATE_GENERATED_CRC &lt;/span&gt;&lt;/code&gt;before.&lt;/p&gt;
&lt;p&gt;I have tried to include this flag which required to change&amp;nbsp;&lt;span&gt;&lt;code&gt;--bl-settings-version&lt;/code&gt; from &lt;code&gt;1&lt;/code&gt; to &lt;code&gt;2&lt;/code&gt; but I still get the same error. Removing the &lt;code&gt;--no-backup&lt;/code&gt; flag didn&amp;#39;t change the outcome either.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The logs show that the setting page is not valid.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Inside main
&amp;lt;debug&amp;gt; app: In nrf_bootloader_init
&amp;lt;debug&amp;gt; nrf_dfu_settings: Calling nrf_dfu_settings_init()...
&amp;lt;debug&amp;gt; nrf_dfu_flash: Initializing nrf_fstorage_nvmc backend.
&amp;lt;warning&amp;gt; nrf_dfu_settings: Resetting bootloader settings since neither the settings page nor the backup are valid (CRC error).&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Debug secure bootloader shows invalid app while secure bootloader shows valid app after programming board</title><link>https://devzone.nordicsemi.com/thread/368308?ContentTypeID=1</link><pubDate>Wed, 18 May 2022 11:27:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a949b472-effc-4841-a48e-fcdc49dc5554</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Any chance the image checksum validation may have been disabled in the &amp;quot;release&amp;quot; version? When programming everything through the debug interface you normally have to include the bootloader settings page (&lt;span&gt;&lt;a title="Generating and displaying bootloader settings" href="https://infocenter.nordicsemi.com/topic/ug_nrfutil/UG/nrfutil/nrfutil_settings_generate_display.html?cp=10_7_6"&gt;Generating and displaying bootloader settings&lt;/a&gt;&lt;/span&gt;) to mark the application as valid. The bootloader will always fall back to DFU mode if it is unable to validate the application.&lt;/p&gt;
&lt;div style="background-color:rgba(30, 30, 30, 1);color:rgba(212, 212, 212, 1);font-family:&amp;#39;Droid Sans Mono&amp;#39;, &amp;#39;monospace&amp;#39;, monospace;font-size:14px;font-weight:normal;line-height:19px;white-space:pre;"&gt;
&lt;div&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt;nrfutil settings generate --family NRF52840 \&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt; --application $application_hex \&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt; --application-version-string $version \&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt; --bootloader-version 2 \&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt; --bl-settings-version 2 \&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt; --app-boot-validation VALIDATE_GENERATED_CRC \&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="color:rgba(212, 212, 212, 1);"&gt; v$version/hex/bl_settings.hex&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>