<?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>Stack overflow issue with NRF9160 when compiler optimizations off</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82924/stack-overflow-issue-with-nrf9160-when-compiler-optimizations-off</link><description>Hi, 
 I just turned off compiler optimizations with CONFIG_NO_OPTIMIZATIONS=y (before that, code was working correctly). After the change, I noticed that my program is stack overflowing during the bootup process, likely because the stack sizes of various</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Dec 2021 09:15:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82924/stack-overflow-issue-with-nrf9160-when-compiler-optimizations-off" /><item><title>RE: Stack overflow issue with NRF9160 when compiler optimizations off</title><link>https://devzone.nordicsemi.com/thread/344274?ContentTypeID=1</link><pubDate>Mon, 20 Dec 2021 09:15:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23e9d8fa-16bf-43b4-8723-24da071430ff</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In general, no optimization consumes alot more RAM compared to other optimization levels.&lt;/p&gt;
&lt;p&gt;You should consider using DEBUG_OPTIMIZATIONS instead.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Try to adjust the stack size of the thread analyzer:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_THREAD_ANALYZER_AUTO_STACK_SIZE=2048&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Håkon&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>