<?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>Reducing Flash Occupancy</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/87097/reducing-flash-occupancy</link><description>Hi, 
 
 We came close to occupying all available flash memory in the nRF52833 board: 
 Memory region Used Size Region Size %age Used FLASH: 185620 B 187904 B 98.78% SRAM: 37832 B 128 KB 28.86% IDT_LIST: 0 GB 2 KB 0.00% 
 After a lot of optimizations we</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 21 Apr 2022 11:37:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/87097/reducing-flash-occupancy" /><item><title>RE: Reducing Flash Occupancy</title><link>https://devzone.nordicsemi.com/thread/364205?ContentTypeID=1</link><pubDate>Thu, 21 Apr 2022 11:37:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b2994c2-6f7e-402b-86ef-db5252e3493d</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;The only change you need for this in your config is to set&amp;nbsp;&lt;code&gt;CONFIG_SECURE_BOOT=n&lt;/code&gt; (or just remove it&amp;nbsp;as n is default).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing Flash Occupancy</title><link>https://devzone.nordicsemi.com/thread/363958?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 13:22:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80f63d91-0e97-452d-a44f-9d227837d09c</guid><dc:creator>Vitaliy Freidovich</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is already configured that way in&amp;nbsp;our project, with&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BOOTLOADER_MCUBOOT,&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;and still we get both both b0 and MCUboot.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s&amp;nbsp;the full prj.conf:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
CONFIG_HEAP_MEM_POOL_SIZE=256

# BT configuration
CONFIG_BT=y
#CONFIG_BT_DEBUG_LOG=y
CONFIG_BT_SMP=y
CONFIG_BT_SIGNING=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DIS=n
CONFIG_BT_ATT_PREPARE_COUNT=5
CONFIG_BT_BAS=n
CONFIG_BT_HRS=n
CONFIG_BT_PRIVACY=y
CONFIG_BT_DEVICE_NAME=&amp;quot;Dride-4K&amp;quot;
CONFIG_BT_DEVICE_APPEARANCE=833
CONFIG_BT_DEVICE_NAME_DYNAMIC=y
CONFIG_BT_DEVICE_NAME_MAX=128
CONFIG_BT_KEYS_OVERWRITE_OLDEST=y
CONFIG_BT_SETTINGS=y
# FOR FOTA
CONFIG_BT_L2CAP_TX_MTU=252
CONFIG_BT_BUF_ACL_RX_SIZE=256

CONFIG_FLASH=y
CONFIG_SETTINGS=y

# FOTA settings
CONFIG_BOOTLOADER_MCUBOOT=y
CONFIG_SECURE_BOOT=y
CONFIG_MCUMGR=y
CONFIG_MCUMGR_CMD_OS_MGMT=y
CONFIG_MCUMGR_CMD_IMG_MGMT=y
CONFIG_MCUMGR_SMP_BT=y
CONFIG_MCUMGR_SMP_BT_AUTHEN=n

CONFIG_IMG_MANAGER=y

CONFIG_NRFX_TEMP=y

CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_USE_RUNTIME_CONFIGURE=y
CONFIG_ADC=y&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;What am I missing?&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing Flash Occupancy</title><link>https://devzone.nordicsemi.com/thread/363943?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 12:57:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57eefece-df87-418f-a603-97aefd292913</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;You cans see details about that under &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bootloader_adding.html#adding-mcuboot-as-an-immutable-bootloader"&gt;Adding MCUboot as an immutable bootloader&lt;/a&gt;. (As you are starting off with a configuration with both&amp;nbsp;&lt;span&gt;B0 (nRF Secure Immutable Bootloader) and MCUboot as upgradable bootloader it is mostly a matter of removing configurations in practice).&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing Flash Occupancy</title><link>https://devzone.nordicsemi.com/thread/363926?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 12:37:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c889896e-af20-45fd-a28b-d70a5a076365</guid><dc:creator>Vitaliy Freidovich</dc:creator><description>&lt;p&gt;Thanks Einar for the detailed response!&lt;br /&gt;How can the MCUboot be configured as the immutable, single slot bootloader?&lt;br /&gt;I did not find any documentation about it.&lt;br /&gt;&lt;br /&gt;Thanks!&lt;br /&gt;Vitaliy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Reducing Flash Occupancy</title><link>https://devzone.nordicsemi.com/thread/363900?ContentTypeID=1</link><pubDate>Wed, 20 Apr 2022 12:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67fbceb6-e647-4af7-9e7e-1c7570e34009</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Vitaliy,&lt;/p&gt;
[quote user=""]1. Can we drop bo?[/quote]
&lt;p&gt;Yes, you can drop B0 (nRF Secure Immutable Bootloader). In that case the MCUBoot will have to be the immutable bootloder, so you will not have a upgradable MCUBoot (see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_bootloader.html#ug-bootloader"&gt;Secure bootloader chain&lt;/a&gt;).&lt;/p&gt;
[quote user=""]2. Is there a way to drop the secondary slot of MCUboot?[/quote]
&lt;p&gt;Yes, when you drop the&amp;nbsp;nRF Secure Immutable Bootloader and use only MCUBoot as immutable bootloader there is no need for a secondary slot for MCUBoot (so you save another 48 kB).&lt;/p&gt;
[quote user=""]3. Are there any additional optimizations we can make?[/quote]
&lt;p&gt;The above are the main flash usage optimizations you can do with regards to DFU architecture. For other memory optimizations you can refer to &lt;a href="https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/memory-optimization-with-the-nrf-connect-sdk"&gt;Memory Optimization with the nRF Connect SDK&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>