<?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 conditionally identify build type and use kconfig options with Zephyr</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109543/how-to-conditionally-identify-build-type-and-use-kconfig-options-with-zephyr</link><description>I am used to having multiple build configurations in various projects where I could conditionally include c code using preprocessor directives (#if) to allow automatic exclusion of debug code from non-Debug build configurations without having to delete</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Mar 2024 11:52:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109543/how-to-conditionally-identify-build-type-and-use-kconfig-options-with-zephyr" /><item><title>RE: How to conditionally identify build type and use kconfig options with Zephyr</title><link>https://devzone.nordicsemi.com/thread/475373?ContentTypeID=1</link><pubDate>Fri, 22 Mar 2024 11:52:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96eb9970-324f-4270-a100-862e42ceecd5</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How would you like to set build type?&lt;/p&gt;
&lt;p&gt;The methods that comes to mind is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Building for prj_release.conf or similar values&lt;/li&gt;
&lt;li&gt;Using a Kconfig configuration either in prj.conf or as a build argument (-- -DCONFIG_BUILD_TYPE_A=y)&lt;/li&gt;
&lt;li&gt;Something else?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>