<?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>nrf54 with mcuboot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/120819/nrf54-with-mcuboot</link><description>I am adding OTA support using mcuboot with mcumgr on a custom nrf54l15 board with the upgrade (mcuboot_secondary) partition on an external SPI nor flash (not QSPI). I am using the nrfConnect App to perform the DFU. 
 1. With the 2.9.1 SDK, I consistently</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 24 Apr 2025 11:41:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/120819/nrf54-with-mcuboot" /><item><title>RE: nrf54 with mcuboot</title><link>https://devzone.nordicsemi.com/thread/532805?ContentTypeID=1</link><pubDate>Thu, 24 Apr 2025 11:41:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1fbb425a-c914-4554-98b9-91a66e87d1b8</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi Chris,&lt;/p&gt;
&lt;p&gt;My apology for the misinformation about FProtect.&amp;nbsp;It turns out that all my knowledge about how it works with the nRF52 and 53 are entirely not applicable for the nRF54L15 anymore.&amp;nbsp;I made a bad assumption. Thank you for pointing out clearly what I was mistaken on.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf54 with mcuboot</title><link>https://devzone.nordicsemi.com/thread/532472?ContentTypeID=1</link><pubDate>Wed, 23 Apr 2025 04:11:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9a084c8-3650-4bba-8c2d-2a84791eb17e</guid><dc:creator>Chris G</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;Hieu,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Yes I was able to significantly reduce the MCUBoot size with the&amp;nbsp;SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 which prevents the conditions I mentioned. So currently with 3.0.0-rc2, I don&amp;#39;t have any outstanding issues with DFU. &amp;nbsp;&lt;/span&gt;&lt;/p&gt;
[quote userid="9456" url="~/f/nordic-q-a/120819/nrf54-with-mcuboot/532428"]On the nRF54L15, FProtect&amp;nbsp;has a default block size of 0x1000. I am not fully sure if this is something at the hardware level, but as it is, changing MCUboot&amp;#39;s main.c like that doesn&amp;#39;t give you the desired effect.[/quote]
&lt;p&gt;&lt;span&gt;On the nrf54l15 FProtect only goes to up to a size of 0xF800 (63488B), so if you your application is placed anywhere at or above 0x10000 the FProtect will fail. I was just pointing out that FProtect seems like it only&amp;nbsp;needs to go to the end of the boot partition (aligned to 1k) and&amp;nbsp;not the start of the app partition. For example, if my boot partition was 0-48kB but I set my mcuboot_primary partition starting at 96kB, mcuboot fails due to this FProtect incorrectly setting the &amp;quot;PROTECT_SIZE&amp;quot;. It should still work and protect 0-48kB, but it fails because it tries to protect&amp;nbsp;0-96kB which is outside range.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For the swap time, I had to set `&lt;/span&gt;CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE=y` in the mcuboot.conf to speed the swap time and it seems on par with previous devices.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Chris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf54 with mcuboot</title><link>https://devzone.nordicsemi.com/thread/532428?ContentTypeID=1</link><pubDate>Tue, 22 Apr 2025 18:18:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7cca2e2-dc5b-4f35-9216-28363ddfd2b0</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hello Chris G,&lt;/p&gt;
[quote user=""]1.&lt;span&gt;With the 2.9.1 SDK, I consistently see the image revert if I download it using &lt;/span&gt;&lt;strong&gt;&amp;quot;Test and Confirm.&amp;quot;&lt;/strong&gt;&lt;span&gt; If I use &lt;/span&gt;&lt;strong&gt;&amp;quot;Confirm only,&amp;quot;&lt;/strong&gt;&lt;span&gt; the upgrade works correctly and boots my image after the swap.&amp;nbsp;&lt;/span&gt;&lt;span&gt;Below are the logs showing the image revert, which occurs without ever launching my application.&amp;nbsp;&lt;/span&gt;&lt;span&gt;Note that I don’t see this behavior on a similar application running on the &lt;/span&gt;&lt;strong&gt;nRF5340&lt;/strong&gt;&lt;span&gt;.&amp;nbsp;&lt;/span&gt;&lt;span&gt;Is this a known issue with the 2.9.x SDK?&lt;/span&gt;&amp;nbsp;[/quote]
&lt;p&gt;Not sure if I reproduced your exact observation here, but I&amp;nbsp;tried with &amp;quot;Test and Confirm&amp;quot; and found that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Swaps take a lot of time. This is recorded in&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/releases_and_maturity/known_issues.html"&gt;the Known Issue list&lt;/a&gt;, see NCSDK-28567.&lt;/li&gt;
&lt;li&gt;After the new application was successfully booted once, a reset starts Revert swap, but the expected result would be that the image is already confirmed.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Please let me know if you see anything different.&lt;/p&gt;
&lt;p&gt;Looking at the nRF Connect Mobile app, my guess is that the app tried to wait for the new application boot to write confirm, but because of the swap time issue, the wait failed and Confirm is never written.&lt;/p&gt;
&lt;p&gt;I further tested by connecting to the new application with the Device Manager app, write Confirm, and manually reset the device. The new application&amp;nbsp;is not swapped anymore. This is as expected.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;am having some technical issue with my setup&amp;nbsp;and can&amp;#39;t install v3.0.0-rc2. Could you give both version a few tests to see if I was on to something?&lt;/p&gt;
[quote user=""]&lt;span&gt;Do you have any suggestions for reducing the size of MCUboot &lt;/span&gt;&lt;strong&gt;while keeping logs enabled&lt;/strong&gt;&lt;span&gt;?&lt;/span&gt;[/quote][quote user="Chris G"]Using the v3.0.0-rc2 SDK, I&amp;#39;ve found that if I don&amp;#39;t use the KMU for key storage by setting SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y , the mcuboot image size is &lt;strong&gt;reduced&lt;/strong&gt; by ~20kB which allows me to re-enable FPROTECT and logs in mcuboot.[/quote]
&lt;p&gt;Can I take it that this works for you now?&lt;/p&gt;
[quote user=""]&lt;p&gt;3.&amp;nbsp;&lt;span&gt;In the &lt;/span&gt;&lt;strong&gt;MCUboot &lt;code&gt;main.c&lt;/code&gt;&lt;/strong&gt;&lt;span&gt;, with &lt;/span&gt;&lt;code&gt;CONFIG_FPROTECT&lt;/code&gt;&lt;span&gt; enabled, this check tries to protect flash up to the &lt;/span&gt;&lt;strong&gt;start of the app partition&lt;/strong&gt;&lt;span&gt;, instead of just the &lt;/span&gt;&lt;strong&gt;end of the bootloader&lt;/strong&gt;&lt;span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Is that intentional?&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;#define PROTECT_SIZE (PM_MCUBOOT_PRIMARY_ADDRESS - PM_MCUBOOT_ADDRESS) &amp;nbsp;//&amp;nbsp;PM_MCUBOOT_PRIMARY_ADDRESS becomes&amp;nbsp;PM_MCUBOOT_END_ADDRESS.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;If I make that change in &lt;/span&gt;&lt;code&gt;main.c&lt;/code&gt;&lt;span&gt; to align the protect size to the MCUboot partition size, I’m able to increase the partition size to 0xF800, enable logs, and use &lt;/span&gt;&lt;code&gt;FPROTECT&lt;/code&gt;&lt;span&gt; in the bootloader.&amp;nbsp;&lt;/span&gt;&lt;span&gt;This also removes the need for the &lt;/span&gt;&lt;code&gt;mcuboot_primary&lt;/code&gt;&lt;span&gt; partition to start at or below 0xF000 when &lt;/span&gt;&lt;code&gt;FPROTECT&lt;/code&gt;&lt;span&gt; is enabled in the bootloader.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style="padding-left:30px;"&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;PROTECT_SIZE&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;PM_MCUBOOT_END_ADDRESS&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;-&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;PM_MCUBOOT_ADDRESS&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;[/quote]
&lt;p&gt;On the nRF54L15, FProtect&amp;nbsp;has a default block size of 0x1000. I am not fully sure if this is something at the hardware level, but as it is, changing MCUboot&amp;#39;s main.c like that doesn&amp;#39;t give you the desired effect.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf54 with mcuboot</title><link>https://devzone.nordicsemi.com/thread/532175?ContentTypeID=1</link><pubDate>Fri, 18 Apr 2025 21:51:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f519c5e-bf6b-432c-884c-1a08b4214eb4</guid><dc:creator>Chris G</dc:creator><description>&lt;p&gt;Using the v3.0.0-rc2 SDK, I&amp;#39;ve found that if I don&amp;#39;t use the KMU for key storage by setting SB_CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256=y , the mcuboot image size is &lt;strong&gt;reduced&lt;/strong&gt; by ~20kB which allows me to re-enable FPROTECT and logs in mcuboot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>