<?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>Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/115835/flash-partition-management-with-trusted-firmware-m</link><description>Backround: We are planning to use TF-M with a two-stage bootloader (NSIB &amp;amp; MCUBoot) using dual-slots for secure and non-secure images. We need to support configurable fixed flash partitions (i.e. for event or configuration storage) and would like to retain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Nov 2025 09:22:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/115835/flash-partition-management-with-trusted-firmware-m" /><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/555345?ContentTypeID=1</link><pubDate>Tue, 25 Nov 2025 09:22:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c2184432-f1f3-4e3a-9e57-5d2d5854843a</guid><dc:creator>vytautas</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This can be closed.&lt;/p&gt;
&lt;p&gt;Thank you for the information.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/519024?ContentTypeID=1</link><pubDate>Mon, 20 Jan 2025 10:15:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fda9702-eaaa-4686-8d39-9131b877c898</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="vytautas.virvicius"]We&amp;#39;ve decided we want to use MCUBoot&amp;#39;s Serial Recovery for wired (UART) upgrades. Is there any way to add a MCUMgr command to read out the active slot without having to fork the bootloader implementation?[/quote]
&lt;p&gt;No, I do not know of any Hook feature in the Serial Recovery SMP implementation&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/518423?ContentTypeID=1</link><pubDate>Wed, 15 Jan 2025 11:37:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:768f36fa-72e9-4100-b7ac-fdadb80aae31</guid><dc:creator>vytautas</dc:creator><description>&lt;p&gt;We&amp;#39;ve decided we want to use MCUBoot&amp;#39;s Serial Recovery for wired (UART) upgrades. Is there any way to add a MCUMgr command to read out the active slot without having to fork the bootloader implementation?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/508630?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2024 09:26:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cded4d5b-d012-41ba-babd-7193a1a0f63f</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="vytautas.virvicius"]but surely it can&amp;#39;t function the same way for MCUBoot, given that you would be overwriting code you are currently executing.[/quote]
&lt;p&gt;First, MCUboot runs from S0.&lt;br /&gt;Then you upload update to S1, with newer version.&lt;br /&gt;Then reboot. MCUboot will now boot from newest version: S1.&lt;br /&gt;Then you upload update to S0, with newer version.&lt;br /&gt;Then reboot. MCUboot will now boot from newest version: S0.&lt;br /&gt;Etc.&lt;/p&gt;
[quote user="vytautas.virvicius"]Who determines which (S0 or S1) partition the MCUBoot update (of MCUBoot itself!) should go to?[/quote]
&lt;p&gt;You &amp;quot;simply&amp;quot; have to upload to the slot MCUboot does not run from. &lt;br /&gt;I had to ask devs for how to read this. They say &amp;quot;&lt;span&gt;&lt;span dir="ltr"&gt;&amp;nbsp;&lt;a title="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/tfm/tfm_psa_template/src/main.c#l92" href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/tfm/tfm_psa_template/src/main.c#L92" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-nrf/blob/main/samples/tfm/tfm_psa_template/src/main.c#L92&lt;/a&gt; shows how to do it in TF-M&lt;/span&gt;&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;I am not yet sure how to do it without TF-M, but I think you should be able to use the &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/security/bootloader/fw_info.html"&gt;FW Info&lt;/a&gt; lib.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/508046?ContentTypeID=1</link><pubDate>Mon, 28 Oct 2024 05:05:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c88fb5b9-f4b1-458d-a814-04f6c1ad9e9c</guid><dc:creator>vytautas</dc:creator><description>[quote userid="106736" url="~/f/nordic-q-a/115835/flash-partition-management-with-trusted-firmware-m/507915"]MCUboot require that mcuboot_primary and mcuboot_secondary have the same size. This way, you can always fit the uptate for mcuboot_primary into mcuboot_secondary.[/quote]
&lt;p&gt;By looking at the NSIB (Nordic Secure Immutable Bootloader) design we can see that it is capable of booting into the &lt;strong&gt;S0&lt;/strong&gt; or &lt;strong&gt;S1&lt;/strong&gt; partitions unlike MCUBoot, which will always boot into the&amp;nbsp;&lt;strong&gt;mcuboot_primary&lt;/strong&gt; partition.&lt;/p&gt;
&lt;p&gt;I understand how the swap mechanism works for the primary and secondary application (&lt;strong&gt;app&lt;/strong&gt;) partitions, but surely it can&amp;#39;t function the same way for MCUBoot, given that you would be overwriting code you are currently executing.&lt;/p&gt;
&lt;p&gt;Who determines which (S0 or S1) partition the MCUBoot update (of MCUBoot itself!) should go to?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507915?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 11:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc09004e-23b2-44c0-857f-840233bc4b0b</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="vytautas.virvicius"]PS. I don&amp;#39;t think we&amp;#39;ve shared confidential information in this ticket. I think the information shared by you would be useful to others as well. Are you okay with making this ticket Public?[/quote]
&lt;p&gt;Excellent idea! I will make it public.&lt;/p&gt;
[quote user="vytautas.virvicius"]Assuming the partition size isn’t chosen arbitrarily, I’m guessing the compiler excludes unused TF-M features, resulting in the low memory usage I&amp;#39;m seeing with this sample. Is this correct?[/quote]
&lt;p&gt;Im gonna stop you on the assumption. As yoiu can see from &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/modules/trusted-firmware-m/Kconfig.tfm.pm"&gt;Kconfig.tfm.pm&lt;/a&gt;, the size is only optimized for CONFIG_TFM_PROFILE_TYPE_MINIMAL. For all other TF-M profiles we default it to the number &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/74ec8d27eb9ac759e32080753dc883fd82402159/modules/trusted-firmware-m/Kconfig.tfm.pm#L40"&gt;0x40000&lt;/a&gt;. (depending on a couple of other tings such as bootloaders, but still).&lt;/p&gt;
&lt;p&gt;I think we just chose something that will work if we enable all features for TF-M.&lt;/p&gt;
&lt;p&gt;In short: We have not yet optimized non-minimal TF-M profiles, and leave optimizing partition sizes up to the user.&lt;/p&gt;
[quote user="vytautas.virvicius"]For instance, if updates are saved to &lt;strong&gt;mcuboot_secondary (0x88000)&lt;/strong&gt;[/quote]
&lt;p&gt;MCUboot require that mcuboot_primary and mcuboot_secondary have the same size. This way, you can always fit the uptate for mcuboot_primary into mcuboot_secondary.&lt;/p&gt;
[quote user="vytautas.virvicius"]The only alternative I see is that the update is staged directly to &lt;strong&gt;S0 &lt;/strong&gt;or &lt;strong&gt;S1 &lt;/strong&gt;partition[/quote]
&lt;p&gt;S0 and S1 are slots where the mcuboot bootloader lives. They are only used for MCUboot, and for updating MCUboot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507914?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 09:52:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55932d9d-1a99-41bf-bfc3-a112c3236ae9</guid><dc:creator>vytautas</dc:creator><description>[quote user="Sigurd Hellesvik"]You are free to resize TF-M by configuring CONFIG_PM_PARTITION_SIZE_TFM yourself, and make this closer to 100%. &lt;br /&gt;It is also possible to disable features for TF-M, but my experience is that minimizing TF-M size can be tricky.[/quote]
&lt;p&gt;Assuming the partition size isn’t chosen arbitrarily, I’m guessing the compiler excludes unused TF-M features, resulting in the low memory usage I&amp;#39;m seeing with this sample. Is this correct?&lt;/p&gt;
&lt;p&gt;Also, looking closer at the partitioning, it is not clear where pending MCUBoot updates are stored. For instance, if updates are saved to &lt;strong&gt;mcuboot_secondary (0x88000)&lt;/strong&gt;, it may not leave sufficient space for the primary application (&lt;strong&gt;app&lt;/strong&gt; + &lt;strong&gt;tfm&lt;/strong&gt;). The only alternative I see is that the update is staged directly to &lt;strong&gt;S0 &lt;/strong&gt;or &lt;strong&gt;S1 &lt;/strong&gt;partition, however I would assume these flash regions aren&amp;#39;t arbitrarily accessible and are protected by TF-M. Furthermore, if they are staged directly to those partitions, how does the application determine which slot to overwrite—say, if the current bootable image is in S1? Could you clarify this?&lt;/p&gt;
&lt;p&gt;PS. I don&amp;#39;t think we&amp;#39;ve shared confidential information in this ticket. I think the information shared by you would be useful to others as well. Are you okay with making this ticket Public?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507913?ContentTypeID=1</link><pubDate>Fri, 25 Oct 2024 06:46:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1df54ce9-70f4-412d-986d-b96ef9608827</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>[quote user="vytautas.virvicius"]Can the&amp;nbsp;&lt;strong&gt;tfm &lt;/strong&gt;and&lt;strong&gt;&amp;nbsp;app&amp;nbsp;&lt;/strong&gt;partition sizes change after DFU?[/quote]
&lt;p&gt;While indeed we have a &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/bootloaders_dfu/mcuboot_nsib/bootloader_partitioning.html#static_partition_requirement_for_dfu"&gt;Static partition requirement for DFU&lt;/a&gt;, this requirement is for bootloader and DFU partitions. The important thing is that where MCUboot boots to and where the DFU goes into does not change.&lt;br /&gt;Since &lt;strong&gt;tfm &lt;/strong&gt;and &lt;strong&gt;app&lt;/strong&gt; partitions are DFUed as one package, they can change sizes in comparison to each other. But &lt;strong&gt;mcuboot_primary_app,&lt;/strong&gt; which they live inside, must stay the same. So sum size &lt;strong&gt;&lt;/strong&gt;app+tfm must stay the same.&lt;/p&gt;
[quote user="vytautas.virvicius"]Is there any reason why the&amp;nbsp;&lt;strong&gt;tfm (0x28200) &lt;/strong&gt;partition is so large in the tfm_psa_template?[/quote]
&lt;p&gt;TF-M partition size is set &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/11645184a54d02921bb0691a57e1e86c141393da/modules/trusted-firmware-m/Kconfig.tfm.pm#L23"&gt;here&lt;/a&gt;. As you see, it varies depending on TF-M features enabled. &lt;/p&gt;
[quote user="vytautas.virvicius"]When building the image it says it is only using 94 / 255 kB (37.16%) of FLASH. It seems excessive to allocate it such a partition, especially as the User &amp;amp; Zephyr code can grow to be quite large.[/quote]
&lt;p&gt;You are free to resize TF-M by configuring CONFIG_PM_PARTITION_SIZE_TFM yourself, and make this closer to 100%. &lt;br /&gt;It is also possible to disable features for TF-M, but my experience is that minimizing TF-M size can be tricky.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507912?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 14:48:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e07ad4b3-4ba7-4786-aa00-f8f74406935d</guid><dc:creator>vytautas</dc:creator><description>&lt;p&gt;Is there any reason why the&amp;nbsp;&lt;strong&gt;tfm (0x28200) &lt;/strong&gt;partition is so large in the tfm_psa_template?&lt;/p&gt;
&lt;p&gt;When building the image it says it is only using 94 / 255 kB (37.16%) of FLASH. It seems excessive to allocate it such a partition, especially as the User &amp;amp; Zephyr code can grow to be quite large.&lt;/p&gt;
&lt;p&gt;Can the&amp;nbsp;&lt;strong&gt;tfm &lt;/strong&gt;and&lt;strong&gt;&amp;nbsp;app&amp;nbsp;&lt;/strong&gt;partition sizes change after DFU?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507911?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 14:35:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16239a53-bfa1-483d-8ce9-b8c1b07aa412</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;These partitions are defined in pm.yml files around the SDK.&lt;br /&gt;Specifically &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/subsys/partition_manager"&gt;here&lt;/a&gt; (subsystems), &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/bootloader/pm.yml"&gt;this&lt;/a&gt;(NSIB) and &lt;a href="https://github.com/nrfconnect/sdk-mcuboot/blob/main/boot/zephyr/pm.yml"&gt;this&lt;/a&gt;(MCUboot).&lt;/p&gt;
&lt;p&gt;Mark that there are differences between &amp;quot;span&amp;quot; and &amp;quot;placament&amp;quot;. &amp;quot;Span&amp;quot; overlaps other partitions, while &amp;quot;placement&amp;quot; has a specific place in code. &amp;quot;Span&amp;quot; is thus mostly to describe sets of other partitions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;app:&lt;/strong&gt; The &amp;quot;app&amp;quot; is where the zephyr application lives. This is the default partition and is always automatically generated by the partition manager. &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;app_image [span]&lt;/strong&gt;: NSIB uses this when there is single bootloader. I don&amp;#39;t think this one is used for dual bootloaders, but I might have missed some subtlety. For NSIB only, this is the address NSIB will boot to after the bootloader I think.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mcuboot_pad [placement]&lt;/strong&gt;: MCUboot needs to store some metadata per image. Size 0x200. You see 0x200 repeat in the offsets right. Could more clearly have been named &amp;quot;mcuboot_primary_pad&amp;quot; to match the below name.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mcuboot_primary_app [span]&lt;/strong&gt;: In your case, this overlaps with &amp;quot;app&amp;quot;. But if we got direct-xip mode for MCUboot, we want two different app partitions, so then we also will have mcuboot_secondary_app. These have the address mcuboot will boot to after the bootloader.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mcuboot_primary [span]&lt;/strong&gt;: We want to know the whole MCUboot primary (app + pad) to be under one. The full DFU binary goes into here, cause that has both image and metadata.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mcuboot_secondary [placement]: &lt;/strong&gt;When updating the application, you want to &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/device-firmware-update-dfu-essentials/"&gt;swap&lt;/a&gt; it in. MCUboot secondary is generally for this.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tfm [placement]&lt;/strong&gt;: The tfm application. This is code that runs, just as the app. Must be just before tha app.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tfm_secure [span] + tfm_nonsecure [span]&lt;/strong&gt;: With TF-M, we want to do separation of SPE and NSPE &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/board_support/processing_environments.html#app-boards-spe-nspe"&gt;&lt;span&gt;Processing environments&lt;/span&gt;&lt;/a&gt;. So we create partitions so we know which to make S flash and which to make NS flash.
&lt;ul&gt;
&lt;li&gt;tfm_secure overlaps mcuboot_pad and tfm.&lt;/li&gt;
&lt;li&gt;Note: Mark that tfm_nonsecure and tfm are updated by the MCUboot, os these are overlapped by mcuboot_primary&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I think I got this image correct, but feel free to check up against previously mentioned pm.yml files&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pastedimage1729780533358v5.png" alt=" " /&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><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507910?ContentTypeID=1</link><pubDate>Thu, 24 Oct 2024 12:40:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d1ece27-2bc8-4784-a4fc-d4fb06c7bf38</guid><dc:creator>vytautas</dc:creator><description>&lt;p&gt;I would like to re-open this ticket as I have a few follow-up questions.&lt;/p&gt;
&lt;p&gt;When I run the partition_manager_report, I receive the following output:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1729772750191v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I understand the following about the partition layout:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;B0 (0x0)&lt;/strong&gt;: This is the Nordic Secure Immutable Bootloader (NSIB).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S0 (0x8000)&lt;/strong&gt; and &lt;strong&gt;S1 (0x18000)&lt;/strong&gt;: These are MCUBoot partitions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;However, the following partitions are not entirely clear to me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;mcuboot_primary (0x28000)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tfm_secure (0x28000)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;app_image (0x28200)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mcuboot_primary_app (0x28200)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tfm (0x28200)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;tfm_nonsecure (0x68000)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;app (0x68000)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mcuboot_secondary (0x88000)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;My observation is that some of these partitions seem to overlap, which leads me to believe they might be overlaid for ease of use in code. For example, referring to &lt;strong&gt;&lt;code&gt;app_image&lt;/code&gt; &lt;/strong&gt;instead of calculating &lt;strong&gt;&lt;code&gt;mcuboot_primary + 0x200&lt;/code&gt;&lt;/strong&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Could you clarify the exact purpose of these partitions?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Additionally, I would like to understand where the code I compile will eventually reside. For example, where are pending updates stored (assume we&amp;#39;re using swap w/ scratch)?&lt;/p&gt;
&lt;p&gt;Finally, my assumption is that the boot sequence is as follows: &lt;strong&gt;NSIB&lt;/strong&gt; loads &lt;strong&gt;MCUBoot&lt;/strong&gt;, which then loads &lt;strong&gt;TFM&lt;/strong&gt;, and finally, the user application is loaded. Is this assumption correct?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507909?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2024 14:11:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fdd5b22-4a4a-456e-a4ce-9a5e29e967eb</guid><dc:creator>vytautas</dc:creator><description>&lt;p&gt;Yes. Thank you:)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507908?ContentTypeID=1</link><pubDate>Mon, 12 Aug 2024 13:44:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0e3abd0-f324-42af-adbd-d7f1821bdf80</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I will continue to help with this ticket.&lt;/p&gt;
&lt;p&gt;With TF-M, flash is parted into two parts: Secure flash (For TF-M) and Non-Secure flash (for app).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;EDIT: Might not be as simple. SPU is 32kB parts of the flash, so as you can see from the below report, TF-M also has stuff after the app, meaning that there are multiple parts here, not just 2 halves. Each part has to be either NSPE or SPE though.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;See&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/an-introduction-to-trusted-firmware-m-t-m"&gt;An Introduction to Trusted Firmware-M (TF-M)&lt;/a&gt;&amp;nbsp;if to learn background on this.&lt;/p&gt;
&lt;p&gt;So if you intend to use a custom flash partition in your app, just put it in the NSPE flash.&lt;/p&gt;
&lt;p&gt;The partition manager is dynamic, so it can partition stuff for you.&lt;br /&gt;The &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/samples/tfm/tfm_psa_template/README.html"&gt;PSA Template sample&lt;/a&gt; is my goto &amp;quot;TF-M with all features&amp;quot; sample, so I will use that to show you:&lt;/p&gt;
&lt;p&gt;Here is what I do:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Build the sample&lt;/li&gt;
&lt;li&gt;Check build/partitions.yml, just to have a look&lt;/li&gt;
&lt;li&gt;Create pm_static.yml:
&lt;ol&gt;
&lt;li&gt;&lt;pre class="ui-code" data-mode="text"&gt;custom_partition:
  address: 0xfc000
  end_address: 0x100000
  region: flash_primary
  size: 0x4000
&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Delete build folder -&amp;gt; build sample again&lt;/li&gt;
&lt;li&gt;&amp;quot;west build -t partition_manager_report&amp;quot;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pastedimage1723470209057v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;6. Check build/partitions.yml again.&lt;/p&gt;
&lt;p&gt;7. For release, copy build/parititons.yml -&amp;gt; pm_static.yml to freeze finished partitioning (required for DFU).&lt;/p&gt;
&lt;p&gt;Does this make sense?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507907?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2024 11:13:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dad2d0fe-c982-4731-86b7-c011fac52591</guid><dc:creator>vytautas</dc:creator><description>&lt;p&gt;Unfortunately, your reply doesn&amp;#39;t answer my question. To my best understanding, our use-case would be best served by &amp;#39;Static partitioning&amp;#39; (Ref:&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/multi-image-builds-and-the-partition-manager/"&gt;https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-8-bootloaders-and-dfu-fota/topic/multi-image-builds-and-the-partition-manager/&lt;/a&gt;), however the partition configuration (pm_static.yml) isn&amp;#39;t clear for use-case where TF-M is used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash Partition Management with Trusted Firmware-M</title><link>https://devzone.nordicsemi.com/thread/507906?ContentTypeID=1</link><pubDate>Tue, 06 Aug 2024 11:06:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c09d8373-4092-4195-a2be-5a819b20c284</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can find PM configuration guidance for your custom board from the following DevAcademy page.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/topic/board-files-for-multi-core-hardware-tf-m/#Enabling-TF-M-for-the-_ns-build-targets"&gt;Board files for multi-core hardware &amp;amp; TF-M - Nordic Developer Academy (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>