<?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>DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1</link><description>Dear Nordic team, 
 I am trying to set up OTA updates by using the DFU target API on an nRF9151 DK with MCUboot and TF-M partitions. (NCS v3.4.1) My goal is to use the immutable MCUboot bootloader and update both the application and the TF-M partition</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Oct 2026 11:51:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1" /><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572461?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2026 11:51:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29f18375-185c-44dc-93af-64c761367b02</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;Ok, great. Thanks for the confirmation!&lt;/p&gt;
&lt;p&gt;Glad to hear that the pm-ext-flash fix made it to main already!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572460?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2026 11:49:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae9e68ec-fb9e-4015-ac1e-01778254febd</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;It makes sense to me now, thanks for elaborating.&lt;/p&gt;
[quote user="Tom01"]the DFU target API methods of the conceptual code are to be used for modem delta updates as well and - more specifically - that &amp;quot;dfu_target_init(img_type, IMAGE_NUMBER, file_size, NULL)&amp;quot; also needs to be called with IMAGE_NUMBER=0[/quote]
&lt;p&gt;Yes, 0 should be correct for image number.&lt;/p&gt;
[quote user="Tom01"]and that a cold reboot will trigger the modem update after calling &amp;quot;dfu_target_schedule_update(IMAGE_NUMBER)&amp;quot;.[/quote]
&lt;p&gt;Yes. From DFU Target-&amp;gt;&lt;a href="https://nrfconnectdocs.nordicsemi.com/ncs/latest/nrf/libraries/dfu/dfu_target.html#modem-delta-upgrades"&gt;Modem delta upgrades&lt;/a&gt;:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;When the transfer has completed, the application must call the dfu_target_done() function to release modem resources and then call dfu_target_schedule_update() to request the modem to apply the patch. On the next reboot, the modem tries to apply the patch.&amp;quot;&lt;/p&gt;
&lt;p&gt;In other news, the pm-ext-flash issue is fixed in main, where the partition manager is removed. So for upcoming nRF Connect SDK versions, it will not happen anymore.&lt;/p&gt;
&lt;p&gt;Ref&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/commit/869818149c"&gt;tree: Remove partition manager support · nrfconnect/sdk-nrf@8698181&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/commit/2f51288dca"&gt;tfm: cleanup leftovers after pm migration · nrfconnect/sdk-nrf@2f51288&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572457?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2026 11:31:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bbd8ae6-7ad4-4892-9b1f-570e65200501</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;No worries, English isn&amp;#39;t my mother tongue, so I am probably not expressing myself clearly enough.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My main point of uncertainty is how to define the image number argument of &amp;quot;dfu_target_init()&amp;quot; and &amp;quot;dfu_target_schedule_update()&amp;quot;. For the application update, I was looking at this documentation:&amp;nbsp;&lt;a href="https://nrfconnectdocs.nordicsemi.com/ncs/latest/nrf/app_dev/bootloaders_dfu/sysbuild_image_ids.html#image-numbers"&gt;https://nrfconnectdocs.nordicsemi.com/ncs/latest/nrf/app_dev/bootloaders_dfu/sysbuild_image_ids.html#image-numbers&lt;/a&gt;. But I am not certain if this also applies to modem delta updates or if modem updates at all care about the provided image number.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;-&amp;gt;&lt;/p&gt;
&lt;p&gt;In my previous reply I posted a piece of conceptual code, going through the DFU target API methods that I use to prepare and schedule application firmware updates. (NCS v3.4.1 only, no comparison between SDKs)&lt;/p&gt;
&lt;p&gt;I was asking for confirmation that&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;the DFU target API methods of the conceptual code are to be used for modem delta updates as well and - more specifically - that &amp;quot;dfu_target_init(img_type, IMAGE_NUMBER, file_size, NULL)&amp;quot; also needs to be called with IMAGE_NUMBER=0&lt;/li&gt;
&lt;li&gt;and that a cold reboot will trigger the modem update after calling &amp;quot;dfu_target_schedule_update(IMAGE_NUMBER)&amp;quot;.&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572453?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2026 09:51:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5d73202-7c9f-4f89-b2f9-d920048ebaf8</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Tom01"] the same procedure using the DFU target API[/quote]
&lt;p&gt;Sorry if Im a bit difficult here, but Im still not fully sure what you mean.&lt;/p&gt;
&lt;p&gt;When you say &amp;quot;is still the same&amp;quot;, I expect a &amp;quot;before&amp;quot; and &amp;quot;after&amp;quot; state.&lt;br /&gt;You latest message mention the DFU Target API. Is it before and after the DFU Target API?&lt;br /&gt;If so, what did you use before?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572444?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2026 06:59:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b4df25-f514-4140-a093-5b7551957977</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;Sorry, I meant using the same procedure using the DFU target API: What I can&amp;#39;t really make out from the documentation is whether IMAGE_NUMBER = 0 is to be used and if a cold reboot suffices to apply the update to the modem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572426?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2026 13:55:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46bf3f9a-661b-4b2e-9cfb-21226f503592</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Tom01"]if you could confirm that the general procedure for modem delta updates remains the same.[/quote]
&lt;p&gt;Remains the same between v3.3.0 and v3.4.1 or between partition manager and no parititon manager?&lt;/p&gt;
&lt;p&gt;(or both?)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572414?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2026 12:56:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79d9a269-ff3e-4052-a7ad-a134bde18288</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;Hey Sigurd, thanks for following up on this thread.&lt;/p&gt;
&lt;p&gt;It&amp;#39;d be helpful if you could confirm that the general procedure for modem delta updates remains the same. For the application update we are conceptually doing this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define IMAGE_NUMBER 0

...

// skip if modem delta upate:
const size_t dfu_buf_len = 512;
uint8_t dfu_buf[dfu_buf_len];
err = dfu_target_mcuboot_set_buf(dfu_buf, dfu_buf_len);

...

bool first_chunk = true;
const size_t chunk_buf_len = 512;
uint8_t chunk_buf[chunk_buf_len];
size_t read_bytes_total = 0;

// stream update to target from file on LittleFS filesystem
for (;;) {
	...

	if (first_chunk) {
		int32_t img_type = dfu_target_img_type(chunk_buf, read_bytes);
		
		err = dfu_target_init(img_type, IMAGE_NUMBER, file_size, NULL);
		
		...
		
		first_chunk = false;
	}

	err = dfu_target_write(chunk_buf, read_bytes);
	
	...
}

...

err = dfu_target_done(true);

...

err = dfu_target_schedule_update(IMAGE_NUMBER);

...&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In particular, I&amp;#39;d appreciate confirmation that:&lt;/p&gt;
&lt;p&gt;1. IMAGE_NUMBER = 0 is also correct for modem delta updates&lt;/p&gt;
&lt;p&gt;2. the modem requires a SYS_REBOOT_COLD after&amp;nbsp;dfu_target_schedule_update() to apply the update&lt;/p&gt;
&lt;p&gt;Thanks for your support!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572407?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2026 11:48:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15c4efd5-baa5-4da8-ac38-6b8d5ee91915</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Welcome back Tom, and congratulations!&lt;/p&gt;
&lt;p&gt;I&amp;#39;m able to reproduce the &amp;quot;nordic,pm-ext-flash&amp;quot; issue and will report this internally. Then we should have it fixed in some future version of the SDK.&lt;/p&gt;
&lt;p&gt;Is there anything else you need in this ticket?&lt;br /&gt;&lt;span style="font-size:75%;"&gt; (Im asking to make sure I did not miss anything from the conversation)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572394?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2026 07:10:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:519d93f5-897a-4ce9-8001-48be604567a5</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;Yes, MCUboot swaps the images and the update can be confirmed with the &amp;quot;#include &amp;lt;zephyr/dfu/mcuboot.h&amp;gt;&amp;quot; API using:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;int32_t err = 0;
if (!boot_is_img_confirmed()) {
	LOG_DBG(&amp;quot;Confirming new application image&amp;quot;);
	err = boot_write_img_confirmed();
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;After that, MCUboot always loads the &amp;quot;new&amp;quot; image on reboot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572372?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2026 15:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8278406-c971-4435-81f2-421e921016c9</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;quot;sticks&amp;quot; means &amp;quot;sticks to the new version&amp;quot; =&amp;gt; the update runs and reports the new version?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/572366?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2026 14:06:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70bf1489-06a8-462b-8b6b-845ac35dc82e</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;I was able to test this today: The update can be confirmed correctly and sticks after a reboot. :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571853?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 21:22:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16f6ac3a-8663-43cf-bf4f-bfb626a58e3b</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;I&amp;#39;m testing this next, but I&amp;#39;ll probably be on a paternity leave within the next 24-48 hours. So, there&amp;#39;ll be a bit of silence from my side for the next 2-3 weeks. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571844?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 15:04:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39f009c6-b2b7-4be3-aa8d-b8335c17820c</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Did you also try to activate the update? Crossing the finger, it works ;-).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571843?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 15:03:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a6c9676-0e89-4a48-aed3-669825d94e52</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;gt;&amp;nbsp;&lt;span&gt;&amp;quot;Dual-slot direct-xip&amp;quot; mode&lt;/span&gt;&lt;/p&gt;
[quote userid="106736" url="~/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1/571833"]Yes.&amp;nbsp;&lt;br /&gt;Pro: Faster boot time.&lt;br /&gt;Con: You need to track which slot is running, cause you will have different DFU images.[/quote]
&lt;p&gt;That would make the use of an external flash for upload with&amp;nbsp;SB_CONFIG_SECURE_BOOT_APPCORE pretty difficult. But, maybe, in the end, that&amp;#39;s the reason for a couple of tickets around DFU.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571837?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 14:33:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1fd7cd9-a5cb-44f1-901c-38fac861cf51</guid><dc:creator>Achim Kraus</dc:creator><description>[quote userid="152454" url="~/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1/571799"]Do you use the PSA secure storage by any chance? This should persist if swap mode is used, but I&amp;#39;m not sure if there is a mechanism to persist it when&amp;nbsp;Dual-slot direct-xip is being used.[/quote]
&lt;p&gt;The secure storage is separated from the running/upload partitions. I don&amp;#39;t see any dependency.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571836?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 14:32:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bafc499-88be-46c8-87e2-8f28bcf3701a</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;gt; My impression from reading the docs is that in&amp;nbsp;&amp;quot;Dual-slot direct-xip&amp;quot; mode, bootloader may start the application from both partitions depending on where the newer version is placed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That would require to generate &amp;quot;relocatable code&amp;quot;, but I don&amp;#39;t think so.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Also the &amp;quot;flash_img.c&amp;quot; must then write the updates to different slots depending on which the app is currently running. I don&amp;#39;t see that.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edited: I found the reference to &amp;quot;SB_CONFIG_SECURE_BOOT_BUILD_S1_VARIANT_IMAGE&amp;quot; ...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;That will make things not that easy. And when the upload-code is on the external flash it must be copied.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Therefore I guess, that&amp;#39;s a misunderstanding.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571833?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 13:50:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fc0b895-9a80-4b34-a738-d35470348e5d</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="Tom01"] I tried your suggestion of removing the sub-partitions from slot1_partition, but that causes a build error.[/quote]
&lt;p&gt;Yeh, I see that they are also separated in the DK parititoning. I will look ionto this.&lt;/p&gt;
[quote user="Tom01"]from the DTSI file, the secure fault did not trigger anymore on dfu_target_write(). The update now completes with this setup:[/quote]
&lt;p&gt;Good to see that you found the fix! Thanks a lot for the help on this Achim!&lt;/p&gt;
&lt;p&gt;I will test if this &amp;quot;nordic,pm-ext-flash&amp;quot; is handled by the SDK with the Partition Manager disabled. And if it still is, I will report this as a bug internally so we can get it fixed.&lt;/p&gt;
[quote user="Tom01"]My impression from reading the docs is that in&amp;nbsp;&amp;quot;Dual-slot direct-xip&amp;quot; mode, bootloader may start the application from both partitions depending on where the newer version is placed[/quote]
&lt;p&gt;Yes.&amp;nbsp;&lt;br /&gt;Pro: Faster boot time.&lt;br /&gt;Con: You need to track which slot is running, cause you will have different DFU images.&lt;/p&gt;
&lt;p&gt;In general, i find that its better to stick with the swap functionality unless you have very hard requirements for boot time.&lt;/p&gt;
[quote user="Tom01"]Do you use the PSA secure storage by any chance? This should persist if swap mode is used, but I&amp;#39;m not sure if there is a mechanism to persist it when&amp;nbsp;Dual-slot direct-xip is being used.[/quote]
&lt;p&gt;DFU strategy (swap vs direct-xip) should not impact storage. DFU only updates application slots, and not storage.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571811?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 09:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bcbc7e2-3df5-4a65-9896-a0ce14bb96d0</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;After I removed this&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
    chosen {
        nordic,pm-ext-flash = &amp;amp;gd25wb256;
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;from the DTSI file, the secure fault did not trigger anymore on dfu_target_write(). The update now completes with this setup:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/delete-node/ &amp;amp;boot_partition;
/delete-node/ &amp;amp;slot0_partition;
/delete-node/ &amp;amp;slot1_partition;
/delete-node/ &amp;amp;tfm_ps_partition;
/delete-node/ &amp;amp;tfm_its_partition;
/delete-node/ &amp;amp;tfm_otp_partition;
/delete-node/ &amp;amp;storage_partition;

&amp;amp;flash0 {
    /*
     * Flash partition layout for non-minimal TF-M in combination with MCUboot
     *
     * 0x0000_0000 BL2 - MCUBoot (64 KB)
     * 0x0001_0000 Primary image area (448 KB):
     *    0x0001_0000 Secure     image primary (192 KB)
     *    0x0004_0000 Non-secure image primary (256 KB)
     * 0x0008_0000 Secondary image area (448 KB):
     *    0x0008_0000 Secure     image secondary (192 KB)
     *    0x000b_0000 Non-secure image secondary (256 KB)
     * 0x000f_0000 Protected Storage Area (16 KB)
     * 0x000f_4000 Internal Trusted Storage Area (8 KB)
     * 0x000f_6000 OTP / NV counters area (8 KB)
     * 0x000f_8000 Non-secure storage, used when built with NRF_NS_STORAGE=ON,
     *             otherwise unused (32 KB)
     */
    partitions {
        ranges;
        #address-cells = &amp;lt;1&amp;gt;;
        #size-cells = &amp;lt;1&amp;gt;;

        boot_partition: partition@0 {
            compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
            label = &amp;quot;mcuboot&amp;quot;;
            reg = &amp;lt;0x00000000 0x10000&amp;gt;;
        };

        slot0_partition: partition@10000 {
            compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
            label = &amp;quot;image-0&amp;quot;;
            reg = &amp;lt;0x00010000 0x70000&amp;gt;;
            ranges = &amp;lt;0x0 0x10000 0x70000&amp;gt;;
            #address-cells = &amp;lt;1&amp;gt;;
            #size-cells = &amp;lt;1&amp;gt;;

            slot0_s_partition: partition@0 {
                compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
                label = &amp;quot;image-0-secure&amp;quot;;
                reg = &amp;lt;0x00000000 0x30000&amp;gt;;
            };

            slot0_ns_partition: partition@30000 {
                compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
                label = &amp;quot;image-0-nonsecure&amp;quot;;
                reg = &amp;lt;0x00030000 0x40000&amp;gt;;
            };
        };

        slot1_partition: partition@80000 {
            compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
            label = &amp;quot;image-1&amp;quot;;
            reg = &amp;lt;0x00080000 0x70000&amp;gt;;
            ranges = &amp;lt;0x0 0x80000 0x70000&amp;gt;;
            #address-cells = &amp;lt;1&amp;gt;;
            #size-cells = &amp;lt;1&amp;gt;;

            slot1_s_partition: partition@0 {
                compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
                label = &amp;quot;image-1-secure&amp;quot;;
                reg = &amp;lt;0x00000000 0x30000&amp;gt;;
            };

            slot1_ns_partition: partition@30000 {
                compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
                label = &amp;quot;image-1-nonsecure&amp;quot;;
                reg = &amp;lt;0x00030000 0x40000&amp;gt;;
            };
        };

        tfm_ps_partition: partition@f0000 {
            compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
            label = &amp;quot;tfm-ps&amp;quot;;
            reg = &amp;lt;0x000f0000 0x00004000&amp;gt;;
        };

        tfm_its_partition: partition@f4000 {
            compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
            label = &amp;quot;tfm-its&amp;quot;;
            reg = &amp;lt;0x000f4000 0x00002000&amp;gt;;
        };

        tfm_otp_partition: partition@f6000 {
            compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
            label = &amp;quot;tfm-otp&amp;quot;;
            reg = &amp;lt;0x000f6000 0x00002000&amp;gt;;
        };

        storage_partition: partition@f8000 {
            compatible = &amp;quot;zephyr,mapped-partition&amp;quot;;
            label = &amp;quot;storage&amp;quot;;
            reg = &amp;lt;0x000f8000 0x00008000&amp;gt;;
        };
    };
};

/delete-node/ &amp;amp;sram0_s;
/delete-node/ &amp;amp;sram0_ns;

&amp;amp;sram0 {
    /*
     * SRAM partition layout for non-minimal TF-M
     *
     * 0x2000_0000  Secure RAM                      (   88 kB)
     * 0x2001_6000  Non-secure RAM area             (  168 kB)
     *   0x2001_6000  Modem shared area             ( 17768 B)
     *     0x2001_6000  control                     (  1256 B)
     *     0x2001_64e8  app -&amp;gt; cell                 (  8320 B)
     *     0x2001_8568  cell -&amp;gt; app                 (    8 kB)
     *   0x2001_a568  Application RAM               (154264 B)
     */
    sram0_s: sram@0 {
        reg = &amp;lt;0x0 0x16000&amp;gt;;
    };

    sram0_ns: sram@16000 {
        reg = &amp;lt;0x16000 0x2a000&amp;gt;;
        #address-cells = &amp;lt;1&amp;gt;;
        #size-cells = &amp;lt;1&amp;gt;;
        ranges = &amp;lt;0x0 0x16000 0x2a000&amp;gt;;

        /* Must be in first 128 kB of RAM. */
        sram0_ns_modem: sram0_ns@0 {
            /* Modem (shared) memory */
            reg = &amp;lt;0x0 0x4568&amp;gt;;
            #address-cells = &amp;lt;1&amp;gt;;
            #size-cells = &amp;lt;1&amp;gt;;
            ranges = &amp;lt;0x0 0x0 0x4568&amp;gt;;

            cpuapp_cpucell_ipc_shm_ctrl: sram0_ns_modem@0 {
                /* Modem IPC control */
                reg = &amp;lt;0x0 0x4e8&amp;gt;;
            };

            cpuapp_cpucell_ipc_shm_heap: sram0_ns_modem@4e8 {
                /* Modem IPC transmit */
                reg = &amp;lt;0x4e8 0x2080&amp;gt;;
            };

            cpucell_cpuapp_ipc_shm_heap: sram0_ns_modem@2568 {
                /* Modem IPC receive */
                reg = &amp;lt;0x2568 0x2000&amp;gt;;
            };
        };

        sram0_ns_app: sram0_ns@4568 {
            /* Non-Secure application memory */
            reg = &amp;lt;0x4568 0x25a98&amp;gt;;
        };
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Out of interest, I tried your suggestion of removing the sub-partitions from slot1_partition, but that causes a build error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571807?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 08:59:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e34f8f5-fd3b-45a5-a9df-1b6fcc6cdd67</guid><dc:creator>Tom01</dc:creator><description>[quote userid="5203" url="~/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1/571788"]&lt;p&gt;/ {&lt;br /&gt;&amp;nbsp; &amp;nbsp; chosen {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nordic,pm-ext-flash = &amp;amp;gd25wb256;&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;Remove that, though the &amp;quot;partition manager&amp;quot; is anyway deprecated.&lt;/p&gt;[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Funnily enough, after removing this section completely, dfu_target_write() now does not cause a secure fault! The downloaded update chunks can now be written to flash.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571801?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 08:18:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d2f5192-d69f-47e0-83b5-2525e3d67195</guid><dc:creator>Tom01</dc:creator><description>[quote userid="5203" url="~/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1/571788"]Remove that, though the &amp;quot;partition manager&amp;quot; is anyway deprecated.[/quote]
&lt;p&gt;Oh, thanks for pointing that out!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571799?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 08:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc6ef91b-caf7-4022-885f-fb7384afb89d</guid><dc:creator>Tom01</dc:creator><description>&lt;p&gt;My impression from reading the docs is that in&amp;nbsp;&amp;quot;Dual-slot direct-xip&amp;quot; mode, bootloader may start the application from both partitions depending on where the newer version is placed.&lt;/p&gt;
&lt;p&gt;Do you use the PSA secure storage by any chance? This should persist if swap mode is used, but I&amp;#39;m not sure if there is a mechanism to persist it when&amp;nbsp;Dual-slot direct-xip is being used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571789?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 05:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a1492cd-9c5d-45ab-b645-962bac993f7b</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;gt;&amp;nbsp;Image swap/swap mode seems to be the default mode for MCUboot, where the application always runs from the primary slot and the update is always written to the secondary slot.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That&amp;#39;s also my understanding and used way.&lt;/p&gt;
&lt;p&gt;Not sure, if the two stage approach with &amp;quot;Dual-slot direct-xip&amp;quot; is really different or just unclear.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571788?ContentTypeID=1</link><pubDate>Thu, 01 Oct 2026 05:22:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc5dd637-4b81-4de8-a660-b1865169b70d</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;&amp;gt;&amp;nbsp;but causes a &amp;quot;SECURE FAULT&amp;quot; when running&amp;nbsp;`dfu_target_write`:&lt;/p&gt;
&lt;p&gt;In my experience, the crash on writing to the DFU target was caused by selecting slot 0 and not 1.&lt;/p&gt;
&lt;p&gt;But you&amp;#39;re right, the 0x80000 points to slot 1.&lt;/p&gt;
&lt;p&gt;Just to check,&lt;/p&gt;
&lt;p&gt;/ {&lt;br /&gt;&amp;nbsp; &amp;nbsp; chosen {&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; nordic,pm-ext-flash = &amp;amp;gd25wb256;&lt;br /&gt;&amp;nbsp; &amp;nbsp; };&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;Remove that, though the &amp;quot;partition manager&amp;quot; is anyway deprecated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571772?ContentTypeID=1</link><pubDate>Wed, 30 Sep 2026 14:07:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c7dfcb3-ed69-41bf-8b89-4e817b947cf5</guid><dc:creator>Tom01</dc:creator><description>[quote userid="5203" url="~/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1/571754"]There are different boot-loader setups, and one has the name &amp;quot;SECURE_BOOT&amp;quot; and uses an immutable b0 boot-loader and additional mcuboot (2 stages). So the terms you used truggered me to clarify, what your intention is.[/quote]
&lt;p&gt;It&amp;#39;s a bit confusing, because the secure boot architecture documentation uses the term &amp;quot;immutable bootloader&amp;quot; for the bootloader selected for a single stage setup and the NSIB has &amp;quot;immutable bootloader&amp;quot; in its name... &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f603.svg" title="Smiley"&gt;&amp;#x1f603;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I tried your fix, but unless I have done something wrong it doesn&amp;#39;t solve the secure fault. Also, I think the partition selection might not be the issue, because the secure fault is triggered on the start of the flash range of my slot1 partition. That looks like slot1 is correctly selected, doesn&amp;#39;t it?&amp;nbsp;&lt;/p&gt;
[quote userid="5203" url="~/f/nordic-q-a/129300/dfu-target-api-on-ncs-v3-4-1/571754"]Not sure, what they mean by &amp;quot;image swap&amp;quot;[/quote]
&lt;p&gt;Image swap/swap mode seems to be the default mode for MCUboot, where the application always runs from the primary slot and the update is always written to the secondary slot. It made the impression that this case is best documented, so I wanted to start out there.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU target API on NCS v3.4.1</title><link>https://devzone.nordicsemi.com/thread/571754?ContentTypeID=1</link><pubDate>Wed, 30 Sep 2026 11:44:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:688c5169-aad4-4f74-8002-e95271bdccf9</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;Just to mention: I&amp;#39;m a developer and not related to Nordic ;-).&lt;/p&gt;
&lt;p&gt;There are different boot-loader setups, and one has the name &amp;quot;SECURE_BOOT&amp;quot; and uses an immutable b0 boot-loader and additional mcuboot (2 stages). So the terms you used truggered me to clarify, what your intention is.&lt;/p&gt;
&lt;p&gt;Your app crashes, because in your partition setup&amp;nbsp;&lt;span&gt;&amp;quot;flash_img.c&amp;quot; gets it wrong. It takes then the primary slot for upload and that crashes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;At the begin of the year, it also toke the&amp;nbsp;primary slot&amp;nbsp;for the Thingy:91/X, but there the root cause was slightly different.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The patch is pretty small, you may even try to edit&amp;nbsp;&amp;quot;flash_img.c&amp;quot; to see, if that works for you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;gt;&amp;nbsp;&amp;nbsp;it is listed that NSIB only supports&amp;nbsp;Dual-slot direct-xip upgrades.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Not sure, what they mean by &amp;quot;image swap&amp;quot;, at least I&amp;#39;m mainly common with the&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;Dual-slot direct-xip&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but that swaps the slots as well, means, download to secondary slot, and on update swap primary and secondary. For that I write the app (tf-m + ns-app) to the secondary slot, and mucboot copies both to the primary and executes it from there.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Anyway, let me recommend, you start with the fix and we will see, if that is changing something.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>