zephyr/cmake
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
..
app
bintools
compiler
emu
flash
ide
linker
linker_script
makefile_exports
modules cmake: support shortened file names for single SoC boards 2024-04-09 23:35:54 +02:00
reports
sca
toolchain
usage
util
cfb.cmake
extra_flags.cmake
gcc-m-cpu.cmake
gcc-m-fpu.cmake
gen_version_h.cmake
hex.cmake
kobj.cmake
mcuboot.cmake
package_helper.cmake
pristine.cmake
target_toolchain_flags.cmake
verify-toolchain.cmake
vif.cmake