Zephyr RTOS dts and overlay Search Order
Zephyr RTOS dts and overlay Search Order The build system (CMake + west build) determines which overlay files are picked up, and in what order, using a priority search scheme. Various ways of adding overlay files to the build Explicitly provided overlays If you pass overlays on the command line or via CMake variables, these always take priority: west build -b <board> -- -DDTC_OVERLAY_FILE="my.overlay;other.overlay" Or in your CMakeLists.txt: set(DTC_OVERLAY_FILE "my.overlay") These are applied first in the order you list them. Ex: my.overlay is applied first then other.overlay If DTC_OVERLAY_FILE is passed as an argument, then automatic overlay discovery is stopped. Board definition overlays from the Zephyr tree or modules If your board (from Zephyr boards/ or a module) itself ships an overlay, it is applied unless overridden by your app’s overlays. Example: ${ZEPHYR_BASE}/boards/arm/nucleo_h563zi/nucleo_h563zi.overlay The overlay discovered in ...