Skip to content
Permalink
Browse files

cmake: DT: Add support for overlays that reference board-provided dtsi

The Particle mesh feather boards provide device-tree overlays that
allow individual applications to select the SPI peripheral to be
used for the pins associated with a specific labelled SPI device.
This is necessary because different peripheral instances have slightly
different properties.

Add BOARD_DIR to DTS_ROOTS so these shared files can be located when
included from application-specific overlays.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
  • Loading branch information...
pabigot authored and galak committed Jul 4, 2019
1 parent 8e1d3f3 commit 8437ab10eb2efb1083704ee696818c1a7f93cb39
Showing with 9 additions and 6 deletions.
  1. +3 −2 cmake/dts.cmake
  2. +6 −4 doc/application/index.rst
@@ -19,11 +19,12 @@ set_ifndef(DTS_SOURCE ${BOARD_DIR}/${BOARD}.dts)
set_ifndef(DTS_COMMON_OVERLAYS ${ZEPHYR_BASE}/dts/common/common.dts)

# 'DTS_ROOT' is a list of directories where a directory tree with DT
# files may be found. It always includes the application directory and
# ${ZEPHYR_BASE}.
# files may be found. It always includes the application directory,
# the board directory, and ${ZEPHYR_BASE}.
list(APPEND
DTS_ROOT
${APPLICATION_SOURCE_DIR}
${BOARD_DIR}
${ZEPHYR_BASE}
)

@@ -701,13 +701,15 @@ You can also define the ``SOC_ROOT`` variable in the application
DeviceTree Definitions
======================

Additional DeviceTree directory trees, or DTS_ROOTs, can be added by
creating this directory tree::
DeviceTree directory trees are found in ``APPLICATION_SOURCE_DIR``,
``BOARD_DIR``, and ``ZEPHYR_BASE``, but additional trees, or DTS_ROOTs,
can be added by creating this directory tree::

dts/bindings/
include/
dts/common/
dts/arm/
include/
dts/
dts/bindings/

Where 'arm' is changed to the appropriate architecture. Each directory
is optional. The binding directory contains bindings and the other

0 comments on commit 8437ab1

Please sign in to comment.
You can’t perform that action at this time.