zephyr/cmake
Torsten Rasmussen 77ecd6837d cmake: support versioning of board
This commit introduces support for versioning of boards.
The existing board handling is limited in such a way that it is not
possible to support a specific board in multiple variants.

This commit introduces versioning of board revisions so that it is
possible to support minor variations to a board without having to
defining a completely new board.

This can be done by adding a revision.cmake file in the board folder:
boards/<arch>/<board-dir>/revision.cmake

Depending on the revision format chosen, additional configuration files
for each revision available must also be added, those have the form:
boards/<arch>/<board-dir>/<board>_<revision>.conf

Examples:
boards/<arch>/<board-dir>/<board>_defconfig:  Common board settings

Revision format: MAJOR.MINOR.PATCH
boards/<arch>/<board-dir>/<board>_0_5_0.conf: Revision 0.5.0
boards/<arch>/<board-dir>/<board>_1_0_0.conf: Revision 1.0.0
boards/<arch>/<board-dir>/<board>_1_5_0.conf: Revision 1.5.0

Revision format: LETTER
boards/<arch>/<board-dir>/<board>_A.conf:     Revision A
boards/<arch>/<board-dir>/<board>_B.conf:     Revision B

The `board_check_revision` function is available in `extensions.cmake`
to facilitate board revision handling in `revision.cmake`.

User select the board revision using: `-DBOARD=<board>@<revision>`, as
example `-DBOARD=plank@0.5.0`.

If a shield, test, sample, or application needs to specify DTS overlay
or Kconfig fragments, this can be done by adding revision specific
configuration files in the sample/test/shield folder, like this:
<shield/sample-path>/boards/<board>.conf
<shield/sample-path>/boards/<board>_<revision>.conf

or if there is there is only a need for adjusting on a given board
revision:
<shield/sample-path>/boards/<board>_<revision>.conf

Similar for DTS overlay files:
<shield-path>/boards/<board>.overlay
<shield-path>/boards/<board>_<revision>.overlay

or:
<shield-path>/boards/<board>_<revision>.conf

For test/samples/apps:
<sample-path>/<board>.overlay
<sample-path>/<board>_<revision>.overlay

or:
<sample-path>/<board>_<revision>.overlay

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-16 08:50:10 -05:00
..
app cmake: support versioning of board 2020-12-16 08:50:10 -05:00
bintools bintools: append ; to > to ensure a space 2020-11-26 14:20:03 +01:00
compiler SPARC: add FPU support 2020-12-04 14:33:43 +02:00
emu sanitycheck: Add TSIM3 support 2020-11-13 14:53:55 -08:00
flash cmake: flash signed binaries for mcuboot 2020-09-03 16:49:09 -05:00
ide
linker cmake: adding $<SEMICOLON> instead of space on zephyr_get_compile_<type> 2020-12-03 09:23:07 -05:00
makefile_exports cmake: using zephyr_get_compile_options_for_lang_as_string for export 2020-12-15 08:37:54 -05:00
reports
toolchain cmake: Preparation for SDK 0.12 and SPARC 2020-11-19 16:57:37 -05:00
usage
util
boards.cmake
ccache.cmake
cfb.cmake
dts.cmake cmake: support versioning of board 2020-12-16 08:50:10 -05:00
extensions.cmake cmake: support versioning of board 2020-12-16 08:50:10 -05:00
extra_flags.cmake
gcc-m-cpu.cmake
generic_toolchain.cmake cmake: Ignore LDFLAGS and AFLAGS from environment 2020-09-10 15:35:50 -05:00
git.cmake
hex.cmake
host-tools.cmake
kconfig.cmake cmake: support versioning of board 2020-12-16 08:50:10 -05:00
kobj.cmake
mcuboot.cmake cmake: mcuboot: confirmed images needs to be padded 2020-09-04 12:00:04 +02:00
pristine.cmake
python.cmake
target_toolchain_flags.cmake cmake: use the toolchain path, id and version as extended signature. 2020-12-14 11:56:00 -05:00
target_toolchain.cmake cmake: use the toolchain path, id and version as extended signature. 2020-12-14 11:56:00 -05:00
version.cmake
west.cmake
zephyr_module.cmake