zephyr/cmake/modules
Torsten Rasmussen 4e3a01df41 cmake: support shortened file names for single SoC boards
This allow developers to create board files without the SoC name when
the board only defines a single SoC.

This means that a board, such as rpi_pico, which defines only a single
SoC, rp2040, and one variant, now allows the following file names:
Board target: rpi_pico/rp2040
- dts: rpi_pico_rp2040.dts, short: rpi_pico.dts
- defconfig: rpi_pico_rp2040_defconfig, short: rpi_pico_defconfig
- overlay: rpi_pico_rp2040.overlay, short: rpi_pico.overlay
- conf:  rpi_pico_rp2040.conf, short: rpi_pico.conf

Board target: rpi_pico/rp2040/w
- dts: rpi_pico_rp2040_w.dts, short: rpi_pico_w.dts
- defconfig: rpi_pico_rp2040_w_defconfig, short: rpi_pico_w_defconfig
- overlay: rpi_pico_rp2040_w.overlay, short: rpi_pico_w.overlay
- conf:  rpi_pico_rp2040_w.conf, short: rpi_pico_w.conf

A multi CPU cluster board, nrf5340dk:
Board target: nrf5340dk/nrf5340/cpunet
- dts: nrf5340dk_nrf5340_cpunet.dts, short: nrf5340dk_cpunet.dts
- defconfig: nrf5340dk_nrf5340_cpunet_defconfig,
             short: nrf5340dk_cpunet_defconfig
- overlay: nrf5340dk_nrf5340_cpunet.overlay,
           short: nrf5340dk_cpunet.overlay
- conf:  nrf5340dk_nrf5340_cpunet.conf, short: nrf5340dk_cpunet.conf

A multi SoC board, nrf5340dk (real: nrf52840, emulated: nrf52811):
Board target: nrf52840dk/nrf52840
- dts: nrf52840dk_nrf52840.dts, short: Not possible
- defconfig: nrf52840dk_nrf52840_defconfig, short: Not possible
- overlay: nrf52840dk_nrf52840.overlay, short: Not possible
- conf:  nrf52840dk_nrf52840.conf, short: Not possible

If two conflicting files are found, for example both
rpi_pico_rp2040.overlay and rpi_pico.overlay, then an error is raised.

If short form is detected for a board target with multiple SoCs, for
example nrf52840dk_nrf52840.overlay and nrf52840dk.overlay, then an
error is raised.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-04-09 23:35:54 +02:00
..
Platform cmake: conditionally enable shared library support 2024-04-08 09:04:32 +02:00
FindBabbleSim.cmake nrf5_bsim cmake: Check that the simulator version is new enough 2024-03-19 21:18:13 -05:00
FindDeprecated.cmake
FindDtc.cmake
FindGnuLd.cmake
FindHostTools.cmake
FindLlvmLld.cmake
FindScaTools.cmake
FindTargetTools.cmake cmake: conditionally enable shared library support 2024-04-08 09:04:32 +02:00
FindZephyr-sdk.cmake
Findarmclang.cmake
FindoneApi.cmake
arch_v1.cmake
arch_v2.cmake
basic_settings.cmake
boards.cmake cmake: support shortened file names for single SoC boards 2024-04-09 23:35:54 +02:00
ccache.cmake
configuration_files.cmake cmake: support shortened file names for single SoC boards 2024-04-09 23:35:54 +02:00
doc.cmake
dts.cmake cmake: support shortened file names for single SoC boards 2024-04-09 23:35:54 +02:00
extensions.cmake cmake: support shortened file names for single SoC boards 2024-04-09 23:35:54 +02:00
generated_file_directories.cmake
hwm_v2.cmake
kconfig.cmake scripts: remove boards_legacy sub-folder from list_boards.py 2024-03-22 11:51:58 +01:00
kernel.cmake
pre_dt.cmake
python.cmake
root.cmake
shields.cmake
snippets.cmake
soc_v1.cmake
soc_v2.cmake cmake: add CMake configure dependency to board.yml 2024-03-22 13:02:00 +00:00
unittest.cmake unittest: update unittest to hwmv2 2024-03-22 11:51:58 +01:00
user_cache.cmake
version.cmake
west.cmake
zephyr_default.cmake
zephyr_module.cmake