<?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>Adding config.overlay to the west build command</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112835/adding-config-overlay-to-the-west-build-command</link><description>We have a Waveshare display and a npm1300dk and I wanted to know the proper way to add the npm1300&amp;#39;s config.overlay file, generated by nrfConnect&amp;#39;s PowerUp, to the west command line? 
 I could just copy the contents of the config.overlay file to the nrf52840dk_nrf52840</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Jul 2024 10:54:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112835/adding-config-overlay-to-the-west-build-command" /><item><title>RE: Adding config.overlay to the west build command</title><link>https://devzone.nordicsemi.com/thread/493127?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 10:54:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d385242-71bd-4c47-8ba8-3aad481ece59</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;You will want to include&amp;nbsp;the entire list in one&amp;nbsp;pair of quote marks. :)&lt;/p&gt;
&lt;p&gt;Just tested, like last time:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;west build -b nrf52840dk_nrf52840 -- -DDTC_OVERLAY_FILE=&amp;quot;temp.overlay;temp2.overlay&amp;quot;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding config.overlay to the west build command</title><link>https://devzone.nordicsemi.com/thread/492944?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 11:35:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab1dec5d-ac4b-4f2e-b35b-2700c15214f7</guid><dc:creator>mej7000</dc:creator><description>&lt;p&gt;Thanks! Yes, that works, but creates an additional question... I can&amp;#39;t seem to specify more than one overlay file successfully...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/build/dts/howtos.html"&gt;docs.zephyrproject.org/.../howtos.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;The CMake variable&amp;nbsp;&lt;strong class="makevar"&gt;DTC_OVERLAY_FILE&lt;/strong&gt;&amp;nbsp;contains a space- or semicolon-separated list of overlay files to use. If&amp;nbsp;&lt;strong class="makevar"&gt;DTC_OVERLAY_FILE&lt;/strong&gt;&amp;nbsp;specifies multiple files, they are included in that order by the C preprocessor.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;west build -b nrf52840dk_nrf52840 -d build52840&amp;nbsp; -- -DSHIELD=waveshare_epaper_gdey0213b74 -DDTC_OVERLAY_FILE=&amp;quot;app.overlay&amp;quot;;&amp;quot;config.overlay&amp;quot;&amp;nbsp;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I thought I might be able to add additional overlay files with this syntax, but&amp;nbsp;the declaration in config.overlay is causing: &lt;em&gt;&amp;quot;error: &amp;#39;__device_dts_ord_DT_N_NODELABEL_npm1300_ek_charger_ORD&amp;#39; undeclared here (not in a function)&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I can add my config.overlay code to the app.overlay and it compiles fine, so I have a solution... Just trying to understand it all completely&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding config.overlay to the west build command</title><link>https://devzone.nordicsemi.com/thread/492900?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 08:42:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:572e0e24-5480-40c7-9eff-392d7003abee</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;It looks like there is a difference between Linux bash and Windows shell/command line. On Windows, you also need to enclose the file name in quotes.&lt;/p&gt;
&lt;p&gt;In my tested just now, this command works on Windows:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="batchfile"&gt;west build -b nrf52840dk_nrf52840 -- -DDTC_OVERLAY_FILE=&amp;quot;temp.overlay&amp;quot;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding config.overlay to the west build command</title><link>https://devzone.nordicsemi.com/thread/492817?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2024 19:00:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eecc6466-dc49-47a5-82b5-d8c9c59469c7</guid><dc:creator>mej7000</dc:creator><description>&lt;p&gt;&lt;em&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/zephyr/develop/west/build-flash-debug.html"&gt;docs.nordicsemi.com/.../build-flash-debug.html&lt;/a&gt;&lt;br /&gt;&amp;quot;Notice how the&amp;nbsp;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;--&lt;/span&gt;&lt;/code&gt;&amp;nbsp;only appears once, even though multiple CMake arguments are given. All command-line arguments to&amp;nbsp;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;west&lt;/span&gt;&amp;nbsp;&lt;span class="pre"&gt;build&lt;/span&gt;&lt;/code&gt;&amp;nbsp;after a&amp;nbsp;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;--&lt;/span&gt;&lt;/code&gt;&amp;nbsp;are passed to CMake.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;PS C:\nrf\npm1300_fuel_gauge_2&amp;gt; &lt;span style="color:#008000;"&gt;&lt;strong&gt;west build -b nrf52840dk_nrf52840 -d build52840 -- -DSHIELD=waveshare_epaper_gdey0213b74 -DDTC_OVERLAY_FILE=npm1300config.overlay&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;-- west build: generating a build system&lt;br /&gt;Loading Zephyr default modules (Zephyr base).&lt;br /&gt;-- Application: C:/nrf/npm1300_fuel_gauge_2&lt;br /&gt;-- CMake version: 3.21.0&lt;br /&gt;-- Using NCS Toolchain 2.6.20240304.889616714482 for building. (C:/ncs/toolchains/cf2149caf2/cmake)&lt;br /&gt;-- Found Python3: C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe (found suitable version &amp;quot;3.9.13&amp;quot;, minimum required is &amp;quot;3.8&amp;quot;) found components: Interpreter &lt;br /&gt;-- Cache files will be written to: C:/ncs/v2.6.1/zephyr/.cache&lt;br /&gt;-- Zephyr version: 3.5.99 (C:/ncs/v2.6.1/zephyr)&lt;br /&gt;-- Found west (found suitable version &amp;quot;1.2.0&amp;quot;, minimum required is &amp;quot;0.14.0&amp;quot;)&lt;br /&gt;-- Board: nrf52840dk_nrf52840&lt;br /&gt;-- Shield(s): waveshare_epaper_gdey0213b74&lt;br /&gt;-- Found host-tools: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)&lt;br /&gt;-- Found toolchain: zephyr 0.16.5 (C:/ncs/toolchains/cf2149caf2/opt/zephyr-sdk)&lt;br /&gt;-- Found Dtc: C:/ncs/toolchains/cf2149caf2/opt/bin/dtc.exe (found suitable version &amp;quot;1.4.7&amp;quot;, minimum required is &amp;quot;1.4.6&amp;quot;)&lt;br /&gt;-- Found BOARD.dts: C:/ncs/v2.6.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts&lt;br /&gt;-- Found devicetree overlay: C:/ncs/v2.6.1/zephyr/boards/shields/waveshare_epaper/waveshare_epaper_gdey0213b74.overlay&lt;br /&gt;-- Found devicetree overlay: npm1300config&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;&amp;lt;command-line&amp;gt;: fatal error: npm1300config: No such file or directory&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#ff0000;"&gt;&lt;strong&gt;compilation terminated.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;CMake Error at C:/ncs/v2.6.1/zephyr/cmake/modules/extensions.cmake:3901 (message):&lt;br /&gt; failed to preprocess devicetree files (error code 1):&lt;br /&gt; C:/ncs/v2.6.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts;C:/ncs/v2.6.1/zephyr/boards/shields/waveshare_epaper/waveshare_epaper_gdey0213b74.overlay;npm1300config&lt;br /&gt;Call Stack (most recent call first):&lt;br /&gt; C:/ncs/v2.6.1/zephyr/cmake/modules/dts.cmake:215 (zephyr_dt_preprocess)&lt;br /&gt; C:/ncs/v2.6.1/zephyr/cmake/modules/zephyr_default.cmake:129 (include)&lt;br /&gt; C:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)&lt;br /&gt; C:/ncs/v2.6.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)&lt;br /&gt; CMakeLists.txt:8 (find_package)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;-- Configuring incomplete, errors occurred!&lt;br /&gt;&amp;larr;[91mFATAL ERROR: command exited with status 1: &amp;#39;C:\ncs\toolchains\cf2149caf2\opt\bin\cmake.EXE&amp;#39; -DWEST_PYTHON=C:/ncs/toolchains/cf2149caf2/opt/bin/python.exe &amp;#39;-BC:\nrf\npm1300_fuel_gauge_2\build52840&amp;#39; -GNinja -DBOARD=nrf52840dk_nrf52840 -DSHIELD=waveshare_epaper_gdey0213b74 -DDTC_OVERLAY_FILE=npm1300config .overlay &amp;#39;-SC:\nrf\npm1300_fuel_gauge_2&amp;#39;&lt;br /&gt;&amp;larr;[0m&lt;br /&gt;PS C:\nrf\npm1300_fuel_gauge_2&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/overlay-config-file.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Adding config.overlay to the west build command</title><link>https://devzone.nordicsemi.com/thread/492761?ContentTypeID=1</link><pubDate>Mon, 08 Jul 2024 14:27:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4df41a9-c737-4df0-85a7-9b7eddf9823b</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi mej7000,&lt;/p&gt;
&lt;p&gt;You can add this extra argument to the west build command:&amp;nbsp;&lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;-DDTC_OVERLAY_FILE=your_file.overlay&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It is also explained in these documentations:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/zephyr/develop/west/build-flash-debug.html"&gt;Building, Flashing and Debugging (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.7.0/page/zephyr/build/dts/howtos.html"&gt;Devicetree HOWTOs (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>