<?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>Differnt buold configurations</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/93840/differnt-buold-configurations</link><description>Hi! We would like to build two different sw variants from same source code and mostly the same config options, probably only needing a single &amp;quot;define&amp;quot;-difference in code. I can&amp;#39;t find any relevant information on how to setup a project for this kind of</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 28 Nov 2022 17:03:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/93840/differnt-buold-configurations" /><item><title>RE: Differnt buold configurations</title><link>https://devzone.nordicsemi.com/thread/397954?ContentTypeID=1</link><pubDate>Mon, 28 Nov 2022 17:03:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fedde6a-3920-4624-b64d-5eeedbb987b4</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Apologies for the long wait time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If I understand you correctly, then we unfortunately don&amp;#39;t&amp;nbsp;have any standardized way to&amp;nbsp;attempt what you&amp;#39;re looking for other than what you can see on the configuration page previously linked and its parent page&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/index.html"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/index.html&lt;/a&gt;. You will unfortunately have to create a custom way to configure your project (custom linking based on conditioning) and ensure that all your configuration files are linked properly so that the toolchain will know where to fetch the build settings from.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Differnt buold configurations</title><link>https://devzone.nordicsemi.com/thread/397142?ContentTypeID=1</link><pubDate>Wed, 23 Nov 2022 11:27:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b6f7cbf5-a6e8-4805-b869-e148cc2ce667</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Apologies for the delayed response. I&amp;#39;ve been out of office and will be out of office until Friday. I will do my best to get you an answer to your latest question on Friday, and no later than the upcoming Monday.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Differnt buold configurations</title><link>https://devzone.nordicsemi.com/thread/396336?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2022 07:12:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35bfeda3-4e78-497c-8652-edffccdf9867</guid><dc:creator>Maos</dc:creator><description>&lt;p&gt;Hi!&lt;br /&gt;&lt;br /&gt;Thanks for the explanation and link.&lt;br /&gt;&amp;nbsp;&lt;br /&gt;If I understand the link correctly it is almost but not quite what I was looking for...&lt;br /&gt;I was more looking for something like:&lt;br /&gt;&amp;quot;the result of merging prj_&amp;lt;build&amp;gt;.conf and prj.conf is used.&amp;quot;&lt;br /&gt;&lt;br /&gt;My main concern is that I wanted all the common options in one .conf file.&lt;br /&gt;&lt;br /&gt;BR,&lt;br /&gt;M&amp;aring;rten&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Differnt buold configurations</title><link>https://devzone.nordicsemi.com/thread/395806?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 13:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55f05bc4-30ad-43bf-b33d-9d63f8dc19c8</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;The easiest way* is&amp;nbsp;to generate the build with settings A, then making the changes with in your project with the setting set B and generate the new build. *But this will lead to you having to manage the two build variations manually, and will be tedious in the long run.&lt;/p&gt;
&lt;p&gt;A second way is to have a look at&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/kconfig/setting.html#the-initial-configuration"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/kconfig/setting.html#the-initial-configuration&lt;/a&gt;&amp;nbsp;to get some more information about how configuration files can be used. Here you could use&amp;nbsp;&lt;span style="font-family:inherit;"&gt;Kconfig file where you can create your own configurations (and use configurations from the &lt;/span&gt;&lt;a style="font-family:inherit;" href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html"&gt;KConfig reference&lt;/a&gt;&lt;span style="font-family:inherit;"&gt;), that you can enable/disable based on which software variation you want to build for. This should allow you to change your application without changing the source code&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;See more here:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/kconfig/index.html"&gt;developer.nordicsemi.com/.../index.html&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668519926345v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If your SW is ment to be used for other physical boards, you will have to make changes to the devicetree files instead&lt;/p&gt;
&lt;p&gt;I hope this answers your question,&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Differnt buold configurations</title><link>https://devzone.nordicsemi.com/thread/395704?ContentTypeID=1</link><pubDate>Tue, 15 Nov 2022 08:39:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0cf461c1-5419-41d6-8d37-1969ac59dd06</guid><dc:creator>Maos</dc:creator><description>&lt;p&gt;Hi!&lt;br /&gt;&lt;br /&gt;Thanks for the answer, but how would I then go about to have basically one setting be different between the two build configurations and all the rest in a common file?&lt;br /&gt;&lt;br /&gt;BR,&lt;br /&gt;M&amp;aring;rten&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Differnt buold configurations</title><link>https://devzone.nordicsemi.com/thread/395569?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2022 13:26:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b472fed-590a-42f4-a733-dae7cfb40563</guid><dc:creator>AHaug</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;You can create multiple software variants by generating a new build with a different folder name. The default name chosen when using either the command line with &amp;quot;west build -b &amp;lt;board&amp;gt;&amp;quot; or with the VSCode extension is &amp;quot;build&amp;quot;. So depending on if you&amp;#39;re working with command line or if you&amp;#39;re working with the VSCode extension on nRF Connect SDK you can do one of the following:&lt;/p&gt;
&lt;p&gt;In command line you can create multiple build configurations with &amp;quot;west build -b &amp;lt;board_type&amp;gt; -d &amp;lt;build_folder_name&amp;quot;, for instance &amp;quot;west build -b nrf52840dk_nrf52840 -d build_1&amp;quot;, which will create a new build configuration. Remember to also select which build configuration you want to flash with &amp;quot;west flash -d build_1&amp;quot; if you want to flash the non-default build configuration.&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668431149154v3.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;In the VSCode extension, you can press &amp;quot;Add build configuration&amp;quot; under your project after you&amp;#39;ve done the modifications you wanted to do.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668430970450v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;This will open the build configuration page where you can create a new build. Select a different name than &amp;quot;build&amp;quot;, press &amp;quot;Build Configuration&amp;quot; and see the new build show up under your applications-list in the extension:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1668432055093v6.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;A third option is of course to create a copy of your project and keep the two software variations separated by folders to make it easier to see and remember the changes between the projects.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>