cmake: modules: configuration_files: Add support for soc overlays

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 <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae 2024-04-11 09:15:41 +01:00 committed by Fabio Baltieri
parent 6f58159a72
commit 6ed5ac7111
1 changed files with 3 additions and 3 deletions

View File

@ -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()
@ -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 \