<?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>Creating a custom module placed in the project root</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/123194/creating-a-custom-module-placed-in-the-project-root</link><description>I had a driver made for my project, I now want to transform the driver into a module so I can use Git submodules and implement this driver in multiple projects. 
 This is my directory, which is placed in the root of my project. 
 The module.yml contains</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 23 Jul 2025 10:03:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/123194/creating-a-custom-module-placed-in-the-project-root" /><item><title>RE: Creating a custom module placed in the project root</title><link>https://devzone.nordicsemi.com/thread/543320?ContentTypeID=1</link><pubDate>Wed, 23 Jul 2025 10:03:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac1fce7d-8707-46cb-9288-2cd2d4c3e494</guid><dc:creator>spookles</dc:creator><description>&lt;p&gt;Fixed,&lt;br /&gt;&lt;br /&gt;had to replace&amp;nbsp;&lt;br /&gt;&lt;em&gt;list(APPEND ZEPHYR_MODULES modules/ws2812_driver)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;for&lt;br /&gt;&lt;em&gt;set(EXTRA_ZEPHYR_MODULES ${CMAKE_CURRENT_LIST_DIR}/modules/ws2812_driver)&lt;br /&gt;&lt;br /&gt;&lt;/em&gt;In the &amp;#39;latest&amp;#39; version of the Zephyr docs they mentioned&lt;br /&gt;&lt;a href="https://docs.zephyrproject.org/latest/develop/modules.html#build-settings"&gt;Modules (External projects) &amp;mdash; Zephyr Project Documentation&lt;/a&gt;&lt;br /&gt;&amp;quot;&lt;em&gt;At the top of your application&amp;rsquo;s top level&amp;nbsp;&lt;code class="file docutils literal notranslate"&gt;&lt;span class="pre"&gt;CMakeLists.txt&lt;/span&gt;&lt;/code&gt;, like this:&lt;/em&gt;&lt;/p&gt;
&lt;div class="highlight-cmake notranslate"&gt;
&lt;div class="highlight"&gt;
&lt;pre id="codecell30"&gt;&lt;em&gt;&lt;span class="nb"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;ZEPHYR_MODULES&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;path-to-module1&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;lt;path-to-module2&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;[...]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nb"&gt;find_package&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;Zephyr&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;REQUIRED&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;HINTS&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;$ENV{&lt;/span&gt;&lt;span class="nv"&gt;ZEPHYR_BASE&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;/em&gt;&lt;span class="p"&gt;&lt;em&gt;)&lt;/em&gt;&amp;quot;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>