<?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>How to update MCUBOOT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103769/how-to-update-mcuboot</link><description>Hi, 
 My objective is to update application as well as MCUBOOT from binary file stored in Mass storage device. 
 I am able to update the application by the following code: 
 
 But when I am trying to update MCUBOOT by the above same code, MCUBBOT overwrites</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Sep 2023 06:49:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103769/how-to-update-mcuboot" /><item><title>RE: How to update MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/446405?ContentTypeID=1</link><pubDate>Mon, 18 Sep 2023 06:49:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f666b22c-8ebb-4850-89ba-2a5e950ef1c5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Mithi"]If i want to&amp;nbsp;use&amp;nbsp;SMP server in my project then how can i pass the image data to the server? Any function or file name?[/quote]
&lt;p&gt;Try to use our &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/dfu/dfu_target.html#dfu-target"&gt;DFU Target&lt;/a&gt; library&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: How to update MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/446388?ContentTypeID=1</link><pubDate>Sun, 17 Sep 2023 15:21:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3c73da5-5268-494c-a98c-fb58c9d916a1</guid><dc:creator>Mithilesh Yadav </dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;Due to compatibility issue with flash disk api, I am not able to update bootloader.&lt;/p&gt;
&lt;p&gt;I made a separate code without MSD, where I am able to update application and mcuboot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to update MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/446322?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 14:31:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09a59dab-1af3-4d82-81c3-12127f3da752</guid><dc:creator>Mithilesh Yadav </dc:creator><description>&lt;p&gt;    	    	        &lt;div style="padding: 1em; margin: 1em 0; color: #444; background-color: #fff; border: solid 1px #ddd;"&gt;
	    	        If i want to use SMP server in my project then how can i pass the image data to the server? Any function or file name?
	    &lt;/div&gt;
	I am downloading image from FOTA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to update MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/446320?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 14:19:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a8476898-b281-48a8-b476-d10ffa4d9c9a</guid><dc:creator>Mithilesh Yadav </dc:creator><description>&lt;p&gt;I can go for the update one after another, by using above code, i am able to update the application, but when I am trying to update MCUBOOT image, named&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/config_and_build_system.html#mcuboot-output-build-files"&gt;signed_by_mcuboot_and_b0_s1_image_update.bin&lt;/a&gt;, after reset the device, it swap the slot 1 and directly jump to slot1&amp;nbsp;&amp;nbsp;address and then printing&amp;nbsp;&amp;quot;Unable to find bootable image&amp;quot; and device stuck forever.&lt;/p&gt;
&lt;p&gt;I am investigating the cause of this.&lt;/p&gt;
&lt;p&gt;If i want to&amp;nbsp;use&amp;nbsp;SMP server in my project then how can i pass the image data to the server? Any function or file name?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to update MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/446294?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 13:21:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fcd52b7-131e-4234-8c6b-e580b81031f6</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Reading over your question again, you are maybe asking:&lt;/p&gt;
&lt;p&gt;&amp;quot;When writing to the secondary slot, how can I make MCUboot realize that this is a new update for NSIB?&amp;quot;&lt;/p&gt;
&lt;p&gt;In that case, our build system can automatically generate an image for this, named &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/config_and_build_system.html#mcuboot-output-build-files"&gt;signed_by_mcuboot_and_b0_s0_image_update.bin&lt;/a&gt;, which you can see generated if you build my sample with &amp;quot;west -vvv build ...&amp;quot;.&lt;/p&gt;
&lt;p&gt;I think that a magic value will be added to the image trailer. Then MCUboot will check this value before swapping, and swap the secondary slot into s0/s1 if it detects a magic number for mcuboot update instead of application image.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to update MCUBOOT</title><link>https://devzone.nordicsemi.com/thread/446285?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 13:06:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82894067-abd7-4fc8-bba8-7271ea5e98f5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user=""]But when I am trying to update MCUBOOT by the above same code, MCUBBOT overwrites the application. My assumption was all updates (both application and MCUBBOT) first written to the same mcuboot secondary slot(partitioned in external flash) then copy to mcuboot primary slot/ S1.[/quote]
&lt;p&gt;If you do this using the SMP Server that we got, this is how it works yes. I refer to that, as it is the default that we use. &lt;/p&gt;
&lt;p&gt;If you want to write directly to s0 or s1 you can do so, but need to implement this feature yourself.&lt;br /&gt;NSIB does not know how the new MCUboot image got to s0/s1, it just verifies which one is newest and then tries to boot that one.&lt;/p&gt;
&lt;p&gt;You can use &amp;quot;#include pm_config.h&amp;quot; to get addresses for the slots.&lt;/p&gt;
[quote user=""]Please tell me what is the exact process of updating MCUBOOT and application?[/quote]
&lt;p&gt;Generally I just update one after the other.&lt;/p&gt;
&lt;p&gt;Do you want to update both the bootloader and application in one go?&lt;/p&gt;
&lt;p&gt;PS: I have an unofficial sample for upgradable bootloaders &lt;a href="https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/updatable_bootloader"&gt;here&lt;/a&gt;.&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>