<?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>Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/85539/update-mcuboot-with-smp</link><description>I cannot find any information on how to update mcuboot over SMP when using the immutable bootloader. 
 I have my NRF52840 setup with the chained bootloader: b0 -&amp;gt; mcuboot -&amp;gt; app. 
 Is there a way to update mcuboot via SMP (UART or BLE)? 
 I saw this post</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Mar 2022 15:16:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/85539/update-mcuboot-with-smp" /><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/360067?ContentTypeID=1</link><pubDate>Fri, 25 Mar 2022 15:16:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab698e18-2452-40ae-9ea0-8ae541d339ff</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/applications/machine_learning/README.html"&gt;nRF Machine Learning Application&lt;/a&gt; and the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/samples/matter/lock/README.html"&gt;Matter: Door lock Sample&lt;/a&gt; seems to use External Flash using QSPI with the bootloader.&lt;br /&gt;I have not been able to make a simple sample from these, but you might be able to learn what you need from the.&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><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/359653?ContentTypeID=1</link><pubDate>Wed, 23 Mar 2022 15:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:635e9623-79d1-4d98-bf8a-5dfd2196c53a</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Just checking in to say that I am still trying to make QSPI work with up-gradable MCUBoot, but no luck so far.&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><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/358915?ContentTypeID=1</link><pubDate>Fri, 18 Mar 2022 15:14:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e0e2551-f217-4f7b-a0ca-c6f13351f64f</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I think I managed to update multiple times in a row by decreasing the &amp;quot;CONFIG_SB_NUM_VER_COUNTER_SLOTS&amp;quot; to 120. It was 240 by default.&lt;br /&gt;This change was pushed to the git repository.&lt;/p&gt;
&lt;p&gt;I will look at the QSPI issue next week.&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><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/358748?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 22:21:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f34e32b-8844-4167-b25b-a1f40f1e05bc</guid><dc:creator>rerickson</dc:creator><description>&lt;p&gt;I tested with your example and it works for updating mcuboot once like you describe.&lt;/p&gt;
&lt;p&gt;I suspect to update mcuboot a second time, you need to use&amp;nbsp;signed_by_mcuboot_and_b0_s0_image_update.bin but I havent tried this yet.&lt;/p&gt;
&lt;p&gt;I tried this with my code and its not working correctly. I suspect it is because I have slot1 configured to be in external QSPI.&lt;/p&gt;
&lt;p&gt;So I tried your example with external QSPI for slot1 and it breaks. Seems there is an issue if you want to put slot1 in QSPI. I would like to see if we can get this resolved because I need to have slot1 in QSPI.&lt;/p&gt;
&lt;p&gt;Heres the code diff I tested with against your sample:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/bootloader_samples/nsib_mcuboot_smp/boards/nrf52840dk_nrf52840.overlay b/bootloader_samples/nsib_mcuboot_smp/boards/nrf52840dk_nrf52840.overlay
new file mode 100644
index 0000000..b58f8c7
--- /dev/null
+++ b/bootloader_samples/nsib_mcuboot_smp/boards/nrf52840dk_nrf52840.overlay
@@ -0,0 +1,29 @@
+
+/ {
+	chosen {
+		/* required for partition manager to use external flash */
+		nordic,pm-ext-flash = &amp;amp;mx25r64;
+	};
+};
+
+/delete-node/ &amp;amp;slot1_partition;
+/delete-node/ &amp;amp;scratch_partition;
+
+
+&amp;amp;mx25r64 {
+
+        partitions {
+                compatible = &amp;quot;fixed-partitions&amp;quot;;
+                #address-cells = &amp;lt;1&amp;gt;;
+                #size-cells = &amp;lt;1&amp;gt;;
+
+                slot1_partition: partition@0 {
+                        label = &amp;quot;image-1&amp;quot;;
+                        reg = &amp;lt;0x00000000 0x00067000&amp;gt;;
+                };
+                scratch_partition: partition@da000 {
+                        label = &amp;quot;image-scratch&amp;quot;;
+                        reg = &amp;lt;0x00070000 0x00001000&amp;gt;;
+                };
+        };
+};
diff --git a/bootloader_samples/nsib_mcuboot_smp/child_image/mcuboot/prj.conf b/bootloader_samples/nsib_mcuboot_smp/child_image/mcuboot/prj.conf
index 5fda561..12bc10e 100644
--- a/bootloader_samples/nsib_mcuboot_smp/child_image/mcuboot/prj.conf
+++ b/bootloader_samples/nsib_mcuboot_smp/child_image/mcuboot/prj.conf
@@ -7,4 +7,10 @@ CONFIG_MAIN_STACK_SIZE=10240
 CONFIG_LOG=y
 CONFIG_LOG_MODE_MINIMAL=y
 
-CONFIG_FW_INFO_FIRMWARE_VERSION=5
+CONFIG_FW_INFO_FIRMWARE_VERSION=2
+
+CONFIG_MULTITHREADING=y
+CONFIG_NORDIC_QSPI_NOR=y
+CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
+CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=4
+CONFIG_BOOT_MAX_IMG_SECTORS=256
diff --git a/bootloader_samples/nsib_mcuboot_smp/prj.conf b/bootloader_samples/nsib_mcuboot_smp/prj.conf
index f497585..672a8da 100644
--- a/bootloader_samples/nsib_mcuboot_smp/prj.conf
+++ b/bootloader_samples/nsib_mcuboot_smp/prj.conf
@@ -10,5 +10,9 @@ CONFIG_SECURE_BOOT=y
 CONFIG_SB_SIGNING_KEY_FILE=&amp;quot;nsib_priv.pem&amp;quot;
 CONFIG_BUILD_S1_VARIANT=y
 
-CONFIG_FW_INFO_FIRMWARE_VERSION=1
-CONFIG_MCUBOOT_IMAGE_VERSION=&amp;quot;1.1.1&amp;quot;
+CONFIG_MCUBOOT_IMAGE_VERSION=&amp;quot;1.0.0&amp;quot;
+
+CONFIG_MULTITHREADING=y
+CONFIG_NORDIC_QSPI_NOR=y
+CONFIG_NORDIC_QSPI_NOR_FLASH_LAYOUT_PAGE_SIZE=4096
+CONFIG_NORDIC_QSPI_NOR_STACK_WRITE_BUFFER_SIZE=4
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/358674?ContentTypeID=1</link><pubDate>Thu, 17 Mar 2022 13:34:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1ac230a-1176-4379-80c0-60c5d3500b55</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Sorry for the delay.&lt;/p&gt;
&lt;p&gt;I am not done yet, but I have a sample which almost works. See my &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/nsib_mcuboot_smp"&gt;nsib_mcuboot_smp&lt;/a&gt; sample.&lt;br /&gt;This sample is able to use SMP Server to upload MCUBoot once, but I am not able to do it again with the new version of MCUBoot.&lt;/p&gt;
&lt;p&gt;You can test the sample and see if it is able to help you with your issue.&lt;/p&gt;
&lt;p&gt;I will continue debugging my sample, but can not promise anything on how long time this will take.&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><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/357737?ContentTypeID=1</link><pubDate>Fri, 11 Mar 2022 16:03:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1e8ad09-b2f5-4530-84a7-c84dda83d4a9</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;I think it should be to use the SMP server to upload an image of MCUBoot to the space where the old MCUBoot were.&lt;/p&gt;
&lt;p&gt;I am trying to make a sample showcasing this, but I were not able to make it work today. I will continue on the sample on Monday.&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><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/357494?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 16:18:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bc27067-3a93-41e7-aec2-e1a5104e8710</guid><dc:creator>rerickson</dc:creator><description>&lt;p&gt;I have read through all of that documentation many many times. I am looking for detailed steps of how to update the MCUboot S0/S1 images with mcumgr via UART/BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/357480?ContentTypeID=1</link><pubDate>Thu, 10 Mar 2022 15:27:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:298c90b9-3086-47a1-9834-fb613a361b67</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I have not been able to find any example showcasing this.&lt;/p&gt;
&lt;p&gt;But from our &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_bootloader_adding.html#adding-an-upgradable-bootloader"&gt;Adding an upgradable bootloader&lt;/a&gt; and &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/samples/bootloader/README.html"&gt;nRF Secure Immutable Bootloader&lt;/a&gt;, it should be possible to do.&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><item><title>RE: Update mcuboot with SMP</title><link>https://devzone.nordicsemi.com/thread/356938?ContentTypeID=1</link><pubDate>Tue, 08 Mar 2022 14:41:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7654db02-e377-45a1-b5ce-864c838dfbaa</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;To find out if this is supported now or not, I will have to talk to our developers and do some testing.&lt;/p&gt;
&lt;p&gt;I will return with more information on this on Thursday&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>