<?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>How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110230/how-do-i-add-another-board-and-conf-file-to-an-existing-project</link><description>I have been working with some code for a nrf5340 DK and now want to add a custom board to the project as an additional build configuration, but I need to now pull out configurations which are set in the prj.conf as they conflict. For example the dk uses</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 24 Mar 2025 14:26:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110230/how-do-i-add-another-board-and-conf-file-to-an-existing-project" /><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/528659?ContentTypeID=1</link><pubDate>Mon, 24 Mar 2025 14:26:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdb54556-5eb1-4f46-8c4b-e323e0a5d296</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;prj.conf&lt;/code&gt; can be used to enable the configurations necessary for both boards, and you can place board-specific configs inside the boards folder. For example, see the project structure below.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;my_project/
│── boards/
│   ├── spi_board.conf        
│   ├── qspi_board.conf      
│   ├── spi_board.overlay     
│   ├── qspi_board.overlay    
│── build/
│   ├── spi_board/    
│   ├── qspi_board/   
│── src/
│   ├── main.c
│── CMakeLists.txt
│── prj.conf  #(common config for both boards)

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Take a look at the &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/zigbee/light_bulb"&gt;Zigbee light bulb sample &lt;/a&gt;to see how different configurations are used for different DKs. Also, check the&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/samples/zigbee/light_bulb/boards"&gt; boards folder here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/528006?ContentTypeID=1</link><pubDate>Wed, 19 Mar 2025 12:51:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:76231f21-405e-48dc-a08f-3c84c1fe6cf9</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;In the directory you only have one prj.conf. What if one board uses QSPI and the other uses SPI and I want to enable them. Don&amp;#39;t I need two prj.conf files, one for each board?&lt;br /&gt;&lt;br /&gt;The SPI board needs this in the prj.conf file:&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_SPI=y
CONFIG_SPI_NOR=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;and the QSPI board needs this:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_NORDIC_QSPI_NOR=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Both of these I would set in a prj.conf file if I had seperate projects for each board, but if I had the same project for both boards wouldn&amp;#39;t I need 3 configuration files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;one for both boards (prj.conf) where the configurations are the same&lt;/li&gt;
&lt;li&gt;one for the SPI flash board&lt;/li&gt;
&lt;li&gt;one for the QSPI flash board&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Is this the way it works? How would I name them and where would I put them?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/483053?ContentTypeID=1</link><pubDate>Mon, 13 May 2024 12:51:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef75b8d9-beb2-4c86-afef-80a752c2438f</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;&lt;span&gt;Hello,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I am not sure if I understand you correctly, but you can create a project structure that includes different build configurations for each board. Something like below will be a project structure for two different boards:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;project_folder
    - board_1
        - inc
            - *.h files
        - src
            -*.c files (including main.c)
        - CMakeLists.txt
        - board_1.overlay
        - prj.conf
    - board_2
        - inc
            - *.h files
        - src
            -*.c files (including main.c)
        - CMakeLists.txt
        - board_2.overlay
        - prj.conf
    - CMakeLists.txt
    - KConfig
    - prj.conf&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In this structure, each board has its own directory with its own source files, header files, CMakeLists.txt, overlay file, and configuration file. The overlay file allows you to specify different settings for each build. You can specify which overlay file to use during the build configuration process using the &lt;code dir="ltr"&gt;-DDTS_OVERLAY_FILE&lt;/code&gt;&amp;nbsp;argument. See&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/applications/serial_lte_modem/doc/slm_description.html#configuration-files"&gt;the section on configuration files,&lt;/a&gt; which discusses selecting different configuration and overlay files. See the below devzone threads.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/support-private/support/301462"&gt;https://devzone.nordicsemi.com/support-private/support/301462&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/support-private/support/305501"&gt;https://devzone.nordicsemi.com/support-private/support/305501&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Abhijith&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/480884?ContentTypeID=1</link><pubDate>Fri, 26 Apr 2024 12:19:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47f9a6ec-dd84-49fe-a759-8983a2b917ee</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;The &lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/topic/creating-board-files/"&gt;Dev Academy&lt;/a&gt;&amp;nbsp;coverage on creating custom boards&amp;nbsp;is great, btw, but I would love a little more depth on this topic. What would help me is the file structure for a project with multiple builds, each one targeting a different board. One board would be the DK with some peripheral attached, like a display, for a prototype. The second one would be a custom board, as discussed in the Dev Academy scenario.&lt;/p&gt;
&lt;p&gt;It would show how the an overlay and conf file for each option along with a prj.conf. As the Dev Academy coverage of a custom board shows, there would be a conf and overlay file created in the custom board directory.&lt;/p&gt;
&lt;p&gt;For the prototype DK the overlay default seems to be in the root and I don&amp;#39;t know where the conf file is. When you create a new project the conf file is the prj.conf, but when you add the 2nd board, a customized board in this case, where do you put the settings for the original board if you need to pull them out of the prj.conf?&lt;/p&gt;
&lt;p&gt;I read the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/zephyr/build/kconfig/setting.html#the-initial-configuration"&gt;link on configuration&lt;/a&gt; and tried to replicate, but a visual of the directory structure would be super helpful. I&amp;#39;m assuming the prj.conf would be merged with the prototype/dk board when that build is selected and merged with the custom board when that is selected. I just haven&amp;#39;t been able to get it to work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/479831?ContentTypeID=1</link><pubDate>Sun, 21 Apr 2024 12:26:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f4f36888-e9a9-46cf-ad79-bf0d3adc1536</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;I went through the tutorial. It was very helpful. I still am left with questions. I see three scenarios I need to support:&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Prototype on a DK&lt;/li&gt;
&lt;li&gt;Use an existing custom board&lt;/li&gt;
&lt;li&gt;Create my own custom board&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;My question is moving from scenario 1 to 2 I need to alter the configuration to support both. There are some things I have in the prj.conf which I put in there to support the DK, which I still want to support. However, they also conflict with the existing custom board configuration, such as the display (ST7789 on the prototype and&amp;nbsp;GC9A01A on the custom board). Therefore, the current setting of&amp;nbsp;&lt;code&gt;&lt;span&gt;CONFIG_ST7789V&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;=y&lt;/code&gt; in the prj.conf needs to be moved out into a configuration file which is only used if the&amp;nbsp;nrf5340dk is used.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;It seems like the prj.conf should be used for any configuration required for all board configurations (in this example dk, existing custom, personal custom). There are custom configuration options in the existing custom board, but I should not mess with too many of them. So how do I have a configuration file for each of the three scenarios above? A board specific configuration I can control. It may only be required for the first one but in that case should not be in the prj.conf. So where does it go and what is it named?&lt;/p&gt;
&lt;p&gt;I referenced &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/zephyr/build/kconfig/setting.html#the-initial-configuration"&gt;this link&lt;/a&gt; in my previous reply which I believe means that a file in the application root named:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;prj_nrf5340dk_nrf5340_cpuapp.conf&lt;/p&gt;
&lt;p&gt;I believe it would get incorporated, but the language is hard to decipher:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;2. Otherwise,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class="file docutils literal notranslate"&gt;&lt;span class="pre"&gt;prj_&amp;lt;BOARD&amp;gt;.conf&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is used if it exists in the application configuration directory.&lt;/p&gt;
&lt;p&gt;Does that mean it gets merged as &amp;quot;otherwise&amp;quot; seems to imply it&amp;#39;s used in place of the prj.conf.&lt;/p&gt;
&lt;p&gt;When I add the&amp;nbsp;&lt;span&gt;prj_nrf5340dk_nrf5340_cpuapp.conf I didn&amp;#39;t see it merge when building. I see no reference to it but I do se:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Loaded configuration &amp;#39;/opt/nordic/ncs/v2.5.2/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig&amp;#39;
Merged configuration &amp;#39;/Users/lj/Projects/GitHub/lj/xprototype/prj.conf&amp;#39;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/479152?ContentTypeID=1</link><pubDate>Wed, 17 Apr 2024 08:59:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f3b9282-8032-4fb0-9036-6443a2637264</guid><dc:creator>Menon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;In our&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/"&gt; Developer Academy tutorial,&lt;/a&gt; there is a chapter explaining how&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-intermediate/lessons/lesson-3-adding-custom-board-support/"&gt;to add custom board support&lt;/a&gt; to the nRF Connect SDK. You can find exercises on creating new board definitions and hardware specifications.&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/478982?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 12:29:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9255d8f7-e900-407f-b301-1f1c6601dc5e</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;Ok. These are good links. Thank you. I do need to understand the process more completely and will read through them. I don&amp;#39;t know if what I&amp;#39;m doing is considered a child image.&lt;/p&gt;
&lt;p&gt;The second link includes coverage of _deconfig, which may be an option, but it&amp;#39;s not really in the overlay is not in the boards directory because I&amp;#39;m using a DK. The third link covers the overlay, which is what I&amp;#39;m using. I suppose it&amp;#39;s a legitimate question to ask if I am creating a prototype using a nrf5340 dk, do I create a directory in boards if I&amp;#39;m going to test on other similar boards, as I am doing now and&amp;nbsp;evolve the prototype into a custom board.&lt;/p&gt;
&lt;p&gt;For one build I have a&amp;nbsp;&lt;strong&gt;nrf5340dk_nrf5340_cpuapp.overlay&lt;/strong&gt;&amp;nbsp;in the root and I was wondering if I created a&amp;nbsp;&lt;strong&gt;nrf5340dk_nrf5340_cpuapp.conf&lt;/strong&gt; in root if it would get merged with the &lt;strong&gt;prj.conf&lt;/strong&gt;. This way the&amp;nbsp;&lt;code&gt;&lt;span&gt;CONFIG_ST7789V&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&lt;code&gt;=y&lt;/code&gt;&amp;nbsp;line could be moved out of the &lt;strong&gt;prj.conf&lt;/strong&gt; and into the&amp;nbsp;&lt;strong&gt;nrf5340dk_nrf5340_cpuapp.conf&lt;/strong&gt; and not interfere with the configuration of the 2nd build.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I will need to know how to create a custom board, but I built my code on a dk with a certain configuration and am now trying to see if it works on board somebody else built.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/zephyr/build/kconfig/setting.html#the-initial-configuration"&gt;This link&lt;/a&gt; which you provided seemed the most helpful. I think this falls into the application configuration category. Maybe I need to do #2 &amp;quot;&lt;/span&gt;Otherwise,&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class="file docutils literal notranslate"&gt;&lt;span class="pre"&gt;prj_&amp;lt;BOARD&amp;gt;.conf&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;is used if it exists in the application configuration directory.&amp;quot;, if the application configuration directory is the root with the prj.conf in it.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I read &lt;a href="https://www.jaredwolff.com/optimize-zephyr-config-and-overlays/"&gt;How to Optimize Zephyr Configuration and Overlays&lt;/a&gt;&amp;nbsp;which was helpful as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do I add another board and .conf file to an existing project?</title><link>https://devzone.nordicsemi.com/thread/478868?ContentTypeID=1</link><pubDate>Tue, 16 Apr 2024 07:07:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fa8c3d2-bb58-4b24-8745-bacc434ea4d2</guid><dc:creator>Hieu</dc:creator><description>&lt;p&gt;Hi lcj,&lt;/p&gt;
&lt;p&gt;For the specific purpose of setting up Devicetree and Kconfig for some specific boards, please check out the Permanent configuration changes to child images in this page:&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/nrf/config_and_build/multi_image.html#permanent-configuration-changes-to-child-images"&gt;Multi-image builds — nRF Connect SDK 2.6.0 documentation (nordicsemi.com)&lt;/a&gt;. &lt;br /&gt;Even though you might not be using Multi-image build, it describes how use &amp;lt;board&amp;gt;.conf and &amp;lt;board&amp;gt;.overlay files to achieve what you want.&lt;br /&gt;Almost all projects will&amp;nbsp;want to use DFU, at which point, you will&amp;nbsp;have Multi-image build anyway.&lt;/p&gt;
&lt;p&gt;For how to&amp;nbsp;use some generic&amp;nbsp;Devicetree and Kconfig files that are only used in certain builds, please refer to these links:&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/zephyr/build/kconfig/setting.html"&gt;Setting Kconfig configuration values — Zephyr Project documentation (nRF Connect SDK) (nordicsemi.com)&lt;/a&gt;&lt;br /&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.6.0/zephyr/build/dts/howtos.html#set-devicetree-overlays"&gt;Devicetree HOWTOs — Zephyr Project documentation (nRF Connect SDK) (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For all the links above, if time allows, I recommend giving their entire parent topic a read, not just the specific sections I linked.&lt;/p&gt;
&lt;p&gt;Hieu&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>