<?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>How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file</link><description>Hello, 
 I have modified the central_uart example to make the nRF52832 communicate with an ESP32 in MessagePack. After having disabled the logger configuration in the proj.conf file the size of the *.bin file is 225.8 kB which is too large for an nRF52805</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Sep 2023 11:53:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file" /><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445832?ContentTypeID=1</link><pubDate>Wed, 13 Sep 2023 11:53:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bfa9ff1c-6a18-4c80-b8a6-cf5d3b8f0ff1</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Oh, awesome! So glad to hear you got it going and thank you for letting me know. We have a joke around here about, &amp;quot;So what was the problem?&amp;quot;... &amp;quot;The software was only doing what I told it to do, so it wasn&amp;#39;t behaving correctly... stupid thing, it should have known better&amp;quot; lol.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have a great day too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445553?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 08:37:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f289aee-a53f-4269-b2ba-8809ef72c79d</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Good Morning James,&lt;/p&gt;
&lt;p&gt;I thought I ought to let you know how it all unfolded ...&lt;/p&gt;
&lt;p&gt;It was a silly mistake from my part when I switched from using sscanf() to strtol().&amp;nbsp; I was calling strtol() with the wrong number of parameters and I was ignoring the compiler warning &amp;quot;Implicit definition of function...&amp;quot;. Once I fixed this the problem disappeared.&lt;/p&gt;
&lt;p&gt;long strtol(const char *nptr)&lt;/p&gt;
&lt;p&gt;instead of&amp;nbsp;&lt;/p&gt;
&lt;p&gt;long strtol(const char *nptr, char **endptr, register int base)&lt;/p&gt;
&lt;p&gt;In fact, I am now using atoi() because it is more appropriate in my case.&lt;/p&gt;
&lt;p&gt;Morale: Get rid of all warnings first!&lt;/p&gt;
&lt;p&gt;Thank you for your help. Have a great day!&lt;/p&gt;
&lt;div&gt;Kind regards&lt;/div&gt;
&lt;div&gt;Mohamed&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445205?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 16:55:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d72e2d6-a078-4776-b164-f837c97134b5</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Have a great day!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445204?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 16:48:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6340ffb-0155-46ef-8453-b50a293ffcd1</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Read a similar situation here:&amp;nbsp;&lt;a id="" href="https://stackoverflow.com/questions/52234155/what-can-cause-an-arm-memmanage-exception-with-all-bits-in-the-mmsfr-register-ze"&gt;https://stackoverflow.com/questions/52234155/what-can-cause-an-arm-memmanage-exception-with-all-bits-in-the-mmsfr-register-ze&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m heading out for the day, best of luck on your hunt.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445203?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 16:43:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72896077-f83b-4425-ae48-05c997a5d8cf</guid><dc:creator>Learner</dc:creator><description>[quote userid="117767" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/445200"]something is definitely getting called outside of memory bounds.[/quote]
&lt;p&gt;Not sure what you mean.&lt;/p&gt;
[quote userid="117767" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/445200"]Do you have any callbacks?[/quote]
&lt;p&gt;Yes, mainly BLE&amp;nbsp;&lt;/p&gt;
[quote userid="117767" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/445200"]If so, is there a null one somewhere?[/quote]
&lt;p&gt;What do you mean?&lt;/p&gt;
&lt;p&gt;But the last known code address in the call stack prior to the crash is 0x2000440c which corresponds to the address of the inpuBuffer[] I mentioned earlier. You don&amp;#39;t think this anything to do with accessing this buffer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445200?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 16:23:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d581139-9475-405c-ba66-30e283e81b95</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;MemManage Exception. I have a hunch that something is definitely getting called outside of memory bounds. Do you have any callbacks? If so, is there a null one somewhere? It&amp;#39;s so hard to tell from the screenshot what that could be though. Are you able to share the source code to this or source code that can reproduce it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445198?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 16:11:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a664c32-f469-429e-b5a6-01d4867bb294</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Hi James,&lt;/p&gt;
&lt;p&gt;Ozone is pointing to this static buffer @ address 0x2000440C&lt;/p&gt;
&lt;div&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;#define CONSOLEDRV_INPUT_BUFFER_SIZE ((uint8_t)100) /**&amp;lt; The maximum number of bytes that can be read */&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;static char inputBuffer[CONSOLEDRV_INPUT_BUFFER_SIZE]; /**&amp;lt; The console input buffer */&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;This buffer is used in the implementation of a BLE console.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;Level, Function,Stack Frame,Source,PC,Return Address,Stack Used&lt;br /&gt;0,&amp;quot;&amp;lt;MemManage Exception&amp;gt;&amp;quot;,&amp;quot;32 @ 0x2000CA60&amp;quot;,&amp;quot;fault_s.S:80&amp;quot;,0x00017330,&amp;quot;[0x2000CA78]: 0x20004410&amp;quot;,32&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;0,&amp;quot;@ 2000?440C&amp;quot;,&amp;quot; 0 @ 0x2000CA80&amp;quot;,,0x2000440C,&amp;quot;&amp;lt;no symbols&amp;gt;&amp;quot;,&amp;quot; 0&amp;quot;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;0,&amp;quot;Top of stack - no unwinding symbols at 0x2000440C&amp;quot;,,,,,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;I am not sure what the two lines in red above are telling me. Am I running out of stack space?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;See attached screen capture showing the call stack.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Ozone_5F00_dbg.PNG" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Kind regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Mohamed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445187?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 15:24:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a6912c-5633-49db-bef5-8871a3e71fc2</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Yes, I have the same definition in my zephyr.dts file.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445176?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 14:31:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96078f13-88b1-4abf-95be-45dc9a9b2213</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Here is the definition for it:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;config UART_CONSOLE
	bool &amp;quot;Use UART for console&amp;quot;
	depends on SERIAL &amp;amp;&amp;amp; SERIAL_HAS_DRIVER
	select CONSOLE_HAS_DRIVER
	help
	  Enable this option to use one UART for console.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So it&amp;#39;s possible that the console isn&amp;#39;t defined. I would check the dts file and see if it&amp;#39;s defined there. Here is a snippit of what I use. We use a custom board that&amp;#39;s based on the nRF52840 SoC, but it should be the same for yours as well. I&amp;#39;m not 100% sure if this is the issue, but I would try this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/ {
    chosen {
        zephyr,console = &amp;amp;uart0;
    };
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you&amp;#39;re using the DK and it&amp;#39;s not defined, then you can always add it to your overlay file (or create an overlay file).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445171?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 14:21:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a658b21e-ba82-476a-aa2e-b00920e9b8e8</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Thank you James for the valuable pointers.&lt;/p&gt;
[quote userid="117767" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/445149"]UART_CONSOLE requires that CONFIG_SERIAL is enabled, do you have that enabled?[/quote]
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;No, it is not. This is because of a hardware constraint I think.&lt;/div&gt;
#CONFIG_UART_CONSOLE=n&lt;/div&gt;
&lt;div&gt;CONFIG_SERIAL=n&lt;/div&gt;
&lt;div&gt;Notice, UART_CONSOLE is commented out in my prj.conf. Does it default to &amp;#39;y&amp;#39; or &amp;#39;n&amp;#39;?&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
[quote userid="117767" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/445149"]Another idea is to try and use Ozone. [/quote]
&lt;p&gt;Ozone was going to be my next move because SES does not support data breakpoints.&lt;/p&gt;
&lt;p&gt;I Will keep you posted.&lt;/p&gt;
&lt;div&gt;Kind regards&lt;/div&gt;
&lt;div&gt;Mohamed&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445149?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 12:59:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cf12d19-1ef2-4879-b7eb-95a7f9fc1e01</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;&lt;span&gt;Hey Mohamed,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hope your morning is going well. I would start by getting rid of the compiler warnings. You can remove CONFIG_NEWLIB_LIBC_FLOAT_PRINTF since you&amp;#39;re using the minimal library now.&amp;nbsp;UART_CONSOLE requires that CONFIG_SERIAL is enabled, do you have that enabled? I&amp;#39;m not sure about the I2C one. Those won&amp;#39;t resolve your issues, but it&amp;#39;s always good to have a clean compile.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Another idea is to try and use Ozone. When you run your code from Ozone it will give you a stack trace when it crashes. This may point to where to core issue lies. You can also set a breakpoint on the address where it&amp;#39;s faulting, you can look at the disassembly where that address is to pinpoint where it&amp;#39;s crashing, etc. Ozone has helped me figure a lot of obscure bugs out. You should also be able to step through your code, which is always helpful. It&amp;#39;s very simple to setup in VS Code, but I&amp;#39;m not sure about SES since I don&amp;#39;t use it. Also, it should give you a free license since you&amp;#39;re using Nordic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;As mentioned, I unfortunately&amp;nbsp;do not use SES (I use VS Code). I would try the above and see what happens. If that doesn&amp;#39;t work I would open a new ticket and then hopefully a Nordic engineer can jump on and give some ideas too. A lot of people may not be seeing this since the original question was answered and we&amp;#39;re buried in the depths of comment land.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445117?ContentTypeID=1</link><pubDate>Fri, 08 Sep 2023 11:01:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:404438f5-ff06-42ab-83cf-d583082e463f</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Hi James,&lt;/p&gt;
&lt;p&gt;Thank you for the tips on stack analysis.&lt;/p&gt;
&lt;p&gt;When I added the stack config items you suggested I got this error when loading the project in Segger Embedded Studio (SES) v5.60. Note, I am using zephyr v1.7.0.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;error: cmake failed&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;&lt;span style="color:#ff0000;"&gt;create_nordic_project.py failed (1)&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;So, I removed them and started adding one at the time and the first one that triggered the error was&amp;nbsp;CONFIG_SCHED_THREAD_USAGE=y, these other two also caused the same error, &lt;/span&gt;&lt;span style="font-size:inherit;"&gt;CONFIG_THREAD_ANALYZER_USE_LOG=y&lt;br /&gt;CONFIG_THREAD_ANALYZER_ISR_STACK_USAGE=y&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;So, this is the config I am using for stack analysis,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;### THREAD STACK ANALYSIS - start ###&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;#&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_ANALYZER=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;#CONFIG_THREAD_ANALYZER_USE_PRINTK=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_ANALYZER_AUTO=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_ANALYZER_AUTO_INTERVAL=5&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_ANALYZER_AUTO_STACK_SIZE=2048&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_NAME=y&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;#CONFIG_INIT_STACKS=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_STACK_INFO=y&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CONFIG_RESET_ON_FATAL_ERROR=n&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;#CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=8192&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_MONITOR=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_RUNTIME_STATS=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;#CONFIG_SCHED_THREAD_USAGE=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;#CONFIG_SCHED_THREAD_USAGE_ALL=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;CONFIG_THREAD_ANALYZER_USE_LOG=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;#CONFIG_THREAD_ANALYZER_ISR_STACK_USAGE=y&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;#&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;### THREAD STACK ANALYSIS - end ###&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;The complete trace leading up to the error is shown below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Back to the &lt;strong&gt;MPU FAULT&lt;/strong&gt; crash, the stack analysis is not showing much because up until just before the crash occurs the stack usage looks good then the crash occurs and the program breaks in &lt;strong&gt;fault_s.S &lt;/strong&gt;before the stack analyser had a chance to display its statistics.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;See trace from SES&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;*** First, &lt;strong&gt;before&lt;/strong&gt; BLE activity starts,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-size:75%;"&gt;[00:01:00.071,136] &amp;lt;inf&amp;gt; thread_analyzer: Thread analyze:&lt;br /&gt;[00:01:00.071,441] &amp;lt;inf&amp;gt; thread_analyzer: thread_analyzer : STACK: unused 1788 usage 260 / 2048 (12 %); CPU: 0 %&lt;br /&gt;[00:01:00.072,143] &amp;lt;inf&amp;gt; thread_analyzer: sysworkq : STACK: unused 3936 usage 160 / 4096 (3 %); CPU: 0 %&lt;br /&gt;[00:01:00.072,204] &amp;lt;inf&amp;gt; thread_analyzer: logging : STACK: unused 264 usage 504 / 768 (65 %); CPU: 0 %&lt;br /&gt;[00:01:00.072,265] &amp;lt;inf&amp;gt; thread_analyzer: idle 00 : STACK: unused 248 usage 72 / 320 (22 %); CPU: 99 %&lt;br /&gt;[00:01:00.073,425] &amp;lt;inf&amp;gt; thread_analyzer: main : STACK: unused 7408 usage 784 / 8192 (9 %); CPU: 0 %&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-size:75%;"&gt;[00:01:05.073,516] &amp;lt;inf&amp;gt; thread_analyzer: Thread analyze:&lt;br /&gt;[00:01:05.073,822] &amp;lt;inf&amp;gt; thread_analyzer: thread_analyzer : STACK: unused 1788 usage 260 / 2048 (12 %); CPU: 0 %&lt;br /&gt;[00:01:05.074,462] &amp;lt;inf&amp;gt; thread_analyzer: sysworkq : STACK: unused 3936 usage 160 / 4096 (3 %); CPU: 0 %&lt;br /&gt;[00:01:05.074,523] &amp;lt;inf&amp;gt; thread_analyzer: logging : STACK: unused 264 usage 504 / 768 (65 %); CPU: 0 %&lt;br /&gt;[00:01:05.074,584] &amp;lt;inf&amp;gt; thread_analyzer: idle 00 : STACK: unused 248 usage 72 / 320 (22 %); CPU: 99 %&lt;br /&gt;[00:01:05.075,775] &amp;lt;inf&amp;gt; thread_analyzer: main : STACK: unused 7408 usage 784 / 8192 (9 %); CPU: 0 %&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-size:75%;"&gt;[00:01:10.075,836] &amp;lt;inf&amp;gt; thread_analyzer: Thread analyze:&lt;br /&gt;[00:01:10.076,141] &amp;lt;inf&amp;gt; thread_analyzer: thread_analyzer : STACK: unused 1788 usage 260 / 2048 (12 %); CPU: 0 %&lt;br /&gt;[00:01:10.076,782] &amp;lt;inf&amp;gt; thread_analyzer: sysworkq : STACK: unused 3936 usage 160 / 4096 (3 %); CPU: 0 %&lt;br /&gt;[00:01:10.076,843] &amp;lt;inf&amp;gt; thread_analyzer: logging : STACK: unused 264 usage 504 / 768 (65 %); CPU: 0 %&lt;br /&gt;[00:01:10.076,904] &amp;lt;inf&amp;gt; thread_analyzer: idle 00 : STACK: unused 248 usage 72 / 320 (22 %); CPU: 99 %&lt;br /&gt;[00:01:10.078,094] &amp;lt;inf&amp;gt; thread_analyzer: main : STACK: unused 7408 usage 784 / 8192 (9 %); CPU: 0 %&lt;br /&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;/strong&gt;*** Then &lt;strong&gt;after&lt;/strong&gt; BLE activity starts. Notice, the extra stack stats in blue. I am not suggesting the BLE activity is causing this crash.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-size:75%;"&gt;[00:02:15.370,788] &amp;lt;inf&amp;gt; thread_analyzer: Thread analyze:&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;font-size:75%;"&gt;[00:02:15.370,880] &amp;lt;inf&amp;gt; thread_analyzer: BT RX : STACK: unused 384 usage 640 / 1024 (62 %); CPU: 0 %&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;font-size:75%;"&gt;[00:02:15.370,941] &amp;lt;inf&amp;gt; thread_analyzer: BT RX pri : STACK: unused 208 usage 240 / 448 (53 %); CPU: 0 %&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0000ff;font-size:75%;"&gt;[00:02:15.371,215] &amp;lt;inf&amp;gt; thread_analyzer: BT TX : STACK: unused 240 usage 400 / 640 (62 %); CPU: 0 %&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:15.371,520] &amp;lt;inf&amp;gt; thread_analyzer: thread_analyzer : STACK: unused 1776 usage 272 / 2048 (13 %); CPU: 0 %&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:15.372,131] &amp;lt;inf&amp;gt; thread_analyzer: sysworkq : STACK: unused 2904 usage 1192 / 4096 (29 %); CPU: 16 %&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:15.372,222] &amp;lt;inf&amp;gt; thread_analyzer: logging : STACK: unused 264 usage 504 / 768 (65 %); CPU: 0 %&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:15.372,283] &amp;lt;inf&amp;gt; thread_analyzer: idle 00 : STACK: unused 248 usage 72 / 320 (22 %); CPU: 59 %&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:15.373,535] &amp;lt;inf&amp;gt; thread_analyzer: main : STACK: unused 7408 usage 784 / 8192 (9 %); CPU: 23 %&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;span style="font-size:75%;"&gt;[00:02:16.781,951] &amp;lt;inf&amp;gt; uart: UART RX processing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:16.782,043] &amp;lt;inf&amp;gt; uart: -&amp;gt; ProcessRxByte: 0x31&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:17.261,688] &amp;lt;inf&amp;gt; uart: UART RX processing&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;[00:02:17.261,779] &amp;lt;inf&amp;gt; uart: -&amp;gt; ProcessRxByte: 0x0D&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,358] &amp;lt;err&amp;gt; os: ***** MPU FAULT *****&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,358] &amp;lt;err&amp;gt; os: Instruction Access Violation&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,358] &amp;lt;err&amp;gt; os: r0/a1: 0x00000001 r1/a2: 0x00000003 r2/a3: 0x20009662&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,389] &amp;lt;err&amp;gt; os: r3/a4: 0x20009664 r12/ip: 0x20009662 r14/lr: 0x00000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,389] &amp;lt;err&amp;gt; os: xpsr: 0x21000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,389] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x2000440c&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,419] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 0: CPU exception on CPU 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.555,419] &amp;lt;err&amp;gt; os: Current thread: 0x20001ef0 (main)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;font-size:75%;"&gt;[00:03:06.959,045] &amp;lt;err&amp;gt; os: Halting system&lt;/span&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;This is proving to be a tricky bug to track down. Do you want to join in the fun?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Kind regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:inherit;"&gt;Mohamed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;Creating solution HomeBeacon_dev_sb.emProject&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;C:/Zypher/v1.7.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf52833dk_nrf52833 -DBOARD_DIR=C:\Zypher\v1.7.0\zephyr\boards\arm\nrf52833dk_nrf52833 -BC:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning -SC:\Sandbox\HomeBeacon_dev_sb -DNCS_TOOLCHAIN_VERSION=1.7.0 -DDTC_OVERLAY_FILE=C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Zypher\v1.7.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Application: C:/Sandbox/HomeBeacon_dev_sb&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Zephyr version: 2.6.99 (C:/Zypher/v1.7.0/zephyr), build: v2.6.99-ncs1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Found Python3: C:/Zypher/v1.7.0/toolchain/opt/bin/python.exe (found suitable exact version &amp;quot;3.8.2&amp;quot;) found components: Interpreter &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Found west (found suitable version &amp;quot;0.11.1&amp;quot;, minimum required is &amp;quot;0.7.1&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Board: nrf52833dk_nrf52833&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Cache files will be written to: C:/Zypher/v1.7.0/zephyr/.cache&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Found dtc: C:/Zypher/v1.7.0/toolchain/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Found toolchain: gnuarmemb (C:/Zypher/v1.7.0/toolchain/opt)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Found BOARD.dts: C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Found devicetree overlay: C:/Sandbox/HomeBeacon_dev_sb/nrf52833dk_nrf52833.overlay&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Generated zephyr.dts: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_v149_tuning/zephyr/zephyr.dts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Generated devicetree_unfixed.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_v149_tuning/zephyr/include/generated/devicetree_unfixed.h&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Generated device_extern.h: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_v149_tuning/zephyr/include/generated/device_extern.h&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Including generated dts.cmake file: C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_v149_tuning/zephyr/dts.cmake&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Parsing C:/Sandbox/HomeBeacon_dev_sb/Kconfig&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Loaded configuration &amp;#39;C:/Zypher/v1.7.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig&amp;#39;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Merged configuration &amp;#39;C:/Sandbox/HomeBeacon_dev_sb/prj_debug.conf&amp;#39;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Configuring incomplete, errors occurred!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Including boilerplate (Zephyr base): C:/Zypher/v1.7.0/zephyr/cmake/app/boilerplate.cmake&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;-- Using NCS Toolchain 1.7.0 for building. (C:/Zypher/v1.7.0/toolchain/cmake)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;warning: NEWLIB_LIBC_FLOAT_PRINTF (defined at C:/Zypher/v1.7.0/modules/lib/pelion-&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;dm/zephyr\Kconfig.pal:74, lib/libc/Kconfig:89) was assigned the value &amp;#39;y&amp;#39; but got the value &amp;#39;n&amp;#39;.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Check these unsatisfied dependencies: ((PELION_SOURCES &amp;amp;&amp;amp; PELION_CLIENT) || NEWLIB_LIBC) (=n). See&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;a href="http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_NEWLIB_LIBC_FLOAT_PRINTF.html"&gt;docs.zephyrproject.org/.../CONFIG_NEWLIB_LIBC_FLOAT_PRINTF.html&lt;/a&gt; and/or&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;look up NEWLIB_LIBC_FLOAT_PRINTF in the menuconfig/guiconfig interface. The Application Development&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Primer, Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;might be helpful too.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;warning: UART_CONSOLE (defined at drivers/console/Kconfig:47) was assigned the value &amp;#39;y&amp;#39; but got the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;value &amp;#39;n&amp;#39;. Check these unsatisfied dependencies: SERIAL (=n), SERIAL_HAS_DRIVER (=n). See&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;a href="http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_UART_CONSOLE.html"&gt;docs.zephyrproject.org/.../CONFIG_UART_CONSOLE.html&lt;/a&gt; and/or look up&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;UART_CONSOLE in the menuconfig/guiconfig interface. The Application Development Primer, Setting&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;too.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;warning: I2C_0 (defined at drivers/i2c/Kconfig.esp32:15) was assigned the value &amp;#39;y&amp;#39; but got the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;value &amp;#39;n&amp;#39;. Check these unsatisfied dependencies: I2C_ESP32 (=n). See&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;a href="http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_I2C_0.html"&gt;docs.zephyrproject.org/.../CONFIG_I2C_0.html&lt;/a&gt; and/or look up I2C_0 in the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;and Kconfig - Tips and Best Practices sections of the manual might be helpful too.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;C:/Sandbox/HomeBeacon_dev_sb/prj_debug.conf:180: warning: attempt to assign the value &amp;#39;y&amp;#39; to the undefined symbol SCHED_THREAD_USAGE&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;error: Aborting due to Kconfig warnings&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;CMake Error at C:/Zypher/v1.7.0/zephyr/cmake/kconfig.cmake:268 (message):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt; command failed with return code: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;Call Stack (most recent call first):&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt; C:/Zypher/v1.7.0/zephyr/cmake/app/boilerplate.cmake:554 (include)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt; C:/Zypher/v1.7.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt; C:/Zypher/v1.7.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt; CMakeLists.txt:34 (find_package)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;error: cmake failed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;create_nordic_project.py failed (1)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445005?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 18:08:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac9ebee9-6e09-484f-914d-d5d01e11ef43</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;You could also try setting these configs too, just to see where all of your stacks are at:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_THREAD_NAME=y
CONFIG_THREAD_MONITOR=y

CONFIG_THREAD_STACK_INFO=y
CONFIG_THREAD_RUNTIME_STATS=y
CONFIG_SCHED_THREAD_USAGE=y
CONFIG_SCHED_THREAD_USAGE_ALL=y
CONFIG_THREAD_ANALYZER=y
CONFIG_THREAD_ANALYZER_AUTO=y
CONFIG_THREAD_ANALYZER_USE_LOG=y
CONFIG_THREAD_ANALYZER_ISR_STACK_USAGE=y
CONFIG_THREAD_ANALYZER_AUTO_STACK_SIZE=2048&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445004?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 18:07:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f587017-ed5e-4da5-8790-74341c90aecb</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Hey Mohamed,&lt;/p&gt;
&lt;p&gt;Oh do I feel your pain! These are never fun to track down. I would increase your&amp;nbsp; CONFIG_MAIN_STACK_SIZE just to see if that&amp;#39;s it. Some times Zephyr will say stack overflow and other times it just throws exceptions like this one. It&amp;#39;s almost always a stack overflow.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/445003?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 18:04:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8857fb72-d64e-4b27-b632-95b319435c0c</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Hi James,&lt;/p&gt;
[quote userid="92434" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/444995"]I just hope I have not introduced another problem by switching from sscanf() to strtol().[/quote]
&lt;p&gt;Guess what! I have. Quite a fatal one.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;[00:20:07.178,344] &amp;lt;inf&amp;gt; uart: -&amp;gt; ProcessRxByte: 0x0D&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,461] &amp;lt;err&amp;gt; os: ***** MPU FAULT *****&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,461] &amp;lt;err&amp;gt; os: Instruction Access Violation&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,461] &amp;lt;err&amp;gt; os: r0/a1: 0x00000002 r1/a2: 0x00000003 r2/a3: 0x20009446&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,491] &amp;lt;err&amp;gt; os: r3/a4: 0x20009448 r12/ip: 0x20009446 r14/lr: 0x00000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,491] &amp;lt;err&amp;gt; os: xpsr: 0x21000000&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,491] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x200041f4&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,491] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 0: CPU exception on CPU 0&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.285,522] &amp;lt;err&amp;gt; os: Current thread: 0x20001d30 (main)&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;[00:23:21.664,062] &amp;lt;err&amp;gt; os: Halting system&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;It looks like I am having a stack overflow problem but the error message above suggests otherwise.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Any idea?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;Mohamed&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#000000;"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/444998?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 16:20:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19062804-743d-432b-bcbe-00aa17163cae</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Hey Mohamad,&lt;/p&gt;
&lt;p&gt;You&amp;#39;re more than welcome and glad to hear you got it working!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/444995?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 16:10:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee1c71a1-2507-4b7b-9cbb-4ad67b776cf3</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Good Afternoon James,&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
[quote userid="117767" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/444910"]For rand() and srand() you need to enable&amp;nbsp;&lt;span&gt;CONFIG_MINIMAL_LIBC_RAND&lt;/span&gt;&lt;span&gt;&amp;nbsp;to expose those.&lt;/span&gt;[/quote]
&lt;p&gt;It worked as expected.&lt;/p&gt;
[quote userid="117767" url="~/f/nordic-q-a/102658/how-to-reduce-the-size-of-an-executable-file/444910"]&lt;span&gt;the minimal library does not implement the&amp;nbsp;&lt;/span&gt;sscanf functionality[/quote]
&lt;p&gt;I addressed this by replacing calls to sscanf() with strtol(). I can now build the application. I just hope I have not introduced another problem by switching from sscanf() to strtol().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you again for your help.&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Mohamed&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/444910?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 11:46:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a08511a2-1b2d-427f-bfcb-e26653dd9a80</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Good morning Mohamad,&lt;/p&gt;
&lt;p&gt;For rand() and srand() you need to enable&amp;nbsp;&lt;span&gt;CONFIG_MINIMAL_LIBC_RAND&lt;/span&gt;&lt;span&gt;&amp;nbsp;to expose those. Once you have that then having the #include &amp;lt;stdlib.h&amp;gt; should be fine. Unfortunately, the minimal library does not implement the&amp;nbsp;&lt;/span&gt;sscanf functionality. I&amp;#39;m not sure of anything equivalent either.&lt;/p&gt;
&lt;p&gt;I just found this lightweight implementation of sscanf that may work? I have not tried it, but would be worth you checking:&amp;nbsp;&lt;a href="https://github.com/tusharjois/bscanf"&gt;https://github.com/tusharjois/bscanf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/444870?ContentTypeID=1</link><pubDate>Thu, 07 Sep 2023 09:26:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f76d2f6-e355-4ad3-8331-7441c8cc3d50</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Good Morning James,&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;Adding the two header files solved my initial problem. However, the linker is now complaining about &lt;strong&gt;undefined reference&lt;/strong&gt; to sscanf(), rand() and srand().&lt;/p&gt;
&lt;p&gt;Note, I am already #including &amp;lt;stdio.h&amp;gt; and &amp;lt;stdlib.h&amp;gt;.&lt;/p&gt;
&lt;p&gt;The compiler is sending only a warning about sscanf()&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;warning: implicit declaration of function &amp;#39;sscanf&amp;#39; [-Wimplicit-function-declaration]&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;It looks like the MINIMAL_LIBC does not include these functions.&lt;/p&gt;
&lt;p&gt;Thank you for your help.&lt;/p&gt;
&lt;p&gt;Mohamed&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; Linking &amp;lsquo;zephyr_prebuilt.elf&amp;rsquo;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Zypher\v1.7.0\toolchain\opt/bin/arm-none-eabi-gcc zephyr/CMakeFiles/zephyr_prebuilt.dir/misc/empty_file.c.obj -Wl,-T zephyr/linker_zephyr_prebuilt.cmd -Wl,-Map=C:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_v149_tuning/zephyr/zephyr_prebuilt.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a zephyr/lib/libc/minimal/liblib__libc__minimal.a zephyr/lib/posix/liblib__posix.a zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a zephyr/subsys/bluetooth/common/libsubsys__bluetooth__common.a zephyr/subsys/bluetooth/host/libsubsys__bluetooth__host.a zephyr/subsys/bluetooth/controller/libsubsys__bluetooth__controller.a zephyr/subsys/dfu/boot/libsubsys__dfu__boot.a zephyr/subsys/net/libsubsys__net.a zephyr/subsys/random/libsubsys__random.a zephyr/drivers/adc/libdrivers__adc.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/i2c/libdrivers__i2c.a zephyr/drivers/pwm/libdrivers__pwm.a zephyr/drivers/sensor/nrf5/libdrivers__sensor__nrf5.a zephyr/drivers/spi/libdrivers__spi.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/entropy/libdrivers__entropy.a modules/nrf/subsys/dfu/dfu_target/lib..__nrf__subsys__dfu__dfu_target.a modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/segger/libmodules__segger.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -Lc:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/thumb/v7e-m/nofp -LC:/Sandbox/HomeBeacon_dev_sb/build_nrf52833dk_nrf52833_v149_tuning/zephyr -lgcc zephyr/arch/common/libisr_tables.a -mcpu=cortex-m4 -mthumb -mabi=aapcs -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -no-pie -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -o zephyr\zephyr_prebuilt.elf&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(debug_console.c.obj): in function `debug_MainMenu&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/debug/debug_console.c:411: undefined reference to `sscanf&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(debug_menu_power.c.obj): in function `debug_PowerMenu&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/debug/debug_menu_power.c:137: undefined reference to `sscanf&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(debug_menu_radio.c.obj): in function `debug_RadioMenu&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/debug/debug_menu_radio.c:184: undefined reference to `sscanf&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(debug_menu_sensors.c.obj): in function `debug_SensorsMenu&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/debug/debug_menu_sensors.c:149: undefined reference to `sscanf&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(link_manager.c.obj): in function `link_GenerateSessionKey&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/link/link_manager.c:972: undefined reference to `rand&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(link_message_handler.c.obj): in function `link_ProcessCommand&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/link/link_message_handler.c:347: undefined reference to `rand&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/link/link_message_handler.c:387: undefined reference to `rand&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(link_message_testing.c.obj): in function `link_Test_Process&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/link/link_message_testing.c:912: undefined reference to `rand&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/link/link_message_testing.c:936: undefined reference to `rand&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(main.c.obj): in function `main&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/main.c:321: undefined reference to `srand&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; c:/zypher/v1.7.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(utils.c.obj): in function `util_RandFromToCount&amp;#39;:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; C:\Sandbox\HomeBeacon_dev_sb\build_nrf52833dk_nrf52833_v149_tuning/../src/utils/utils.c:256: undefined reference to `rand&amp;#39;&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;1&amp;gt; collect2.exe: error: ld returned 1 exit status&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:75%;"&gt;&lt;strong&gt;Build failed&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/444786?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2023 17:48:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a68a6d1c-686c-422e-a52b-01ec26666885</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Hello Mohamed,&lt;/p&gt;
&lt;p&gt;Make sure you have the following headers included:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;time.h&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/444784?ContentTypeID=1</link><pubDate>Wed, 06 Sep 2023 17:42:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d95ba53-0eec-4ba3-9d6d-ae35193cd536</guid><dc:creator>Learner</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I was having the same problem as msu i.e. the program size has become too big for the flash. So, I switched to using&amp;nbsp;&lt;strong&gt;CONFIG_&lt;/strong&gt;&lt;span&gt;&lt;strong&gt;MINIMAL_LIBC=y&lt;/strong&gt; but I am now getting compiler errors such as undefined reference to function &lt;strong&gt;abs()&lt;/strong&gt;, undefined type &lt;strong&gt;time_t&lt;/strong&gt;...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can someone please help?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Mohamed&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: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/442618?ContentTypeID=1</link><pubDate>Tue, 22 Aug 2023 15:00:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90d4a961-4130-4736-aa5d-cb29d2dee3c4</guid><dc:creator>msu7xi</dc:creator><description>&lt;p&gt;Hello Hieu and James,&lt;/p&gt;
&lt;p&gt;Thanks for your answers and sorry for my late reply. I have tested your suggestions and they are useful to reduce the size of my software. Unfortunately the size reduction is not enough to make the executable small enough to be flashed in a nRF52805.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/440720?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 11:56:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f93972d-126a-48af-9d8b-f817ce94597e</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;I should mention too, you&amp;#39;re using the full version of the C library. If you need Newlib C for a specific reason, then you can try using the size optimized version of it. You can try this by leaving&amp;nbsp;&lt;span&gt;CONFIG_NEWLIB_LIBC=y enabled, but also enabling&amp;nbsp;&lt;/span&gt;CONFIG_NEWLIB_LIBC_NANO=y as well. You can read more about it here:&amp;nbsp;&lt;a href="https://docs.zephyrproject.org/latest/develop/languages/c/newlib.html#nano-newlib"&gt;https://docs.zephyrproject.org/latest/develop/languages/c/newlib.html#nano-newlib&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/440716?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 11:48:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4118904-5a44-4710-89b0-7e7c2efd3b50</guid><dc:creator>JamesDougherty</dc:creator><description>&lt;p&gt;Hey Marco,&lt;/p&gt;
&lt;p&gt;Yeah. Comment out the&amp;nbsp;CONFIG_NEWLIB_LIBC=y line and it will default to the minimal library. Of course you can add&amp;nbsp;&lt;span&gt;CONFIG_&lt;/span&gt;&lt;span&gt;MINIMAL_LIBC=y just for your own reference, but&amp;nbsp;CONFIG_MINIMAL_LIBC=y should be enabled if&amp;nbsp;CONFIG_NEWLIB_LIBC and CONFIG_&lt;/span&gt;EXTERNAL_LIBC are not specified.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to reduce the size of an executable file?</title><link>https://devzone.nordicsemi.com/thread/440644?ContentTypeID=1</link><pubDate>Thu, 10 Aug 2023 08:04:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9159bd1b-3acc-49ac-b00e-0cd52144d536</guid><dc:creator>msu7xi</dc:creator><description>&lt;p&gt;Hello James,&lt;/p&gt;
&lt;p&gt;Yes, I&amp;#39;m using &lt;span&gt;CONFIG_SIZE_OPTIMIZATIONS&lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt;y &lt;/span&gt;but I have not tried &lt;span&gt;CONFIG_&lt;/span&gt;MINIMAL_LIBC=y yet. Should this be configured in the prj.conf file?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>