<?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>Updating MCUBoot with TFM activated</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115190/updating-mcuboot-with-tfm-activated</link><description>Hi, 
 We have a nRF5340-DK board with the following setup: 
 
 b0 as the first stage immutable bootloader 
 MCUBoot as the second stage upgradable bootloader, which needs to be upgradable 
 A NS application running with TFM activated. 
 If possible only</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 03 Oct 2024 13:57:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115190/updating-mcuboot-with-tfm-activated" /><item><title>RE: Updating MCUBoot with TFM activated</title><link>https://devzone.nordicsemi.com/thread/504856?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2024 13:57:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:71dce12d-b0d9-4f57-9ba8-05bcd48518d3</guid><dc:creator>Dax-id</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for your reply. It was indeed the&amp;nbsp;solution we started investigating just after writing the post. We now have to see if the partitions/flash size are big enough for our needs, which may not be the case, but that is&amp;nbsp;something we&amp;#39;ll look at on our side!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Updating MCUBoot with TFM activated</title><link>https://devzone.nordicsemi.com/thread/504852?ContentTypeID=1</link><pubDate>Thu, 03 Oct 2024 13:50:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1176cde-96df-40f1-bb4f-253e8809f621</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Is it possible to upgrade MCUBoot with our current setup?[/quote]
&lt;p&gt;No. The applicion is not allowed to write to the MCUboot slots.&lt;/p&gt;
[quote user=""]DFUTarget MCUBoot seems to only use the &lt;strong&gt;application&lt;/strong&gt; secondary slot to write to flash, but who is responsible to swap it to S0/S1 after the flash is done?[/quote]
&lt;p&gt;Yes, that is correct. MCUboot check the secondary applicatino slot to see if there are updates that should be handles. If it is an MCUboot update it will copy the update to the other MCUslot (not the one currently cunning), and reset. Then the first stage immutable&amp;nbsp; bootloader (NSIB) will check which MCUboot slot has the highest version (which in this case is the new one). validate and start that.&lt;/p&gt;
[quote user=""]Is there a way to use DFUTarget to update MCUBoot from the app using a NS configuration?[/quote]
&lt;p&gt;You may be able to modify permissions to allow the application to write to the bootlodaer partitions, but that would break the security in the sense that an application could modify itself and also modify the bootloader to start it anyway. If you have a bit space left on your device another approach could be to make a secondary application slot that is not large enough to do applicaiton updates, but is large enough to hold MCUboot, allowing MCUboot updates in the normal way. That is demonstrated by &lt;a href="https://github.com/aHaugl/samples_for_NCS/tree/main/bootloader/serial_recover_nsib/serial_recovery_nsib_52832"&gt;this unofficial sample&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>