<?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>nRF53 and Zephyr: optimization level</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81282/nrf53-and-zephyr-optimization-level</link><description>Hi, 
 I would like to know if it is possible to configure the optimization level only the application built on top of Zephyr, and not all the project. 
 I am trying to debug the temperature sensor example for TMP117. It is working for the board nrf53</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 04 Nov 2021 07:14:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81282/nrf53-and-zephyr-optimization-level" /><item><title>RE: nRF53 and Zephyr: optimization level</title><link>https://devzone.nordicsemi.com/thread/337387?ContentTypeID=1</link><pubDate>Thu, 04 Nov 2021 07:14:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3273b671-e29a-4de3-99c0-67da4aa4fac5</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;no problem, good luck with your development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 and Zephyr: optimization level</title><link>https://devzone.nordicsemi.com/thread/337266?ContentTypeID=1</link><pubDate>Wed, 03 Nov 2021 12:48:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a04e5f37-983c-4605-b8b4-a569dfeeed0c</guid><dc:creator>Riccardo Gaiati</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;thanks so much for the info.&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Riccardo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 and Zephyr: optimization level</title><link>https://devzone.nordicsemi.com/thread/337091?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 12:45:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6277cbcd-f050-47bf-84da-c3338986f65d</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;unfortunately the optimizations for the compiler are global levelled.&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1635857056326v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;But you can enhance the debug experience a bit if you enable the debug option of the individual modules&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1635857141674v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 and Zephyr: optimization level</title><link>https://devzone.nordicsemi.com/thread/337075?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 12:08:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:875419be-f596-4d30-b1eb-d8bde64ffb03</guid><dc:creator>Riccardo Gaiati</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;in any case i would like to know if there is a proper way to change the optimization between the application and the rest of the code.&lt;/p&gt;
&lt;p&gt;Thanks !&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 and Zephyr: optimization level</title><link>https://devzone.nordicsemi.com/thread/337073?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 12:07:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81c2a556-14de-4964-9933-31aa4d394122</guid><dc:creator>Riccardo Gaiati</dc:creator><description>&lt;p&gt;Hi Susheel,&lt;/p&gt;
&lt;p&gt;thanks for the reply.&lt;/p&gt;
&lt;p&gt;The reason i would like to compile with no optimization is to have a better debug experience. And i am mainly interested to debug our application.&lt;/p&gt;
&lt;p&gt;Yesterday I tried to increase the Idle stack size and the problem seems to disappear.&lt;/p&gt;
&lt;p&gt;Thanks again for the support !&lt;/p&gt;
&lt;p&gt;Kind regards&lt;/p&gt;
&lt;p&gt;Riccardo&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF53 and Zephyr: optimization level</title><link>https://devzone.nordicsemi.com/thread/336994?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 08:42:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffa6ae4c-0942-40e0-94f7-4b0dbf7553dc</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]If i change it to no optimization i am having stack overflow.[/quote]
&lt;p&gt;It is a bit unclear to me why you do not want to have full optimizations on the whole project and only on the application?&amp;nbsp;&lt;/p&gt;
[quote user=""]I have increased the main stack size up to 4 KB, but the problem is still present.[/quote][quote user=""]As far as i could get with my tests, the stack overflow happens inside the function&amp;nbsp;pm_system_suspend declared in power.c[/quote]
&lt;p&gt;It is possible that this is the issue with the idle thread stack size. Since most power related things (when enabled) are done in the idle thread, you need to keep an eye on the &lt;a href="https://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_IDLE_STACK_SIZE.html"&gt;CONFIG_IDLE_STACK_SIZE&lt;/a&gt;&amp;nbsp;as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>