<?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>Understanding MCUBoot partition management</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112063/understanding-mcuboot-partition-management</link><description>I have an application running on a custom nRF5340 board that supports simultaneous BLE DFU of the network and application core with MCUBoot. This ticket: seems to indicate that MCUBoot relies only on the partitions declared in the devicetree since it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 14 Jun 2024 17:48:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112063/understanding-mcuboot-partition-management" /><item><title>RE: Understanding MCUBoot partition management</title><link>https://devzone.nordicsemi.com/thread/488919?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2024 17:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ef2ee15-fc1a-4079-8bdf-2a2a74e065ee</guid><dc:creator>timl2415</dc:creator><description>&lt;p&gt;Answered my own question, it seems like MCUBoot can&amp;#39;t locate the primary_1 partition (since it doesn&amp;#39;t actually exist in accessible flash) unless flash simulator is setup via dts and Kconfig options. The way it&amp;#39;s normally done is that Kconfig options add flash_sim.overlay which contains the above definitions and users don&amp;#39;t have to add the flash_sim node manually like I do. In my project Cmakelists.txt we are doing&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set( mcuboot_DTC_OVERLAY_FILE boards/boot.overlay )&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which effectively overwrites the addition of flash_sim.overlay.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding MCUBoot partition management</title><link>https://devzone.nordicsemi.com/thread/488738?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2024 18:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d754caf9-1be5-4e52-a210-1cdfe506a5eb</guid><dc:creator>timl2415</dc:creator><description>&lt;p&gt;Hi Hieu, I see that it may compile fine but must clearly be some dependence the slot2_partition in the devicetree for simultaneous OTA. I have the following in my partition manager&amp;nbsp;that indicates mcuboot should transfer the network core image to ram flash (flash sim).&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcuboot_primary_1: { address: 0x0, size: 0x40000, device: flash_ctrl, region: ram_flash }&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;But for the build to compile with CONFIG_FLASH_SIMULATOR=y (a dependency of CONFIG_NRF53_MULTI_IMAGE_UPDATE&lt;/span&gt;&lt;/span&gt;&lt;span&gt;) I need a flash_sim node with slot2_partition defined in the device tree like so.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;	soc {
		/* Add a flash controller which has the compatible
		 * &amp;#39;zephyr,sim-flash&amp;#39;. This will ensure that the flash
		 * simulator can use it. None of the other properties in this
		 * node is used for anything.
		 */
		nordic_ram_flash_controller: nordic_ram-flash-controller@0 {
			compatible = &amp;quot;zephyr,sim-flash&amp;quot;;
			reg = &amp;lt;0x00000000 DT_SIZE_K(40)&amp;gt;;
			#address-cells = &amp;lt;1&amp;gt;;
			#size-cells = &amp;lt;1&amp;gt;;
			erase-value = &amp;lt;0xff&amp;gt;;

			/* This node label must match that used in the flash
			 * simulator.
			 */
			flash_sim0: flash_sim@0 {
				status = &amp;quot;okay&amp;quot;;
				compatible = &amp;quot;soc-nv-flash&amp;quot;;
				erase-block-size = &amp;lt;4096&amp;gt;;
				write-block-size = &amp;lt;4&amp;gt;;
				reg = &amp;lt;0x00000000 DT_SIZE_K(256)&amp;gt;;

				partitions {
                compatible = &amp;quot;fixed-partitions&amp;quot;;
                #address-cells = &amp;lt;1&amp;gt;;
                #size-cells = &amp;lt;1&amp;gt;;

					/* This partition must be defined for
					 * MCUboot to find the partition ID
					 * of the primary slot for image 1,
					 * which is stored in this partition.
					 */
					slot2_partition: partition@0 {
						label = &amp;quot;image-2&amp;quot;;
						reg = &amp;lt;0x00000000 0x00000A000&amp;gt;;
					};
				};
			};
		};
	};&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So is the reality that mcuboot DOES use the partitions from the partition manager, then the device tree to manage the network core update?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Understanding MCUBoot partition management</title><link>https://devzone.nordicsemi.com/thread/488670?ContentTypeID=1</link><pubDate>Thu, 13 Jun 2024 12:24:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7949d92-5e31-4489-86f7-7e363549ceb4</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;timl2415,&lt;/p&gt;
[quote user=""]This ticket:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/97478/partition-manager-and-device-tree-partitions"&gt;Partition Manager and device tree partitions&lt;/a&gt;&lt;br /&gt; seems to indicate that MCUBoot relies only on the partitions declared in the devicetree since it&amp;#39;s compiled before the partition manager runs[/quote]
&lt;p&gt;I just experimented with NCS v2.6.0, and it seems that the situation is not like that anymore. I removed all partitions in DTS, and the entire project with MCUboot compiled just fine.&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/pastedimage1718281437738v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Do you still have any confusion with that in mind?&lt;/p&gt;
&lt;p&gt;To try for yourself, use this overlay with MCUboot:&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;storage_partition;

/{
    chosen {
        /delete-property/ zephyr,code-partition;
    };
};
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>