<?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>Conditional overlays in a module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/124674/conditional-overlays-in-a-module</link><description>Hello, 
 I&amp;#39;m trying to build a Zephyr module that manages some features for a specific board (an SDK for that board). In it, I would like to enable the IPC devices in the board&amp;#39;s DT if a specific KConfig option is set. According to the you (Nordic) in</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Sep 2025 11:54:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/124674/conditional-overlays-in-a-module" /><item><title>RE: Conditional overlays in a module</title><link>https://devzone.nordicsemi.com/thread/550160?ContentTypeID=1</link><pubDate>Tue, 30 Sep 2025 11:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ab2a469-d45a-4ed9-a115-2133c58367ac</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Unfortunately, it is not possible to make DeviceTree dependent on Kconfig, because when building, DeviceTree will always build it&amp;#39;s configuration before Kconfig is even started.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So the options that you have is, as you already mentioned, either to use Snippets, or you can create different build configurations, where you include a different set of .conf files and .overlay files.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I do understand your desire to make it neat, e.g. setting a Kconfig, and then include all necessary stuff based on those, but when it comes to Devicetree and overlay files, this is not possible using Zephyr&amp;#39;s build system, West.&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></channel></rss>