Skip to content
Permalink
Browse files

build: dts: also look for application specific dts overlay

Not all DTS changes are board specific and we should support overlays
that can be used with multiple boards. For example with a sensor, for
example:

Use this overlay for a sensor:

	&arduino_i2c {
		bme280@76 {
			compatible = "bosch,bme280";
			reg = <0x76>;
			label = "BME280";
		};
	};

This will work with any board that has &arduino_i2c defined, but should
also work if you specify the instance directly (&i2c0 or &i2c1).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jun 15, 2019
1 parent ee01d0a commit d6426226cbd3c85fadbb4d0952b971c9af36de11
Showing with 2 additions and 0 deletions.
  1. +2 −0 cmake/app/boilerplate.cmake
@@ -397,6 +397,8 @@ elseif(DEFINED ENV{DTC_OVERLAY_FILE})
set(DTC_OVERLAY_FILE $ENV{DTC_OVERLAY_FILE})
elseif(EXISTS ${APPLICATION_SOURCE_DIR}/${BOARD}.overlay)
set(DTC_OVERLAY_FILE ${APPLICATION_SOURCE_DIR}/${BOARD}.overlay)
elseif(EXISTS ${APPLICATION_SOURCE_DIR}/app.overlay)
set(DTC_OVERLAY_FILE ${APPLICATION_SOURCE_DIR}/app.overlay)
endif()

set(DTC_OVERLAY_FILE ${DTC_OVERLAY_FILE} CACHE STRING "If desired, you can \

0 comments on commit d642622

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