<?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>Sysbuild builds MCUBoot before static partitions are pulled in</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116156/sysbuild-builds-mcuboot-before-static-partitions-are-pulled-in</link><description>Hi, I&amp;#39;m currently working on porting an nrf5340 - NCS 2.6.0 project repo to NCS 2.7.0 starting with my own minimal sample. Having some trouble getting the sample to build with MCUBoot and a static partition map. 
 https://docs.nordicsemi.com/bundle/ncs</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 11 Nov 2024 13:25:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116156/sysbuild-builds-mcuboot-before-static-partitions-are-pulled-in" /><item><title>RE: Sysbuild builds MCUBoot before static partitions are pulled in</title><link>https://devzone.nordicsemi.com/thread/509894?ContentTypeID=1</link><pubDate>Mon, 11 Nov 2024 13:25:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d806da2-09b6-4cb7-9d78-e6e20a377884</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Timothy,&amp;nbsp;&lt;br /&gt;You can try to do a quick test to set the &lt;span&gt;slot0_partition&amp;nbsp;&lt;/span&gt;and &lt;span&gt;slot1_partition&amp;nbsp;&lt;/span&gt;address to very near address , or at the very end of flash to see if you can still do DFU update.&amp;nbsp;&lt;br /&gt;From what I know we overwrite them with mcuboot_primary and mcuboot_secondary in our&amp;nbsp;\nrf\include\flash_map_pm.h&amp;nbsp;&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/pastedimage1731331484638v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t see&amp;nbsp;slot0_flash and&amp;nbsp;slot1_flash being used anywhere in the SDK else except from the define of&amp;nbsp;them&amp;nbsp;in the CMakelist.txt you pointed to.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild builds MCUBoot before static partitions are pulled in</title><link>https://devzone.nordicsemi.com/thread/509557?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 19:01:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0aece06b-e889-4e1a-9ba5-33582b38c1f1</guid><dc:creator>timl2415</dc:creator><description>&lt;p&gt;Thanks for the response,&lt;/p&gt;
&lt;p&gt;Like you suggested, i modified the dts partition map&amp;nbsp;and mcuboot still jumped to the application address in my static partition map.&lt;/p&gt;
&lt;p&gt;I&amp;#39;d still like some assurance that slot0 and slot1 arent being used as well. The errors when slot0 and slot1 partition aren&amp;#39;t defined seem to be coming from bootloader/mcuboot/boot/zephyr/CmakeLists.txt on line 372 where there are some checks being on the slot partition sizes and flash r/w/e sizes. There are some cmake variables getting set in this code block. Can you confirm whether or not these checks are arbitrary and if the set variables are used elsewhere?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;if(SYSBUILD)
  function(align_up num align result)
    math(EXPR out &amp;quot;(((${num}) + ((${align}) - 1)) &amp;amp; ~((${align}) - 1))&amp;quot;)
    set(${result} &amp;quot;${out}&amp;quot; PARENT_SCOPE)
  endfunction()

  function(dt_get_parent node)
    string(FIND &amp;quot;${${node}}&amp;quot; &amp;quot;/&amp;quot; pos REVERSE)

    if(pos EQUAL -1)
      message(ERROR &amp;quot;Unable to get parent of node: ${${node}}&amp;quot;)
    endif()

    string(SUBSTRING &amp;quot;${${node}}&amp;quot; 0 ${pos} ${node})
    set(${node} &amp;quot;${${node}}&amp;quot; PARENT_SCOPE)
  endfunction()

  if(CONFIG_SINGLE_APPLICATION_SLOT OR CONFIG_BOOT_FIRMWARE_LOADER OR CONFIG_BOOT_SWAP_USING_SCRATCH OR CONFIG_BOOT_SWAP_USING_MOVE OR CONFIG_BOOT_UPGRADE_ONLY OR CONFIG_BOOT_DIRECT_XIP OR CONFIG_BOOT_RAM_LOAD)
    # TODO: RAM LOAD support
    dt_nodelabel(slot0_flash NODELABEL &amp;quot;slot0_partition&amp;quot;)
    dt_get_parent(slot0_flash)
    dt_get_parent(slot0_flash)

    if(NOT CONFIG_SINGLE_APPLICATION_SLOT)
      dt_nodelabel(slot1_flash NODELABEL &amp;quot;slot1_partition&amp;quot;)
      dt_get_parent(slot1_flash)
      dt_get_parent(slot1_flash)

      if(NOT &amp;quot;${slot0_flash}&amp;quot; STREQUAL &amp;quot;${slot1_flash}&amp;quot;)
        # Check both slots for the one with the largest write/erase block size
        dt_prop(erase_size_slot0 PATH &amp;quot;${slot0_flash}&amp;quot; PROPERTY &amp;quot;erase-block-size&amp;quot;)
        dt_prop(write_size_slot0 PATH &amp;quot;${slot0_flash}&amp;quot; PROPERTY &amp;quot;write-block-size&amp;quot;)
        dt_prop(erase_size_slot1 PATH &amp;quot;${slot1_flash}&amp;quot; PROPERTY &amp;quot;erase-block-size&amp;quot;)
        dt_prop(write_size_slot1 PATH &amp;quot;${slot1_flash}&amp;quot; PROPERTY &amp;quot;write-block-size&amp;quot;)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It seems like there should be documentation on the interaction between partition manager and sysbuild&amp;nbsp;in 2.7.0 (perhaps in the migration guide). I asked a similar question while working on 2.6.0 and I was told that devicetree partitions weren&amp;#39;t required to build MCUBoot.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112063/understanding-mcuboot-partition-management"&gt;Understanding MCUBoot partition management&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sysbuild builds MCUBoot before static partitions are pulled in</title><link>https://devzone.nordicsemi.com/thread/509463?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2024 13:15:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7001c151-ed14-4cf7-bfef-1e5d69308d1c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Timothy,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can find some discussion earlier about this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/112101/partition-manager-and-device-tree-partitions"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;My understanding is that the partitions defined in device tree and the partitions in pm_static.yml with partition manager are 2 differents system. As mentioned in the above ticket when you use partition manager the device tree&amp;#39;s partition become irrelevant. However, you can&amp;#39;t build without that. &lt;br /&gt;&lt;br /&gt;I would suggest to double check if modifying dts partition wouldn&amp;#39;t affect the location of MCUBoot or slot0 or slot1. I would assume they don&amp;#39;t&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As mentioned in the ticket, we hope in the future it would be more clean and better align between Zephyr upstream and nRF Connect SDK.&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>