Multiple Board Inheritance or Overlay

Windows 11, VSCode, NCS v2.3.0

Hi, I have two custom boards that are very simple, but slightly different pin configurations from one another.

I have been using the adafruit_feather_nrf52840 board configuration for building both of them.  I have an app.overlay where I have been commenting/uncommenting the right pin configuration.

Is there a way to define my own custom boards, but "inherit" from the adafruit_feather_nrf52840?  Like, I would define minimal configuration that describes my boards differently than the adafruit_feather_nrf52840, but all the devicetree and config from adafruit_feather_nrf52840 still applies?

Thanks.

  • You can create a board-specific configuration file for each of your boards, then create a new build configuration for each board that includes their given board config.

    Or you can define new custom boards based of the Feather:

    1. Create a new board via the "Create a new board" button in the "Welcome" pane of the nRF Connect VS Code extension.

    2. Copy the dts and configuration entries from the adafruit_feather_nrf52840 board files into your newly created board files. 

    3. Make the relevant changes that you need to represent a base configuration of your custom boards in your new board files. 

    4. Create a new build configuration that targets your new board instead of adafruit_feather_nrf52840.

    5. Repeat for how many different boards you want.
  • Thank you.  I went with the overlay which I specified in different build configurations.  Much simpler.

    Thanks!

Related