Skip to content

Commit db8f991

Browse files
nordicjmkartben
authored andcommitted
kconfig: Use $(...) instead of ${...} for getting variables
Updates this to comply with the Zephyr Kconfig recommendations Signed-off-by: Jamie McCrae <[email protected]>
1 parent ea9815f commit db8f991

File tree

28 files changed

+44
-44
lines changed

28 files changed

+44
-44
lines changed

Kconfig.zephyr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
source "Kconfig.constants"
99

10-
osource "${APPLICATION_SOURCE_DIR}/VERSION"
10+
osource "$(APPLICATION_SOURCE_DIR)/VERSION"
1111

1212
# Include Kconfig.defconfig files first so that they can override defaults and
1313
# other symbol/choice properties by adding extra symbol/choice definitions.
@@ -963,7 +963,7 @@ config BUILD_OUTPUT_STRIP_PATHS
963963
bool "Strip absolute paths from binaries"
964964
default y
965965
help
966-
If the compiler supports it, strip the ${ZEPHYR_BASE} prefix from the
966+
If the compiler supports it, strip the $(ZEPHYR_BASE) prefix from the
967967
__FILE__ macro used in __ASSERT*, in the
968968
.noinit."/home/joe/zephyr/fu/bar.c" section names and in any
969969
application code.

boards/qemu/x86/Kconfig.defconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ config HAVE_CUSTOM_LINKER_SCRIPT
100100
default y
101101

102102
config CUSTOM_LINKER_SCRIPT
103-
default "${ZEPHYR_BASE}/boards/qemu/x86/qemu_x86_tiny.ld"
103+
default "$(ZEPHYR_BASE)/boards/qemu/x86/qemu_x86_tiny.ld"
104104

105105
config X86_EXTRA_PAGE_TABLE_PAGES
106106
# This is needed for gen_mmu.py to map the flash into memory

doc/build/sysbuild/images.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,13 +151,13 @@ more complex to create but is the preferred method for adding images to upstream
151151
152152
config OTHER_APP_IMAGE_PATH
153153
string
154-
default "${ZEPHYR_MY_IMAGE_MODULE_DIR}/path/to/my_image" if OTHER_APP_IMAGE_MY_IMAGE
154+
default "$(ZEPHYR_MY_IMAGE_MODULE_DIR)/path/to/my_image" if OTHER_APP_IMAGE_MY_IMAGE
155155
help
156156
Source directory of other app image.
157157
158158
.. note::
159159

160-
Remember to have ``source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"`` in the file if this
160+
Remember to have ``source "$(ZEPHYR_BASE)/share/sysbuild/Kconfig"`` in the file if this
161161
is being applied in an application ``Kconfig.sysbuild`` file.
162162

163163
.. group-tab:: ``sysbuild.cmake``
@@ -212,7 +212,7 @@ This can then be extended by :ref:`modules` like so:
212212
default "my_second_image" if OTHER_APP_IMAGE_MY_SECOND_IMAGE
213213
214214
config OTHER_APP_IMAGE_PATH
215-
default "${ZEPHYR_MY_SECOND_IMAGE_MODULE_DIR}/path/to/my_second_image" if OTHER_APP_IMAGE_MY_SECOND_IMAGE
215+
default "$(ZEPHYR_MY_SECOND_IMAGE_MODULE_DIR)/path/to/my_second_image" if OTHER_APP_IMAGE_MY_SECOND_IMAGE
216216
217217
As can be seen, no additional CMake changes are needed to add an alternative image as the base
218218
CMake code will add the replacement image instead of the original image, if selected.

drivers/usb/uvb/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ config UVB_MAX_MESSAGES
2222

2323
module = UVB
2424
module-str = USB virtual bus service
25-
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
25+
source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config"
2626

2727
endif # UVB

kernel/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ config STACK_CANARIES_ALL
957957
config STACK_CANARIES_EXPLICIT
958958
bool "Explicit protection"
959959
depends on ENTROPY_GENERATOR || TEST_RANDOM_GENERATOR
960-
depends on "${ZEPHYR_TOOLCHAIN_VARIANT}" = "zephyr"
960+
depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "zephyr"
961961
select NEED_LIBC_MEM_PARTITION if !STACK_CANARIES_TLS
962962
select REQUIRES_STACK_CANARIES
963963
help

lib/runtime/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
config COMPILER_RT_SUPPORTED
55
bool
66
default y
7-
depends on "${ZEPHYR_TOOLCHAIN_VARIANT}" = "llvm"
7+
depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "llvm"
88
help
99
Selected when the compiler supports compiler-rt runtime library.
1010

modules/nrf_wifi/bus/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ config NRF71_ON_IPC
4343
module = WIFI_NRF70_BUSLIB
4444
module-dep = LOG
4545
module-str = Log level for Wi-Fi nRF70 bus library
46-
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
46+
source "$(ZEPHYR_BASE)/subsys/logging/Kconfig.template.log_config"
4747

4848
config WIFI_NRF70_BUSLIB_LOG_LEVEL
4949
# Enable error by default

modules/trusted-firmware-m/Kconfig.tfm

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ config TFM_BOARD
2323
default "arm/musca_b1" if BOARD_V2M_MUSCA_B1
2424
default "arm/musca_s1" if BOARD_V2M_MUSCA_S1
2525
default "adi/max32657" if BOARD_MAX32657EVKIT_MAX32657_NS
26-
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf9160" if SOC_NRF9160
27-
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf9120" if SOC_NRF9120
28-
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf5340_cpuapp" if SOC_NRF5340_CPUAPP
29-
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf54l15_cpuapp" if SOC_NRF54L15_CPUAPP
30-
default "${ZEPHYR_BASE}/modules/trusted-firmware-m/nordic/nrf54l10_cpuapp" if SOC_NRF54L10_CPUAPP
26+
default "$(ZEPHYR_BASE)/modules/trusted-firmware-m/nordic/nrf9160" if SOC_NRF9160
27+
default "$(ZEPHYR_BASE)/modules/trusted-firmware-m/nordic/nrf9120" if SOC_NRF9120
28+
default "$(ZEPHYR_BASE)/modules/trusted-firmware-m/nordic/nrf5340_cpuapp" if SOC_NRF5340_CPUAPP
29+
default "$(ZEPHYR_BASE)/modules/trusted-firmware-m/nordic/nrf54l15_cpuapp" if SOC_NRF54L15_CPUAPP
30+
default "$(ZEPHYR_BASE)/modules/trusted-firmware-m/nordic/nrf54l10_cpuapp" if SOC_NRF54L10_CPUAPP
3131
help
3232
The board name used for building TFM. Building with TFM requires that
3333
TFM has been ported to the given board/SoC.
@@ -256,7 +256,7 @@ config TFM_BL2_SIGNING_KEY_PATH
256256
string "Path to private key used to sign BL2 firmware images."
257257
help
258258
Path to binary BL2 signing private key
259-
Default is ${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/bl1/bl1_2/bl1_dummy_rotpk
259+
Default is $(ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR)/bl1/bl1_2/bl1_dummy_rotpk
260260
if it has not been changed on TF-M side for your board
261261

262262
endif # TFM_BL1
@@ -281,7 +281,7 @@ config TFM_MCUBOOT_SIGNATURE_TYPE
281281

282282
config TFM_KEY_FILE_S
283283
string "Path to private key used to sign secure firmware images."
284-
default "${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/bl2/ext/mcuboot/root-${CONFIG_TFM_MCUBOOT_SIGNATURE_TYPE}.pem"
284+
default "$(ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR)/bl2/ext/mcuboot/root-${CONFIG_TFM_MCUBOOT_SIGNATURE_TYPE}.pem"
285285
help
286286
The path and filename for the .pem file containing the private key
287287
that should be used by the BL2 bootloader when signing secure
@@ -290,7 +290,7 @@ config TFM_KEY_FILE_S
290290

291291
config TFM_KEY_FILE_NS
292292
string "Path to private key used to sign non-secure firmware images."
293-
default "${ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR}/bl2/ext/mcuboot/root-${CONFIG_TFM_MCUBOOT_SIGNATURE_TYPE}_1.pem"
293+
default "$(ZEPHYR_TRUSTED_FIRMWARE_M_MODULE_DIR)/bl2/ext/mcuboot/root-${CONFIG_TFM_MCUBOOT_SIGNATURE_TYPE}_1.pem"
294294
help
295295
The path and filename for the .pem file containing the private key
296296
that should be used by the BL2 bootloader when signing non-secure
@@ -334,7 +334,7 @@ endchoice
334334
config TFM_ETHOS_DRIVER_PATH_LOCAL
335335
string "Path to a locally available Ethos-U driver or an empty string"
336336
depends on SOC_SERIES_MPS3 || SOC_SERIES_MPS4
337-
default "${ZEPHYR_HAL_ETHOS_U_MODULE_DIR}"
337+
default "$(ZEPHYR_HAL_ETHOS_U_MODULE_DIR)"
338338
help
339339
Path to a locally available Ethos-U driver to be used for TF-M builds or
340340
an empty string to allow TF-M to automatically fetch the Ethos-U

samples/drivers/mbox/Kconfig.sysbuild

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ config REMOTE_BOARD
2222
default "nrf54lm20dk/nrf54lm20a/cpuflpr" if $(BOARD) = "nrf54lm20dk"
2323
default "ophelia4ev/cpuflpr" if $(BOARD) = "ophelia4ev"
2424
default "stm32h747i_disco/stm32h747xx/m4" if $(BOARD) = "stm32h747i_disco"
25-
default "esp32_devkitc/esp32/appcpu" if "$(BOARD)${BOARD_QUALIFIERS}" = "esp32_devkitc/esp32/procpu"
26-
default "esp32s3_devkitm/esp32s3/appcpu" if "$(BOARD)${BOARD_QUALIFIERS}" = "esp32s3_devkitm/esp32s3/procpu"
27-
default "esp32c6_devkitc/esp32c6/lpcore" if "$(BOARD)${BOARD_QUALIFIERS}" = "esp32c6_devkitc/esp32c6/hpcore"
28-
default "bl54l15_dvk/nrf54l15/cpuflpr" if "$(BOARD)${BOARD_QUALIFIERS}" = "bl54l15_dvk/nrf54l15/cpuapp"
25+
default "esp32_devkitc/esp32/appcpu" if "$(BOARD)$(BOARD_QUALIFIERS)" = "esp32_devkitc/esp32/procpu"
26+
default "esp32s3_devkitm/esp32s3/appcpu" if "$(BOARD)$(BOARD_QUALIFIERS)" = "esp32s3_devkitm/esp32s3/procpu"
27+
default "esp32c6_devkitc/esp32c6/lpcore" if "$(BOARD)$(BOARD_QUALIFIERS)" = "esp32c6_devkitc/esp32c6/hpcore"
28+
default "bl54l15_dvk/nrf54l15/cpuflpr" if "$(BOARD)$(BOARD_QUALIFIERS)" = "bl54l15_dvk/nrf54l15/cpuapp"
2929
default "bl54l15u_dvk/nrf54l15/cpuflpr" if $(BOARD) = "bl54l15u_dvk"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2024 Nordic Semiconductor ASA
22
# SPDX-License-Identifier: Apache-2.0
33

4-
source "${ZEPHYR_BASE}/share/sysbuild/Kconfig"
4+
source "$(ZEPHYR_BASE)/share/sysbuild/Kconfig"
55

66
config REMOTE_BOARD
77
string "The board used for remote target"

0 commit comments

Comments
 (0)