<?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>Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117285/utilize-device-tree-partition-with-mcu-boot</link><description>I am working on custom hardware with an nRF52840. I have added the MCU boot in my earlier development as well but this issue I have never faced before. 
 Problem statement 
 I have defined a partition as mentioned below snippet where I have used the minimal</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 24 Dec 2024 07:03:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117285/utilize-device-tree-partition-with-mcu-boot" /><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/516214?ContentTypeID=1</link><pubDate>Tue, 24 Dec 2024 07:03:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9d641cb-f94f-4c5e-9277-b425c864b930</guid><dc:creator>Ankit_chauhan</dc:creator><description>&lt;p&gt;Hi Hung,&lt;br /&gt;&lt;br /&gt;Sorry for my late reply and thank you for the clarification.&lt;/p&gt;
&lt;p&gt;So, I decided to go with the pm_static.yml file to manage my storage where I removed the scratch partition. So now I can manage my partition using the .yml file and it is working now.&lt;/p&gt;
&lt;p&gt;Thanks for the support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/515712?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 11:50:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f37fbfdd-5b52-4702-85ff-034e3f10b3bd</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ankit,&amp;nbsp;&lt;br /&gt;I don&amp;#39;t think the Partition manager will look into the device tree partition location to inherit from there.&amp;nbsp;&lt;br /&gt;What you should do is to define your pm_static.yml based on build\partitions.yml file and modify to what you need.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For SDK v2.6.2 you can&amp;#39;t do pm_static_&amp;lt;boardname&amp;gt;.yml but need to define the&amp;nbsp;PM_STATIC_YML_FILE when you build.&amp;nbsp;&lt;br /&gt;You cant take a look at&amp;nbsp;CMakeLists.txt file in&amp;nbsp;\nrf\samples\matter\lock to see how it work.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regarding your question about scratch area, as far as I know, we switch to swap move algorithm and don&amp;#39;t use scratch move algorithm.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do you have any reason that you prefer scratch move ? It make flash wear fast ter.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/515696?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 11:11:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f658a092-3d03-4ffa-869c-8e478f348321</guid><dc:creator>Ankit_chauhan</dc:creator><description>&lt;p&gt;Also, your suggestion to use the board-specific pm_static.yml did not work for me. The generated partition.yml does not have my updated partition. It has the default partitions.&lt;br /&gt;&lt;br /&gt;I am using the custom board so I append my board name after pm_static_&amp;lt;board_name&amp;gt;.yml. But that did not work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Instead of using a custom board, I have used the defined board like pm_static_nrf5284dk_nrf52840.yml which did not work as well.&lt;/p&gt;
&lt;p&gt;Is this feature supported by a specific nRF SDK version? Currently, I am running on 2.6.2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/515688?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 10:44:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4a5be9e-18fc-4b67-be97-717b1cea2aab</guid><dc:creator>Ankit_chauhan</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;I see. That should resolve my concern.&lt;/p&gt;
&lt;p&gt;So what I understood is that the &lt;strong&gt;pm_statuc.yml&lt;/strong&gt; file is the only way to define a custom flash partition when the MCUBoot is enabled.&lt;/p&gt;
&lt;p&gt;I am running another project where I found the &lt;strong&gt;partition.yml&lt;/strong&gt; file in the &lt;strong&gt;build/&lt;/strong&gt; directory which&amp;nbsp;has the generated partition.&amp;nbsp;&amp;nbsp;Here is the partition.yml&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xc200
  end_address: 0x83000
  region: flash_primary
  size: 0x76e00
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  end_address: 0xc200
  placement:
    align:
      start: 0x1000
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x200
mcuboot_primary:
  address: 0xc000
  end_address: 0x83000
  orig_span: &amp;amp;id001
  - app
  - mcuboot_pad
  region: flash_primary
  sharers: 0x1
  size: 0x77000
  span: *id001
mcuboot_primary_app:
  address: 0xc200
  end_address: 0x83000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0x76e00
  span: *id002
mcuboot_secondary:
  address: 0x83000
  end_address: 0xfa000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0x77000
nvs_storage:
  address: 0xfa000
  end_address: 0x100000
  placement:
    align:
      start: 0x1000
    before:
    - end
  region: flash_primary
  size: 0x6000
sram_primary:
  address: 0x20000000
  end_address: 0x20040000
  region: sram_primary
  size: 0x40000&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When I saw the file and compared the partition with the device tree partition, I did not find any scratch partition in the partition.yml file. Below are my device tree partition details.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		boot_partition: partition@0 {
			label = &amp;quot;mcuboot&amp;quot;;
			reg = &amp;lt;0x0 0xc000&amp;gt;;
		};
		slot0_partition: partition@c000 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0xc000 0x72000&amp;gt;;
		};
		slot1_partition: partition@7e000 {
			label = &amp;quot;image-1&amp;quot;;
			reg = &amp;lt;0x7e000 0x72000&amp;gt;;
		};
		scratch_partition: partition@f0000 {
			label = &amp;quot;image-scratch&amp;quot;;
			reg = &amp;lt;0xf0000 0xa000&amp;gt;;
		};
		storage_partition: partition@f8000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0xf8000 0x6000&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;However, my&amp;nbsp;MCUboot is configured to handle the dual image partition with the Swap With the Scratch option enabled. I am curious to know how the OTA is performing without scratch partition.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you please help me to understand this concept?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/515678?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 10:21:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a0e7fa7-1b9a-4b58-b0db-d55f8c199359</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ankit,&amp;nbsp;&lt;br /&gt;It&amp;#39;s actually possible to make pm_static file for each board. Just name it pm_static_*boardname*.yml &lt;br /&gt;You can take a look at our sample for reference:&amp;nbsp;&lt;br /&gt;&lt;br /&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/pastedimage1734603684618v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/515637?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 05:46:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a200f21f-c9ee-4416-af00-75a8842ab918</guid><dc:creator>Ankit_chauhan</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Your suggestion to enable PM will allow me to configure the partition using the pm.yml file. And as I mentioned my application code is distinct amongst the different boards (like nrf52 and nrf53). I have different sensors one is using nRF52 and the other is using nRF53.&lt;/p&gt;
&lt;p&gt;The partitions for nRF52 and nRF53 will differ, so using pm.yml is not an option for me as it will freeze the partition for all boards.&lt;/p&gt;
&lt;p&gt;Please current my understanding if I am wrong with this terminology.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/515169?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2024 15:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89b88c7d-9d9d-4b09-ba78-db85611199e9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ankit,&amp;nbsp;&lt;br /&gt;I will look deeper at the ticket tomorrow. But I just want to point to where the partition manager &amp;quot;overwrite&amp;quot; the configuration of the partition in device tree:&amp;nbsp;\nrf\include\flash_map_pm.h&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/* Aliases for zephyr - mcuboot/ncs style naming */
#define image_0 mcuboot_primary
#define slot0_partition mcuboot_primary
#define image_1 mcuboot_secondary
#define slot1_partition mcuboot_secondary
#define image_0_nonsecure mcuboot_primary
#define slot0_ns_partition mcuboot_primary
#define image_1_nonsecure mcuboot_secondary
#define slot1_ns_partition mcuboot_secondary
#define image_2 mcuboot_primary_1
#define image_3 mcuboot_secondary_1
#define slot2_partition mcuboot_primary_1
#define slot3_partition mcuboot_secondary_1
#define slot4_partition mcuboot_primary_2
#define slot5_partition mcuboot_secondary_2
#define image_scratch mcuboot_scratch
#define image_scratch mcuboot_scratch&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When multiple image is compiled, partition manager will be used. You can see in the doc here:&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.8.0/page/nrf/scripts/partition_manager/partition_manager.html"&gt;https://docs.nordicsemi.com/bundle/ncs-2.2.0/page/nrf/scripts/partition_manager/partition_manager.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if you can remove partition manager in a multi images build, but have you looked at the option to use pm&amp;nbsp; ? You just need to configure the partitions correctly.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Utilize device tree partition with MCU boot</title><link>https://devzone.nordicsemi.com/thread/514879?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 11:52:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:45e58c71-e64f-4a3e-b92d-7cee75f7d2a6</guid><dc:creator>Ankit_chauhan</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/5280.partitions.txt"&gt;devzone.nordicsemi.com/.../5280.partitions.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>