<?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>MCUboot won&amp;#39;t boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113138/mcuboot-won-t-boot-into-serial-recovery-mode-by-using-retained-memory</link><description>Hello! 
 I have an application using MCUboot and a single application slot. I want to use the Retention System to signal to MCUboot wether to boot normally or into serial recovery mode. I can write into the retained memory portion by using bootmode_set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Jul 2024 06:31:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113138/mcuboot-won-t-boot-into-serial-recovery-mode-by-using-retained-memory" /><item><title>RE: MCUboot won't boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/thread/494473?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2024 06:31:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5f184f7-6ab6-4658-bb8a-a89155d0760f</guid><dc:creator>DB_ECD</dc:creator><description>[quote userid="106736" url="~/f/nordic-q-a/113138/mcuboot-won-t-boot-into-serial-recovery-mode-by-using-retained-memory/494391"]MCUboot also needs DTS overlays.[/quote]
&lt;p&gt;Ohh, I didn&amp;#39;t know that!&lt;/p&gt;
&lt;p&gt;I added the same overlay that I posted originally (where the retention is enabled) and added this to child_image/mcuboot/mcuboot.overlay&lt;/p&gt;
&lt;p&gt;But then I could &lt;span style="text-decoration:underline;"&gt;not&lt;/span&gt; add it in the mcuboot build configuration as an overlay file, this produces a build error. Instead, I had to include it to the project configuration by using the extra Cmake argument -Dmcuboot_DTC_OVERLAY_FILE=&amp;quot;child_image/mcuboot/mcuboot.overlay&amp;quot;&lt;/p&gt;
&lt;p&gt;With this, resetting into the bootloader works as expected.&lt;/p&gt;
&lt;p&gt;Thank you very much for your help!&lt;/p&gt;
&lt;p&gt;As a last general question: is there a way to know when to add what configuration, overlay etc. to the project or to the child image(s)? For me, this is always a (rather frustrating) trial and error procedure.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot won't boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/thread/494391?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 13:25:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de38fc1c-13a6-4231-a916-95961d25c743</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I probably should have said before, but did you choose MCUboot before using the GUI?&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1721222672681v1.png" alt=" " /&gt;&lt;/p&gt;
[quote user="DB_ECD"]In my DeviceTree I have the retention system enabled. The application seems to find that. But MCUboot does not..[/quote]
&lt;p&gt;MCUboot also needs DTS overlays.&lt;/p&gt;
&lt;p&gt;See for example here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/blob/main/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash/child_image/mcuboot.overlay"&gt;https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/blob/main/bootloader_samples/smp/mcuboot_smp_uart_feat_external_flash/child_image/mcuboot.overlay&lt;/a&gt; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot won't boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/thread/494367?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 12:54:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b289b14-a4b5-4484-b70e-d9eac84eceb6</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Okay, I did not see that you could check the info for mcuboot directly by choosing it under the build folder in the VS Code extension. I just did that and the KConfig GUI shows the configuration parameters as enabled, which are produced as a warning in the compilation later on.&lt;/p&gt;
&lt;p&gt;For example:&lt;/p&gt;
&lt;p&gt;The error during compiling says:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;warning: BOOT_SERIAL_BOOT_MODE (defined at
C:/ncs/v2.6.1/bootloader/mcuboot/boot/zephyr\Kconfig.serial_recovery:166) was assigned the value &amp;#39;y&amp;#39;
but got the value &amp;#39;n&amp;#39;. Check these unsatisfied dependencies: RETENTION_BOOT_MODE (=n). See
http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_BOOT_SERIAL_BOOT_MODE and/or look up
BOOT_SERIAL_BOOT_MODE in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But the BOOT_SERIAL_BOOT_MODE as well as the RETENTION_BOOT_MODE are both set if i look into the Kconfig GUI:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/img_5F00_mcuboot.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/img_5F00_mcuboot2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot won't boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/thread/494362?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 12:43:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59f8642e-2511-492b-8b09-f28e1017f7f4</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/6433.img.png" /&gt;&lt;/p&gt;
&lt;p&gt;I can only find the parameters that I set in the applications prj.conf file, where everything seems to be ok. How would I check the data for the mcuboot? Sorry if these are basic questions, but I&amp;#39;m kind of lost here..?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To add a question here:&lt;/p&gt;
&lt;p&gt;in the warning output of the compile, I can see that&lt;/p&gt;
&lt;p&gt;&amp;quot;Check these unsatisfied dependencies: DT_HAS_ZEPHYR_RETENTION_ENABLED (=n)&amp;quot;&lt;/p&gt;
&lt;p&gt;In my DeviceTree I have the retention system enabled. The application seems to find that. But MCUboot does not..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot won't boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/thread/494351?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 12:15:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fde08cc8-4afd-4069-bbda-4f569a6c78e1</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Yes, from here:&lt;br /&gt;&lt;a href="https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/reference/ui_kconfig.html"&gt;https://docs.nordicsemi.com/bundle/nrf-connect-vscode/page/reference/ui_kconfig.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1721218504420v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot won't boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/thread/494344?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 11:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a3a360f-ce80-4101-bfe2-fa2b496fd3fa</guid><dc:creator>DB_ECD</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;can you elaborate on that?&lt;/p&gt;
&lt;p&gt;Somehow I can&amp;#39;t get menuconfig started in the VS Code Extension. There is some kind of python error which i have to look into.&lt;/p&gt;
&lt;p&gt;Can I use the GUI Config as well? What should I look for here?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUboot won't boot into serial recovery mode by using retained memory</title><link>https://devzone.nordicsemi.com/thread/494325?ContentTypeID=1</link><pubDate>Wed, 17 Jul 2024 11:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27f201ea-ed76-4fbd-b6b8-72fa08dd7e2f</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Now I found out, that while compiling, I get warnings in the MCUboot portion of the compile:[/quote]
&lt;p&gt;For these Kconfig override warnings, can you use menuconfig to check which dependency is not set? For each option.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>