Active devicetree file

nRF Connect for VS Code

tags
nRF Connect for VS Code

By default, when you open the Devicetree Visual Editor, the name of the active file that you open or select for editing appears next to the active build context name in the Build Contexts View header. This is usually the board DTS file or an overlay file (if the build configuration uses one) and it is considered the active devicetree file. The contents of the active file always take precedence over contents of other devicetree files within the given build configuration.

When you select (open) a different file in the View, the selected file becomes the active file and the following happens:

  • The file opens in the Editor.
  • The Build Contexts View is updated to show the build contexts that use the active file. This can include other build configurations, even from applications that are not currently active in the Applications View.

Tip

For information about how to add a context file, see How to create devicetree files.

In the following example, switching from app.overlay to nrf52840dk_nrf52840 file in Files (and later to nrf5340dk_nrf5340_cpuapp_ns.dts file) triggers an update of the Build Contexts View, which shows other build contexts that are using the selected file, including build configurations that do not belong to the active application.

Selecting a different file refreshes Build Contexts