Skip to content

Commit

Permalink
cmake: modules: configuration_files: Add support for soc overlays
Browse files Browse the repository at this point in the history
Adds support for SoC overlay files which go in a ``socs`` folder
in application folders and functions similar to the ``boards``
folder, but works for SoCs instead of boards

Signed-off-by: Jamie McCrae <[email protected]>
  • Loading branch information
nordicjm authored and fabiobaltieri committed Apr 29, 2024
1 parent 6f58159 commit 6ed5ac7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/modules/configuration_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,10 @@ zephyr_boilerplate_watch(CONF_FILE)

zephyr_get(DTC_OVERLAY_FILE SYSBUILD LOCAL)

# If DTC_OVERLAY_FILE is not set by the user, look for board-specific overlays
# in the 'boards' configuration subdirectory.
# If DTC_OVERLAY_FILE is not set by the user, look for SoC and board-specific overlays
# in the 'boards' and `soc` configuration subdirectories.
if(NOT DEFINED DTC_OVERLAY_FILE)
zephyr_file(CONF_FILES ${APPLICATION_CONFIG_DIR}/socs DTS DTC_OVERLAY_FILE QUALIFIERS SUFFIX ${FILE_SUFFIX})
zephyr_file(CONF_FILES ${APPLICATION_CONFIG_DIR}/boards DTS DTC_OVERLAY_FILE SUFFIX ${FILE_SUFFIX})
endif()

Expand All @@ -91,7 +92,6 @@ if(NOT DEFINED DTC_OVERLAY_FILE)
NAMES "app.overlay" SUFFIX ${FILE_SUFFIX}
)
endif()

endif()

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

0 comments on commit 6ed5ac7

Please sign in to comment.