How to have board-specific prf.conf files

I developed a project using nRF Connect 2.6.1 in VSCode.  I created a custom board for the development board I was using (the SparkFun Pro nRF52840 Mini - Bluetooth Development Board https://www.sparkfun.com/products/15025).  Now the final board has been produced, and I have created a custom board description for it (the final board is different than the Sparkfun board, although they both use the same processor).

I would like to be able to build my code for either the development board or the final board, so I need to have a general prf.conf file which has settings that apply to BOTH boards, and then board-specific prf.conf files that contain settings specific to the particular board.

I cannot figure out how to accomplish this.  I only seem to be able to get it pull in prf.conf.  I have created a new build configuration for the new board; what is the magic for pulling in both prf.conf and a config file for the board selected?  What does the prj file need to be named, and where should it be located?  How should the build configuration be set up?

--mkj

Parents
  • Hi there,

    so If I create a build in NRF_SDK in VScode using the Nrf52840DK board. after it make the build from a sample Blinky that runs I Know on both the DK device and my Xiao Nrf52840 Sense device. I then create a build below it (add Build conf.) and After it completes I can choose the Build All configurations and I have same src built for both boards. Is that what you are asking or did I miss it.?

    HTH

    GL :-) PJ

    I wonder if an overlay is a better way to go because they are similar?

  • I've got the two build configs (the existing one for the dev. board), and a new one for the new custom board.  What I'm trying to do is have a common prj.conf file which is shared with both build configs, plus a board-specific prj.conf file (one for each of the build configs).

    I'm not sure an overlay is the right way to go; the dev board has peripherals on it that I only use during development, and I've already got KConfig options for them (which I can enable or disable in the prj.conf file).

Reply
  • I've got the two build configs (the existing one for the dev. board), and a new one for the new custom board.  What I'm trying to do is have a common prj.conf file which is shared with both build configs, plus a board-specific prj.conf file (one for each of the build configs).

    I'm not sure an overlay is the right way to go; the dev board has peripherals on it that I only use during development, and I've already got KConfig options for them (which I can enable or disable in the prj.conf file).

Children
  • Nice, 

    Ok that seems pretty good board wise, You made a folder called boards and named two (board).conf files in there? I saw that in a video webinar I think describing that very scenario. 

    My situation is the same/similar, I have two boards , One is the DEV board and the other my production board. Same MCU's additional Flash memory an RTC and I2C on board IMU as well as the PDM microphone. optional OLED display also I2C. One push button and one Buzzer , one SPI SD-card Wink

    Your close you'll get it.

    GL :-) PJ

Related