<?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>Kconfig defines not showing in ifdef, ifdef greyed out</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98267/kconfig-defines-not-showing-in-ifdef-ifdef-greyed-out</link><description>Hi All, I was looking at the RNG example (nrf/samples/crypto/rng) when I&amp;#39;ve encountered some issues with ifdefs. The .conf file has the default settings: The example is building and running fine. But when I click &amp;quot;Go to definition&amp;quot; on &amp;quot;psa_generate_random</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 13 Apr 2023 07:27:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98267/kconfig-defines-not-showing-in-ifdef-ifdef-greyed-out" /><item><title>RE: Kconfig defines not showing in ifdef, ifdef greyed out</title><link>https://devzone.nordicsemi.com/thread/420104?ContentTypeID=1</link><pubDate>Thu, 13 Apr 2023 07:27:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01a7bea9-3ab3-49d9-a4b8-b30df027a78b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Sorry for the late reply. I was out of office last week due to public holidays here in Norway.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Ifdefs in itself works, the issue is for the IDE to understand what configurations that are currently selected. Especially if you have multiple projects open at once. I will forward your ticket to our nRF Connect for VS Code team, but I think it is a mix of our tool, and the external tools that they use that causes the highlighting to not always be correct. If you are in doubt whether a config is set or not, you should check the build folder:&lt;/p&gt;
&lt;p&gt;build\zephyr\include\generated\autoconf.h, to see what your build actually uses. Remember that it is not that easy for the IDE to actually predict what all the definitions will be without actually compiling the application, which it obviously doesn&amp;#39;t do all the time when you are editing.&lt;/p&gt;
&lt;p&gt;So as I mentioned in my initial reply, the highlighting is guiding, and nice to have, but you should be aware that it is not always correct (that goes both ways).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kconfig defines not showing in ifdef, ifdef greyed out</title><link>https://devzone.nordicsemi.com/thread/418904?ContentTypeID=1</link><pubDate>Mon, 03 Apr 2023 18:42:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb1612c2-85e6-4a4f-bc55-ca167e5dcf8d</guid><dc:creator>Martijn-Revival</dc:creator><description>&lt;p&gt;Thanks for the answer. Too bad that full support for ifdefs is not available. Is that something which might be available in the future?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Kconfig defines not showing in ifdef, ifdef greyed out</title><link>https://devzone.nordicsemi.com/thread/418350?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 13:57:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e66662c-084e-4e97-b5ce-cc351d761ece</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;The highlighting in VS Code should be&amp;nbsp;for guidance only. It doesn&amp;#39;t always understand what&amp;#39;s included or not. If it doesn&amp;#39;t work in your case, you can disable it (many of my colleagues have, while I like to use it, with an asterisk, knowing what it shows is not always correct).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>