Devicetree overview

nRF Connect for VS Code

tags
nRF Connect for VS Code

Devicetree is a hierarchical data structure used to describe hardware in Zephyr and the nRF Connect SDK.

Devicetree source files are used by Zephyr and the nRF Connect SDK to describe hardware, provide hardware initial configuration, as well as modify the hardware-related configuration of an application.

Applications can use devicetree files to provide additional board functionality such as enabling a peripheral that is disabled by default, or selecting a sensor on the board for an application-specific purpose. Along with the Kconfig system, this makes it possible to reconfigure the kernel and device drivers without modifying the source code.

The devicetree files include the following files:

  • *.dts files - the base devicetree files.
  • *.overlay files - additional files that extend the base devicetree files with application-specific modifications.
  • *.dtsi files - partial devicetree files that the preprocessor includes into the base devicetree files when building starts.

The build system puts together these three file types to complete the devicetree configuration context of a build configuration. You mostly work with *.dts and *.overlay files.

To learn more about Devicetree, read the following pages: