<?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>VSCode Pristine Build puts Zephyr .config back to default</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81709/vscode-pristine-build-puts-zephyr-config-back-to-default</link><description>Hi All, 
 Likely because I am still quite new to this, but I have started with MQTT simple example and whenever I do use GuiConfig to make mods, it saves them to 
 proj/build/zephyr/.config 
 and moves the old one to 
 proj/build/zephyr/.config.old 
</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 15 Nov 2021 09:28:22 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81709/vscode-pristine-build-puts-zephyr-config-back-to-default" /><item><title>RE: VSCode Pristine Build puts Zephyr .config back to default</title><link>https://devzone.nordicsemi.com/thread/338956?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 09:28:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8de3e0df-11cb-47b5-86c2-4aa73cf89225</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="rfleming"]though would be good for something more persistent in the future?[/quote]
&lt;p&gt;What I described is the&amp;nbsp;persistent approach that is used across Zephyr and I do not believe there are any plans to do this differently in the future.&lt;/p&gt;
[quote user="rfleming"]Yea it was if I wanted to commit all my code into a git repo, I was hoping to not have to touch the board selection etc in the future, so I may end up commiting some items from the build folder to maintain the same BSP across machines in case someone makes a change etc. Was there any suggested way to do this?[/quote]
&lt;p&gt;You need to specify the board type when you build the first time after a pristine build, as you have noticed. But that is all. Any configurations etc can be kept outside of the build folder. If you for instance us a DK or other supported board and just want to make some changes, you can use a &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/dts/howtos.html#set-devicetree-overlays"&gt;device tree overlay file&lt;/a&gt;. For a custom board you should make a board file for that, typically within your project. See the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/zephyr/samples/application_development/out_of_tree_board/README.html"&gt;Out Of Tree Board sample&lt;/a&gt;. These files should be part of your application project an be checked in to your repository - they are not part of the build folder, but are used by the build process. PS: nRF Connect for VS code has a board creation wizard, which helps you create a board if you select &amp;quot;Create a new board&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VSCode Pristine Build puts Zephyr .config back to default</title><link>https://devzone.nordicsemi.com/thread/338944?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 09:11:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1a123f2-f719-4a1c-8832-6a172d2dba03</guid><dc:creator>rfleming</dc:creator><description>&lt;p&gt;Hi Einar,&lt;/p&gt;
&lt;p&gt;Thanks for following up!&lt;/p&gt;
&lt;p&gt;Yea I found the options I was after and I ended up just putting them manually into my &lt;strong&gt;prj.conf&lt;/strong&gt; file as you mentioned. I am happy to do this as a work around for the moment as I don&amp;#39;t need to customise the zephyr OS more than the default, though would be good for something more persistent in the future?&lt;/p&gt;
[quote userid="7377" url="~/f/nordic-q-a/81709/vscode-pristine-build-puts-zephyr-config-back-to-default/338933#338933"]If the question is if you need to keep anything from the build folder, then the answer is no. If you configure your project correctly everything in the build folder is build artifacts. And which board you build for etc is something you specify when you build, so there is no need to keep the build folder for that. If I misunderstood the question, perhaps you can elaborate?[/quote]
&lt;p&gt;Yea it was if I wanted to commit all my code into a git repo, I was hoping to not have to touch the board selection etc in the future, so I may end up commiting some items from the build folder to maintain the same BSP across machines in case someone makes a change etc. Was there any suggested way to do this? Or currently recommended to only upload the code and recreate the target board after pulling code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VSCode Pristine Build puts Zephyr .config back to default</title><link>https://devzone.nordicsemi.com/thread/338933?ContentTypeID=1</link><pubDate>Mon, 15 Nov 2021 08:48:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a33b6ad-fa16-4c98-afd9-80c3b77482d6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi Ryan,&lt;/p&gt;
[quote user=""]Is there a more streamline process to this? [/quote]
&lt;p&gt;You are right that any changes you make with guiconfig is in the build folder, and therefor lost whenever you do a pristine build (see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html#changing-the-configuration-temporarily"&gt;Changing the configuration temporarily&lt;/a&gt;). This means that guiconfig is good for browsing configuration options and dependencies and test this out, However, to make changes persistent you should do the configuration changes elsewhere, typically in prj.conf (see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_modifying.html#changing-the-configuration-permanently"&gt;Changing the configuration permanently&lt;/a&gt;).&lt;/p&gt;
[quote user=""]Following the above, if I were to commit code, since the selected board is selected and also in the build folder, what should I be&amp;nbsp;adding to repo for BSP? or generally, does everyone just do a file ignore for *.d, *.a, *.cmake etc and keep the empty output folders?[/quote]
&lt;p&gt;If the question is if you need to keep anything from the build folder, then the answer is no. If you configure your project correctly everything in the build folder is build artifacts. And which board you build for etc is something you specify when you build, so there is no need to keep the build folder for that. If I misunderstood the question, perhaps you can elaborate?&lt;/p&gt;
&lt;p&gt;Einar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>