boards: kconfig: Add BOARD_QUALIFIERS and BOARD_TARGET
Adds the user-provided board qualifiers to Kconfig so it can be used by application code, along with one containing the full string Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
parent
a43029418c
commit
efdd9d4bdb
|
@ -19,6 +19,17 @@ config BOARD_REVISION
|
|||
"plank@foo", this option will be "foo". If BOARD is "plank",
|
||||
this option will be the empty string.
|
||||
|
||||
config BOARD_TARGET
|
||||
string
|
||||
default "$(BOARD)@$(BOARD_REVISION)$(BOARD_QUALIFIERS)" if "$(BOARD_REVISION)" != ""
|
||||
default "$(BOARD)$(BOARD_QUALIFIERS)"
|
||||
help
|
||||
Contains the board target (full string including name, revision, soc, cluster and
|
||||
variant) of the board being used.
|
||||
|
||||
For example, if building for ``nrf5340dk/nrf5340/cpuapp`` then this will contain the
|
||||
value ``nrf5340dk/nrf5340/cpuapp``.
|
||||
|
||||
config BOARD_DEPRECATED_RELEASE
|
||||
string
|
||||
help
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# Copyright (c) 2022 Nordic Semiconductor ASA
|
||||
# Copyright (c) 2022-2024 Nordic Semiconductor ASA
|
||||
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
BOARD_STRING := $(normalize_upper,$(BOARD))
|
||||
BOARD_TARGET_STRING := $(normalize_upper,$(BOARD)$(BOARD_QUALIFIERS))
|
||||
BOARD_QUALIFIERS_NO_SEPARATOR := $(substring,$(BOARD_QUALIFIERS),1)
|
||||
|
||||
config BOARD_$(BOARD_STRING)
|
||||
def_bool y
|
||||
|
@ -15,4 +16,13 @@ config BOARD_$(BOARD_TARGET_STRING)
|
|||
help
|
||||
Kconfig symbol identifying the board target.
|
||||
|
||||
config BOARD_QUALIFIERS
|
||||
string
|
||||
default "$(BOARD_QUALIFIERS_NO_SEPARATOR)"
|
||||
help
|
||||
Contains the qualifiers of the board being used without the name of the board itself.
|
||||
|
||||
For example, if building for ``nrf5340dk/nrf5340/cpuapp`` then this will contain the
|
||||
value ``nrf5340/cpuapp``.
|
||||
|
||||
osource "$(BOARD_DIR)/Kconfig.$(BOARD)"
|
||||
|
|
Loading…
Reference in a new issue