<?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>NRF Connect - Build configuration can&amp;#39;t find overlay file</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103888/nrf-connect---build-configuration-can-t-find-overlay-file</link><description>- nrf52840 
 - NCS v2.4.1 
 - Windows 10 
 - nRF Connect for VS Code v2023.9.169 
 
 Hi, 
 This may be a bug with the new version of NRF Connect for VScode (September 2023) or maybe I am doing something wrong. I have been using build configurations for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Sep 2023 14:35:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103888/nrf-connect---build-configuration-can-t-find-overlay-file" /><item><title>RE: NRF Connect - Build configuration can't find overlay file</title><link>https://devzone.nordicsemi.com/thread/447993?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2023 14:35:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9230af4-33c7-4ecf-80e6-5737240f4cba</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I hope that there are no further issues related to your initial issue or provided workaround.&lt;br /&gt;&lt;br /&gt;If you have any further questions, please let me know.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect - Build configuration can't find overlay file</title><link>https://devzone.nordicsemi.com/thread/447449?ContentTypeID=1</link><pubDate>Mon, 25 Sep 2023 11:28:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4773142b-a79d-480a-8f50-112a45e2b268</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Thank you for the update.&lt;br /&gt;&lt;br /&gt;I have reported this issue internally.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect - Build configuration can't find overlay file</title><link>https://devzone.nordicsemi.com/thread/447282?ContentTypeID=1</link><pubDate>Fri, 22 Sep 2023 16:04:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:332334be-b532-4759-bbeb-8a983404da85</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;This does seem to be the issue. Removing &amp;quot;${sourceDir}/ &amp;quot; from DTC_OVERLAY_FILE argument successfully finds and includes the overlay.&lt;/p&gt;
&lt;p&gt;It seems like the disconnect might be wherever the saved preset is used to construct the West command.&lt;/p&gt;
&lt;p&gt;in CMakePresets.json:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;quot;OVERLAY_CONFIG&amp;quot;: &amp;quot;${sourceDir}/boards\\my_qspi.conf&amp;quot;,
&amp;quot;DTC_OVERLAY_FILE&amp;quot;: &amp;quot;${sourceDir}/boards\\my_qspi.overlay&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When saved, OVERLAY_CONFIG and DTC_OVERLAY_FILES both contain the &amp;quot;${sourceDir}/ &amp;quot; prefix. Even though they both contain that in the JSON, the resulting west command is:&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;C:\Windows\system32\cmd.exe /d /s /c &amp;quot;west build --build-dir&lt;br /&gt;c:/OPTIX_PRODUCTION/littlefs_overlay_test/build_2&lt;br /&gt;c:/OPTIX_PRODUCTION/littlefs_overlay_test --pristine --board&lt;br /&gt;nrf52840dk_nrf52840 --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION:STRING=&amp;quot;NONE&amp;quot;&lt;br /&gt;&lt;strong&gt;-DOVERLAY_CONFIG:STRING=&amp;quot;boards/my_qspi.conf&amp;quot;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;-DDTC_OVERLAY_FILE:STRING=&amp;quot;${sourceDir}/boards/my_qspi.overlay&amp;quot;&lt;/strong&gt;&lt;br /&gt;-DBOARD_ROOT:STRING=&amp;quot;c:/optix_production/littlefs_overlay_test&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;So it looks like when it&amp;#39;s building the command, something already knows to strip the &amp;quot;${sourceDir}/ &amp;quot; prefix from OVERLAY_CONFIG but not DTC_OVERLAY_FILE.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect - Build configuration can't find overlay file</title><link>https://devzone.nordicsemi.com/thread/447134?ContentTypeID=1</link><pubDate>Thu, 21 Sep 2023 15:59:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0431495-d9ad-42ab-9a6e-7e16ba0b37a6</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I have tested your project. Using your initial Preset there seemed to be overlay file missing during build process and build failed. When I manually edited your configuration by removing existing location of the overlay file&amp;nbsp;(for me this field was not empty), browsed for its location and added it again I could successfully build your project. Making builds from the same Preset always resulted in failing builds. After manually adding the same path to the overlay file, build failed again (I had 2 lines to the same file). For resolving this issue, a path loaded from the preset needed to be removed or a change was required in CMakePresets.json file. When I replaced&amp;nbsp;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;quot;DTC_OVERLAY_FILE&amp;quot;: &amp;quot;${sourceDir}/boards\\my_qspi.overlay&amp;quot;&lt;/pre&gt;&lt;br /&gt;with&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;quot;DTC_OVERLAY_FILE&amp;quot;: &amp;quot;boards\\my_qspi.overlay&amp;quot;&lt;/pre&gt;&lt;br /&gt;building problem disappeared and build was successful. However, after saving successful build configuration as preset and loading it again when creating new configuration, the same line containing sourceDir came back and building failed again. The same above-mentioned change was required to build successfully. It seems that new build configuration was not populated correctly based on the desired template from CMakePresets,json..&lt;br /&gt;&lt;br /&gt;In summary, to be able to build successfully, every time I loaded configuration from Preset, I needed to either manually change the line containing&amp;nbsp;${sourceDir} or I could remove the overlay line completely and add it again which is the same as what you were doing.&lt;br /&gt;&lt;br /&gt;Could you try removing ${sourceDir}/ from your loaded Preset configuration and try to build? Is building process successful?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect - Build configuration can't find overlay file</title><link>https://devzone.nordicsemi.com/thread/446725?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 18:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2cfe211-70aa-4a6f-accd-82870217a4b5</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;Also, here is the exact project I&amp;#39;m using which is the littlefs example. This includes my saved preset in CMakePresets.json.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/littlefs_5F00_overlay_5F00_test.zip"&gt;devzone.nordicsemi.com/.../littlefs_5F00_overlay_5F00_test.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect - Build configuration can't find overlay file</title><link>https://devzone.nordicsemi.com/thread/446724?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 18:01:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15cdb78a-4009-47bb-86fe-704b0fa0717e</guid><dc:creator>nordicator_prim3</dc:creator><description>&lt;p&gt;For VS Code:&lt;/p&gt;
&lt;p&gt;Version: 1.82.2 (user setup)&lt;br /&gt;Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d&lt;br /&gt;Date: 2023-09-14T05:55:25.390Z&lt;br /&gt;Electron: 25.8.1&lt;br /&gt;ElectronBuildId: 23779380&lt;br /&gt;Chromium: 114.0.5735.289&lt;br /&gt;Node.js: 18.15.0&lt;br /&gt;V8: 11.4.183.29-electron.0&lt;br /&gt;OS: Windows_NT x64 10.0.19045&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And yes, I&amp;#39;m getting the same behavior with the DK. As an example, I used the littlefs sample application. In summary, the Devicetree overlays are not being found only when I try to use a saved preset to make a build.&lt;/p&gt;
&lt;p&gt;1. I changed the name of the overlay file so that the build systemp wouldn&amp;#39;t automatically use them. &amp;quot;nrf52840dk_nrf52840_qspi.overlay&amp;quot; renamed to &amp;quot;my_qspi.overlay&amp;quot;.&lt;/p&gt;
&lt;p&gt;2. Added a build configuration that included the desired overlay and config files.&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/pastedimage1695146082381v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;3. Build is successful and it finds the overlay file.&lt;/p&gt;
&lt;p&gt;4. Save configuration as a preset.&lt;/p&gt;
&lt;p&gt;5. Remove build configuration.&lt;/p&gt;
&lt;p&gt;6. Add new build configuration, selecting the new saved preset as the CMake preset and build the configuration.&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/pastedimage1695146355121v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;7. Can&amp;#39;t build; doesn&amp;#39;t find the overlay file.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-- Found devicetree overlay: /boards/my_qspi.overlay
&amp;lt;command-line&amp;gt;: fatal error: /boards/my_qspi.overlay: No such file or directory
compilation terminated.&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;8. Trying a pristine build again, it removes the overlay file from the configuration so it is not included.&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/pastedimage1695146452392v3.png" /&gt;&lt;/p&gt;
&lt;p&gt;9. It works again if I manually add the overlay file back again every time I used the saved preset as a template.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF Connect - Build configuration can't find overlay file</title><link>https://devzone.nordicsemi.com/thread/446666?ContentTypeID=1</link><pubDate>Tue, 19 Sep 2023 12:38:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdd5811d-efac-4629-95a0-b4fb6066a688</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Which version of the VS Code do you have?&lt;br /&gt;&lt;br /&gt;Have you observed the same behavior when using nrf52840 development kit?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>