<?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>MCUBoot flash offset</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70440/mcuboot-flash-offset</link><description>Hi, 
 I&amp;#39;m working on the bootloader part of a project. Using nrf Connect, the integrated MCUBoot bootloader, trying to figure out how all the parts fit together. Running into something I can&amp;#39;t quite find back in the documentation. 
 For me FLASH_AREA_OFFSET</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Jan 2021 15:43:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70440/mcuboot-flash-offset" /><item><title>RE: MCUBoot flash offset</title><link>https://devzone.nordicsemi.com/thread/289274?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 15:43:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c7ed1b3-8889-4194-8b38-3bf613ee20fc</guid><dc:creator>basvkesteren</dc:creator><description>&lt;p&gt;Hi Shaney,&lt;/p&gt;
&lt;p&gt;Thanks again! You&amp;#39;re totally right, this is not the first time I&amp;#39;m lost in the documentation. There&amp;#39;s a lot of it, but a lot doesn&amp;#39;t apply (because it outdated, or doesn&amp;#39;t apply due to some configuration which isn&amp;#39;t mentioned), and an overall &amp;#39;how everything fits together&amp;#39; document seems to be missing.&lt;/p&gt;
&lt;p&gt;Anyway, trick seems to be to use a static layout; now the build picks up my pm_static.yml, yay &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot flash offset</title><link>https://devzone.nordicsemi.com/thread/289265?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 15:04:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ce70175-2935-413d-8fa2-25c9f736514a</guid><dc:creator>Shaney</dc:creator><description>&lt;p&gt;Here is some additional reading that also help me.&lt;br /&gt;&lt;br /&gt;Thread about pm.yml:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/65528/nrf9160-defining-extra-flash-partition"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/65528/nrf9160-defining-extra-flash-partition&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Using nordics PM requires some additional mcuconfig. Here is a thread on how to add a .conf for mcuboot without touching the stuff in the zephyr tree:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/66210/change-mcuboot_menuconfig-configuration/270799#270799"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/66210/change-mcuboot_menuconfig-configuration/270799#270799&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Additionally, you have fallen in the same trap I did. The MCUBoot documentation is only valid if you run &amp;quot;pure&amp;quot; zephyr, i.e. not NCS. Since NCS uses Partition Manager all documenation regarding MCUBoot and .dts is not usable. Atleast what I have found in my research.&lt;/p&gt;
&lt;p&gt;Here is an example pm_static based upon my project.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;mcuboot:
  address: &amp;lt;mcuboot start&amp;gt;
  size: &amp;lt;mcuboot size&amp;gt;
  region: flash_primary -- change this to the flash of your choice
mcuboot_pad:
  address: &amp;lt;pad start&amp;gt;
  size: &amp;lt;pad size, I go with 0x200&amp;gt;
  region: flash_primary
mcuboot_primary:
  region: flash_primary -- change this to the flash of your choice
  address: &amp;lt;main app image start&amp;gt;
  size: &amp;lt;main app image size&amp;gt;
  span: [mcuboot_pad, app]
mcuboot_secondary:
  address: &amp;lt;start of secondary app image&amp;gt;
  size: &amp;lt;size&amp;gt;
  region: flash_primary -- change this to the flash of your choice
mcuboot_scratch:
  address: &amp;lt;start&amp;gt;
  size: &amp;lt;size&amp;gt;
  region: flash_primary -- change this to the flash of your choice
--Use this if you need a littleFS 
littlefs_storage:
  address:&amp;lt;start&amp;gt;
  size: &amp;lt;size&amp;gt;
  region: external_flash
-- this partition I think is required if you run openthread 
--since it needs to store some settings in flash
settings_storage:
  address: &amp;lt;start&amp;gt;
  size: &amp;lt;size&amp;gt;
  region: flash_primary&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot flash offset</title><link>https://devzone.nordicsemi.com/thread/289255?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 14:31:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b05f4912-8964-44a9-8035-a41137679561</guid><dc:creator>basvkesteren</dc:creator><description>&lt;p&gt;Hrm, I&amp;#39;m lost again.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve created a pm.yml in my project folder, but it looks like it&amp;#39;s ignored.&lt;/p&gt;
&lt;p&gt;According to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html&lt;/a&gt; pm.yml is only used for &amp;#39;child images&amp;#39;. And, according to &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html#ug-multi-image"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_multi_image.html#ug-multi-image&lt;/a&gt; the application is the &amp;#39;parent image&amp;#39;, and the bootloader the &amp;#39;child image&amp;#39;. &lt;/p&gt;
&lt;p&gt;Last page says that a parent image doesn&amp;#39;t need a layout, because that&amp;#39;s implied by the child images. So, that means I need to configure the partition manager for the bootloader (the &amp;#39;child image&amp;#39;). How do I do that?&lt;/p&gt;
&lt;p&gt;To confuse me some more, according to this one the dts _is_ used when using mcuboot: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/readme-zephyr.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/mcuboot/readme-zephyr.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot flash offset</title><link>https://devzone.nordicsemi.com/thread/289164?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 11:33:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dde27c5-6baf-4d1c-b3ba-351f418ff556</guid><dc:creator>basvkesteren</dc:creator><description>&lt;p&gt;You might be right there &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;When CONFIG_BOOTLOADER_MCUBOOT=y, changing the flash layout in the dts does not change the FLASH_AREA_OFFSET(image_1) return value.&lt;/p&gt;
&lt;p&gt;Yay for documentation.... Anyway, thanks, i&amp;#39;ll start reading up on the partition manager.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MCUBoot flash offset</title><link>https://devzone.nordicsemi.com/thread/289133?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 10:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a1bc5b-576a-40df-8508-2ddbf2a18b01</guid><dc:creator>Shaney</dc:creator><description>&lt;p&gt;AFAIK when using NCS you don&amp;#39;t define the partitions in the .dts. Instead you use Nordics own partition manager and define the partitions by creating a pm.ym (dynamic) or pm_static.yml (static) and placing them in your project folder. You can see your current partitions under build/partitons.yml. This file is also a great start for defining your own partition file.&lt;br /&gt;&lt;br /&gt;I found this article helpful when I set up my partitions.&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>