<?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>Best practice advice for Zephyr debug and release configurations.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/84716/best-practice-advice-for-zephyr-debug-and-release-configurations</link><description>I am mid-way through development with the nRF52840 DK and Zephyr using the VSCode extension. I&amp;#39;m using v1.8.0 of the SDK. 
 I am looking for advice on setting my configuration up for both debug and release builds. 
 Right now, when I do a build, I get</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Feb 2022 15:38:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/84716/best-practice-advice-for-zephyr-debug-and-release-configurations" /><item><title>RE: Best practice advice for Zephyr debug and release configurations.</title><link>https://devzone.nordicsemi.com/thread/352948?ContentTypeID=1</link><pubDate>Mon, 14 Feb 2022 15:38:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4661a3cd-0b0b-4dd9-9115-f50621ec7bb0</guid><dc:creator>&amp;#216;ivind</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;quot;-Og&amp;quot; is the flag for Debug optimization, so that seems correct to me.&lt;/p&gt;
&lt;p&gt;Yes, you make a .conf file for each build type, and choose between them when you create a build configuration. That is also how it is done in our nRF Desktop application: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf_desktop/README.html#selecting-a-build-type"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/nrf_desktop/README.html#selecting-a-build-type&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For compiler optimizations: &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/choice_873.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/choice_873.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For debugging you probably want &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_DEBUG.html"&gt;CONFIG_DEBUG&lt;/a&gt; and &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/CONFIG_DEBUG_INFO.html"&gt;CONFIG_DEBUG_INFO&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>