<?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>Flash usage</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93912/flash-usage</link><description>Hi I hope you can help me with this. 
 I&amp;#39;m using a nrf52833. When I build I see Flash usage of 278044 B. 
 Regions Size 512KB. 
 My custom board has this in the Flash0 settion of the dts. 
 
 Which looks like this thanks to the VScode stuff. 
 
 It appears</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Nov 2022 08:24:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93912/flash-usage" /><item><title>RE: Flash usage</title><link>https://devzone.nordicsemi.com/thread/396345?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 08:24:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d57105d-2a3c-42c0-a0d8-a1dde46c65b1</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;OMG I just found it. Lol.&lt;/p&gt;
&lt;p&gt;In Build and Link Features-&amp;gt;Compiler Options-&amp;gt;Optimization level (this was a drop down that I didn&amp;#39;t notice somehow)&lt;/p&gt;
&lt;p&gt;I think that&amp;#39;s all I needed. THANKS&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash usage</title><link>https://devzone.nordicsemi.com/thread/396344?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 08:21:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4bf6b9f3-cdd9-40f6-9300-5bd0b30e29d3</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;Thanks. I hoped there was a complete guide but this is good. I will figure out the .conf settings.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How do I set the compiler to generate release mode code? Minimal size, or maximal speed. I assume its set to &amp;quot;debug&amp;quot; somewhere but I can&amp;#39;t see it in Kconfig (which is where I assumed it was)&lt;/p&gt;
&lt;p&gt;Thanks for your help (again!)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash usage</title><link>https://devzone.nordicsemi.com/thread/395977?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 12:52:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d29a6e4f-e145-4f4f-b7da-5c06c1ce37bc</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can remove mcuboot if you do not need dfu, this will go a long way to solve any flash space issues you are having. Remove CONFIG_BOOTLOADER_MCUBOOT=y or set CONFIG_BOOTLOADER_MCUBOOT=n.&lt;/p&gt;
&lt;p&gt;For configuring build modes, please see&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html#gs-modifying-build-types"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html#gs-modifying-build-types&lt;/a&gt;&amp;nbsp;and let me know if you have any questions regarding the instructions.&lt;/p&gt;
&lt;p&gt;For suggestions to release mode configurations, you may find it useful to compare the non-release and release configurations found in nrf/applications/nrf_desktop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash usage</title><link>https://devzone.nordicsemi.com/thread/395903?ContentTypeID=1</link><pubDate>Wed, 16 Nov 2022 07:37:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8a53eaf6-7bb5-4f9f-a3d2-e12f0554e620</guid><dc:creator>Jason</dc:creator><description>&lt;p&gt;I changed my dts to look like this and it seems to work fine. I&amp;#39;m not sure if I might have inadvertently broken something&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;
&amp;amp;flash0 {
	partitions {
		compatible = &amp;quot;fixed-partitions&amp;quot;;
		#address-cells = &amp;lt;1&amp;gt;;
		#size-cells = &amp;lt;1&amp;gt;;

		slot0_partition: partition@0 {
			label = &amp;quot;image-0&amp;quot;;
			reg = &amp;lt;0x0 0x47000&amp;gt;;
		};

		storage_partition: partition@47000 {
			label = &amp;quot;storage&amp;quot;;
			reg = &amp;lt;0x47000 0x39000&amp;gt;;
		};
	};
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m concerned that my ROM is &amp;gt;200K but I&amp;#39;m using experimental features for&amp;nbsp;changing the TX power.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_BT_LL_SW_SPLIT=y                             #I want to switch this off
CONFIG_BT_CTLR_ADVANCED_FEATURES=y  &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I believe this is unnecessary in the newer version (I&amp;#39;m still on 2.0.2 because my SPI code breaks because of something deprecated in 2.1.0 onwards.) I can see that LL_SW folder in the memory report is &amp;gt;90KB.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m working on adding a release_mode.conf with these extra CONFIG options&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;
CONFIG_RESET_ON_FATAL_ERROR=y

# Disable all debug features
CONFIG_SHELL=n
CONFIG_OPENTHREAD_SHELL=n
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_LOG=n
CONFIG_LOG_MODE_MINIMAL=n
CONFIG_ASSERT_VERBOSE=n
CONFIG_PRINTK=n
CONFIG_PRINTK_SYNC=n
CONFIG_THREAD_NAME=n
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure how to make the compiler code generation release mode though. And I would still like to find a guide that shows me how to build a proper release mode build with all the stuff that I might have overlooked (because it&amp;#39;s goign to be needed soon)&lt;/p&gt;
&lt;p&gt;Thanks for your help&lt;/p&gt;
&lt;p&gt;-Jason&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>