<?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>nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105121/nrf52833-flash-overflow-when-mcuboot-enabled</link><description>Hi, I&amp;#39;m using nrf connect SDK2.3.0, nrf52833 SOC, &amp;quot;peripheral_uart&amp;quot; and &amp;quot;central_uart&amp;quot; examples. Through the &amp;quot;peripheral_uart&amp;quot; example, I can do DFU by setting MCUBOOT as the bootloader. 
 However, when I enable MCUBOOT for &amp;quot;central_uart&amp;quot; example it displays</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Nov 2023 10:06:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105121/nrf52833-flash-overflow-when-mcuboot-enabled" /><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/455484?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 10:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ed92c90-6184-47d9-a611-3e2468af37de</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;Yes it&amp;#39;s 228820 bytes image size but the actual size needed is 224 pages (= 229376 bytes) because it need to be page aligned.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In addition as I said&amp;nbsp; you need an extra page to store the image trailer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not so sure why it need up to &lt;span&gt;237568&amp;nbsp;&lt;/span&gt;but I believe you need one extra page as swap page to copy image before swap.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I&amp;#39;m afraid you will need to make the image smaller.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that the primary slot has padding space, the actual slot size is&amp;nbsp;0x39e00 (mcuboot_primary_app).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/455470?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 09:37:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ebec837-dd3c-448c-98db-ec54597da51f</guid><dc:creator>Theja</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="126494" url="~/f/nordic-q-a/105121/nrf52833-flash-overflow-when-mcuboot-enabled/455453"]&amp;quot;Memory region Used Size Region Size %age Used&lt;br /&gt; FLASH: 228820 B 237056 B 96.53%&lt;br /&gt; RAM: 51364 B 128 KB 39.19%&lt;br /&gt; IDT_LIST: 0 GB 2 KB 0.00%&amp;quot;[/quote]
&lt;p&gt;You can see here it&amp;#39;s &lt;span&gt;228820 bytes only!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And one more thing Slot0 size is actually 237056 bytes not 232000 bytes(as per partition.yml).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/455454?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 08:33:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a8c3104-60f0-43c4-95a0-c60a81c2c4ee</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You would need to reduce it a little bit more, at least one page.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;228 kB = 228 * 1024 = 233472B.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The image requires one extra page for the image trailer ( to tell MCUBoot about the image). So you need to reduce the application a little bit more.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/455453?ContentTypeID=1</link><pubDate>Tue, 14 Nov 2023 08:11:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a93a5a27-125f-4c8d-9664-bbbe8655f9d2</guid><dc:creator>Theja</dc:creator><description>&lt;p&gt;Hi, thanks for your suggestion!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve managed to make the application 228 KB smaller than slot 0 (i.e 232 KB).&lt;/p&gt;
&lt;p&gt;However after DFU it&amp;#39;s still showing not enough size and prints like this&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;14-11-2023 13:12:08.303 [RX] - I: Starting swap using move algorithm.&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&lt;br /&gt;W: Not enough free space to run swap upgrade&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&lt;br /&gt;W: required 237568 bytes but only 233472 are available&amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;and also, when the program is being built, it only displays 228 kb.&lt;/p&gt;
&lt;p&gt;These are my build prints,&lt;/p&gt;
&lt;p&gt;&amp;quot;Memory region Used Size Region Size %age Used&lt;br /&gt; FLASH: 228820 B 237056 B 96.53%&lt;br /&gt; RAM: 51364 B 128 KB 39.19%&lt;br /&gt; IDT_LIST: 0 GB 2 KB 0.00%&amp;quot;&lt;/p&gt;
&lt;p&gt;partition.yml file from build is added for extra details.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;app:
  address: 0xc200
  end_address: 0x46000
  region: flash_primary
  size: 0x39e00
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: 0x46000
  orig_span: &amp;amp;id001
  - app
  - mcuboot_pad
  region: flash_primary
  sharers: 0x1
  size: 0x3a000
  span: *id001
mcuboot_primary_app:
  address: 0xc200
  end_address: 0x46000
  orig_span: &amp;amp;id002
  - app
  region: flash_primary
  size: 0x39e00
  span: *id002
mcuboot_secondary:
  address: 0x46000
  end_address: 0x80000
  placement:
    after:
    - mcuboot_primary
    align:
      start: 0x1000
    align_next: 0x1000
  region: flash_primary
  share_size:
  - mcuboot_primary
  size: 0x3a000
sram_primary:
  address: 0x20000000
  end_address: 0x20020000
  region: sram_primary
  size: 0x20000
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/454720?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2023 14:34:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ab07846-ce13-4973-a556-baef40387463</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you looked my suggestion ?&amp;nbsp;&lt;br /&gt;You can&amp;#39;t simply change the partition size to over come this problem. It&amp;#39;s the physical size of flash on the NRF52833 is not enough.&amp;nbsp;&lt;br /&gt;You need to either try to reduce the size of the application flash, or you use external flash to receive image. Or you can switch to nRF52840 which has 1MB of flash.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/454674?ContentTypeID=1</link><pubDate>Wed, 08 Nov 2023 13:05:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b46570bd-99da-4374-8c85-f0a0d6fa3650</guid><dc:creator>Theja</dc:creator><description>&lt;p&gt;Yes, the size of my application exceeds the image size allotted for it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Even after changing the slot 0 and slot 1 partition size in dts file it&amp;#39;s not reflecting in partition.yml file in build folder,&lt;/p&gt;
&lt;p&gt;So, am I altering at the appropriate place? If not,&amp;nbsp;where should I&amp;nbsp;change?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/452777?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 11:54:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:602399c5-6fea-410d-b23f-36c77e939c0c</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;@thejakumar: Pleas follow what Wisph suggested, your &lt;span&gt;central_uart application may have too large application image size to allow MCUBoot to allocate into the&amp;nbsp;mcuboot_primary_app partition.&amp;nbsp;&lt;br /&gt;You can find the size of it in the partitions.yml file in build folder.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You may need to consider to move to a larger chip (nRF52840) or use external flash to receive image or to strip down the application to reduce the size of it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52833 Flash overflow when mcuboot enabled</title><link>https://devzone.nordicsemi.com/thread/452732?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 08:25:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5f480e9-179e-4b2f-9991-34b7d637ee5e</guid><dc:creator>wisph</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I ran into something simulair a while back, in my case the image was simply too big for the reserved partition.&lt;/p&gt;
&lt;p&gt;Check your partition-config, and see if you can (temp) reduce your image size.&lt;/p&gt;
&lt;p&gt;Grts,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>