<?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>Adding static partition between mcuboot and mcuboot_pad/app</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119062/adding-static-partition-between-mcuboot-and-mcuboot_pad-app</link><description>I&amp;#39;m trying to add a static partition that lies between the mcuboot and mcuboot_pad/app ones, but even though my solution builds correctly, mcuboot is stuck in a loop. This is how my static partition yaml looks like: 
 
 It seems like mcuboot is trying</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Feb 2025 08:04:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119062/adding-static-partition-between-mcuboot-and-mcuboot_pad-app" /><item><title>RE: Adding static partition between mcuboot and mcuboot_pad/app</title><link>https://devzone.nordicsemi.com/thread/524736?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2025 08:04:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7da0ef26-5d80-4b5d-b649-542f9598b4ae</guid><dc:creator>Anderson Felippe</dc:creator><description>&lt;p&gt;That&amp;nbsp;partition&amp;nbsp;configuration seems to work. Unfortunately it doesn&amp;#39;t suit out needs, so I&amp;#39;ll go for another approach instead. Thank you anyways!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding static partition between mcuboot and mcuboot_pad/app</title><link>https://devzone.nordicsemi.com/thread/523748?ContentTypeID=1</link><pubDate>Wed, 19 Feb 2025 15:28:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:247b8f1f-a9e1-410c-b3b6-cfc14da3362c</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="Anderson Felippe"]L05, L10 or L15 variant in a way that we could use L15 hardware, for example, but flash a stripped down version of the software that would be only for L05. It&amp;#39;s the most I could tell without going into much details.[/quote]
&lt;p&gt;No worries, that makes more than enough sense for me.&lt;/p&gt;
&lt;p&gt;A couple of suggestions then:&lt;/p&gt;
&lt;p&gt;Make sure the padding size is 0x800 and not 0x200&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/tfm.html#tf-m_partition_alignment_requirements"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/tfm.html#tf-m_partition_alignment_requirements&lt;/a&gt;&amp;nbsp;gives some good hints (even if you&amp;#39;re not going to use TF-M): The bootloader has to be a part of the SPU and this flash area needs to be page aligned in a multiple of 4kB.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This means that&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;MCUboot
Custom partition
MCuboot padding
End of secure part

App&amp;#160;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Does not work due to the custom partition being forced inside of the Secure domain, where you need the 4k alignment granularity.&lt;/p&gt;
&lt;p&gt;but&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;MCUboot
MCUboot padding&amp;#160;

End of secure

Custom partition
App&lt;/pre&gt;&lt;br /&gt;should work.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding static partition between mcuboot and mcuboot_pad/app</title><link>https://devzone.nordicsemi.com/thread/523571?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2025 15:41:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8ed82ae-7d88-4407-94fe-1a01b70c5440</guid><dc:creator>Anderson Felippe</dc:creator><description>&lt;p&gt;Hi, thanks for the reply.&lt;/p&gt;
&lt;p&gt;The motivation comes from a project requirement to have a common area in the flash to store&amp;nbsp;some special data regardless if we build our application for L05, L10 or L15 variant in a way that we could use L15 hardware, for example, but flash a stripped down version of the software that would be only for L05. It&amp;#39;s the most I could tell without going into much details.&lt;br /&gt;This cannot be at the end of the flash due to their size difference, therefore my partitioning idea.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s quite straightforward to tell mcuboot to jump to a certain address when working outside&amp;nbsp;NCS/Zephyr, so I thought it would be possible to&amp;nbsp;tell the build system: &amp;quot;My app starts here&amp;quot; and it would figure it out.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding static partition between mcuboot and mcuboot_pad/app</title><link>https://devzone.nordicsemi.com/thread/523559?ContentTypeID=1</link><pubDate>Tue, 18 Feb 2025 15:06:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2770fcac-169c-4dd8-9fa9-09eba5883fed</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]I&amp;#39;m trying to add a static partition that lies between the mcuboot and&amp;nbsp;mcuboot_pad/app ones, but even though my solution builds correctly, mcuboot is stuck in a loop. [/quote]
&lt;p&gt;Could you expand a bit on your motivation as for why you would want any section placed here?&amp;nbsp;&lt;/p&gt;
[quote user=""]It seems like mcuboot is trying to jump to &amp;#39;my_partition&amp;#39; instead of to &amp;#39;mcuboot_pad&amp;#39;. I tried adding partition ids, but it didn&amp;#39;t change. Can&amp;#39;t find it in the documentation or similar examples. How do I achieve this using static partitions?[/quote]
&lt;p&gt;Your observation is correct, whatever MCUboot is going to is the next address space located after MCUboot (after mcuboot pad, to be honest), which is the application.&lt;/p&gt;
&lt;p&gt;In addition, the padding partitions on the 54L15 needs to be 0x800 instead of 0x200&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/73a2c95f8437c72ef5f4b75bab6a736521f6ce8a/modules/mcuboot/boot/zephyr/Kconfig#L19"&gt;https://github.com/nrfconnect/sdk-nrf/blob/73a2c95f8437c72ef5f4b75bab6a736521f6ce8a/modules/mcuboot/boot/zephyr/Kconfig#L19&lt;/a&gt;&amp;nbsp;and you need to page align all of your partitions&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the dynamic partitioning from the smp server per&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf54l/fota_update.html#fota_update_sample"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf54l/fota_update.html#fota_update_sample&lt;/a&gt;&amp;nbsp;using&amp;nbsp;&lt;span&gt; west build -b &lt;/span&gt;&lt;em&gt;board_target&lt;/em&gt;&lt;span&gt; -- -DEXTRA_CONF_FILE=overlay-bt.conf. As you can see the pads are 0x800&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;EMPTY_0:
  address: 0x15e000
  end_address: 0x15f000
  placement:
    after:
    - mcuboot_secondary
  region: flash_primary
  size: 0x1000
app:
  address: 0xc800
  end_address: 0xb5000
  region: flash_primary
  size: 0xa8800
littlefs_storage:
  address: 0x15f000
  end_address: 0x165000
  placement:
    align:
      start: 0x1000
    before:
    - end
  region: flash_primary
  size: 0x6000
mcuboot:
  address: 0x0
  end_address: 0xc000
  placement:
    align:
      end: 0x1000
    before:
    - mcuboot_primary
  region: flash_primary
  size: 0xc000
mcuboot_pad:
  address: 0xc000
  end_address: 0xc800
  placement:
    before:
    - mcuboot_primary_app
  region: flash_primary
  size: 0x800
mcuboot_primary:
  address: 0xc000
  end_address: 0xb5000
  orig_span: &amp;amp;id001
  - mcuboot_pad
  - app
  region: flash_primary
  sharers: 0x1
  size: 0xa9000
  span: *id001
mcuboot_primary_app:
  address: 0xc800
  end_address: 0xb5000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0xa8800
  span: *id002
mcuboot_secondary:
  address: 0xb5000
  end_address: 0x15e000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0xa9000
otp:
  address: 0xffd500
  end_address: 0xffd9fc
  region: otp
  size: 0x4fc
sram_primary:
  address: 0x20000000
  end_address: 0x2002f000
  region: sram_primary
  size: 0x2f000
&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/tfm.html#tf-m_partition_alignment_requirements"&gt;https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/security/tfm.html#tf-m_partition_alignment_requirements &lt;/a&gt;also talks about the page aligning your partitions, but that&amp;#39;s another topic for now.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>