You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, <revision> can be either a numeric MAJOR.MINOR.PATCH style revision like 1.5.0, an integer number like 1, or single letter like A, B, etc. Zephyr provides a CMake board extension function, board_check_revision(), to make it easy to match either style from revision.cmake.
Consider the example of having a board with 2 board revisions, let's call it plank and the two revisions being 0 and 1, then create 2 overlay files in the board directory plank_0.overlay and plank_1.overlay, with the following revision.cmake file:
board_check_revision(FORMAT NUMBER
DEFAULT_REVISION 0
HIGHEST_REVISION 1
VALID_REVISIONS 0 1
)
When configuring for board plank@1, the plank_1.overlay file is correctly included, however when configuring for plank, the build system correct output that it is using revision 0, but the plank_0.overlay file is completely ignored, this is best illistrated by just having a file full of garbage, one would expect cmake to error out, but no error occurs (this is using sysbuild):
-- Zephyr version: 3.5.99 (/tmp/net/zephyr)
-- Found west (found suitable version "1.1.0", minimum required is "0.14.0")
-- Board: plank, Revision: 0
-- ZEPHYR_TOOLCHAIN_VARIANT not set, trying to locate Zephyr SDK
-- Found host-tools: zephyr 0.16.3 (/opt/zephyr-sdk-0.16.3)
...
-- Including signing script: /tmp/net/zephyr/cmake/mcuboot.cmake
-- Configuring done (4.4s)
-- Generating done (0.1s)
-- Build files have been written to: /tmp/net/net_loader/app/_AA/app
--
To Reproduce
Create a board with revision 0 (and another revision), create a revision 0 overlay, try configuring project, overlay is unused.
Expected behavior
Overlay to be used
Impact
Annoyance
Environment (please complete the following information):
Describe the bug
The documentation on https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#multiple-board-revisions states the following:
Consider the example of having a board with 2 board revisions, let's call it
plank
and the two revisions being 0 and 1, then create 2 overlay files in the board directoryplank_0.overlay
andplank_1.overlay
, with the following revision.cmake file:When configuring for board
plank@1
, theplank_1.overlay
file is correctly included, however when configuring forplank
, the build system correct output that it is using revision 0, but theplank_0.overlay
file is completely ignored, this is best illistrated by just having a file full of garbage, one would expect cmake to error out, but no error occurs (this is using sysbuild):To Reproduce
Create a board with revision 0 (and another revision), create a revision 0 overlay, try configuring project, overlay is unused.
Expected behavior
Overlay to be used
Impact
Annoyance
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: