<?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 DFU to Peripheral UART example (NCS 2.9.0) - Flash Overflowed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/119891/adding-dfu-to-peripheral-uart-example-ncs-2-9-0---flash-overflowed</link><description>Hello, 
 I have an application that I have been working on that was based off of the peripheral_uart example that I am using with the nRF52832. I was trying to see if I can add DFU support. To add DFU support, I followed steps from the Lesson 9, Exercise</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Mar 2025 14:17:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/119891/adding-dfu-to-peripheral-uart-example-ncs-2-9-0---flash-overflowed" /><item><title>RE: Adding DFU to Peripheral UART example (NCS 2.9.0) - Flash Overflowed</title><link>https://devzone.nordicsemi.com/thread/527870?ContentTypeID=1</link><pubDate>Tue, 18 Mar 2025 14:17:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7971cac-a323-4214-afc8-43420b2e3ef3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can reduce the size of the bootloader to free up more space for the MCUBoot slot pair. There was also a typo(?) in your Kconfig causing both NVS and ZMS to be enabled in your build which increased the overall flash usage.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="diff"&gt;diff --git a/Kconfig b/Kconfig
index 19fa53b..3025212 100644
--- a/Kconfig
+++ b/Kconfig
@@ -37,7 +37,7 @@ config SETTINGS
        default y
 
 config ZMS
-       default y if !(SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM)
+       default y if (SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM)^M
 
 config NVS
        default y if !(SOC_FLASH_NRF_RRAM || SOC_FLASH_NRF_MRAM)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;With the patch above and some configuration changes to MCUBoot, I was able to build your project and with some headroom left for the application.&lt;/p&gt;
&lt;p&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/pastedimage1742307324187v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Modified sample:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/peripheral_5F00_uart_5F005F00_ncs_5F00_2_5F00_9_5F00_mod.zip"&gt;devzone.nordicsemi.com/.../peripheral_5F00_uart_5F005F00_ncs_5F00_2_5F00_9_5F00_mod.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>