Skip to content
Commit 105a2bae authored by Grzegorz Swiderski's avatar Grzegorz Swiderski Committed by Carles Cufi
Browse files

cmake: modules: boards: Fix board deprecation for HWMv2



Deprecating boards comes with similar challenges as with board aliases,
since BOARD_DEPRECATED is also set after parsing BOARD as user input.

With this patch, a deprecated board can be properly translated to a
board with identifiers. This opens up the possibility of recording all
legacy board names in `boards/deprecated.cmake`, such as:

   set(mps2_an521_remote_DEPRECATED mps2/an521/cpu1)

Unlike with aliases, though, there are additional restrictions for
building with BOARD=<deprecated>, which only makes this feature suitable
for deprecating v1 boards:

 * BOARD=<deprecated>/<identifier> is never allowed.
 * BOARD=<deprecated>@<revision> is not allowed if the old board already
   corresponds to a new board revision:

   set(<deprecated>_DEPRECATED <new-board>@<new-revision>)

Future enhancements will be needed for deprecating v2 boards.

Signed-off-by: default avatarGrzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
parent dca54e00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment