【nRF Connect SDK/VSCode】build failed for example project

Hello Nordic Experts,

Recently, I followed the tutorials which are from youbute, but it failed when I tried to build the example project, my setups as below:

  1. VScode v1.66.2
  2. nRF connect SDK v1.9.1
  3. nRF connect toolchain v1.9.1
  4. hello_world example project
  5. nRF52840 DK

the error info as below:

> Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for f:\Bluetooth\Nordic\SDK\hello_world <

Building hello_world
west build --build-dir f:\Bluetooth\Nordic\SDK\hello_world\build f:\Bluetooth\Nordic\SDK\hello_world --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y

-- west build: generating a build system
Including boilerplate (Zephyr base): F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: F:/Bluetooth/Nordic/SDK/hello_world
-- Zephyr version: 2.7.99 (F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/zephyr/.cache
-- Found dtc: F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (f:/Bluetooth/Nordic/SDK/NCS/v1.9.1/toolchain/opt)
-- Found BOARD.dts: F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: F:/Bluetooth/Nordic/SDK/hello_world/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: F:/Bluetooth/Nordic/SDK/hello_world/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: F:/Bluetooth/Nordic/SDK/hello_world/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: F:/Bluetooth/Nordic/SDK/hello_world/build/zephyr/dts.cmake

warning: the hex symbol NRF_MODEM_LIB_SHMEM_CTRL_SIZE (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\lib\nrf_modem_lib\Kconfig.modemlib:97) has a non-hex default NRF_MODEM_SHMEM_CTRL_SIZE (undefined)

warning: MBEDTLS_SHA1_C (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls.defconfig:9, F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:1) defined without a type

warning: MBEDTLS_TLS_LIBRARY (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:9) defined without a type

warning: MBEDTLS_X509_LIBRARY (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:12) defined without a type

warning: MBEDTLS_ECP_C (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:21) defined without a type

warning: MBEDTLS_CTR_DRBG_C (defined at F:/BluetParsing F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/zephyr/Kconfig
Loaded configuration 'F:/Bluetooth/Nordic/SDK/NCS/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration 'F:/Bluetooth/Nordic/SDK/hello_world/prj.conf'
Merged configuration 'F:/Bluetooth/Nordic/SDK/hello_world/build/zephyr/misc/generated/extra_kconfig_options.conf'
f:\Bluetooth\Nordic\SDK\hello_world\build\ooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:24) defined without a type

warning: MBEDTLS_CMAC_C (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:33) defined without a type

warning: MBEDTLS_CCM_C (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:36) defined without a type

warning: MBEDTLS_PSA_CRYPTO_STORAGE_C (defined at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\nrf\modules\trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:48) defined without a type

warning: HAS_NORDIC_DRIVERS (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\modules\hal_nordic\Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF52X (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\soc\arm\nordic_nrf\nrf52\Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: HAS_NRFX (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\modules\hal_nordic\nrfx\Kconfig:4) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
 - SOC_SERIES_NRF52X (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\soc\arm\nordic_nrf\nrf52\Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: NRFX_CLOCK (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\modules\hal_nordic\nrfx\Kconfig:14) has direct dependencies HAS_HW_NRF_CLOCK && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\drivers\clock_control\Kconfig.nrf:13), with value y, direct dependencies SOC_COMPATIBLE_NRF && CLOCK_CONTROL (value: y), and select condition !CLOCK_CONTROL_NRF_FORCE_ALT && SOC_COMPATIBLE_NRF && CLOCK_CONTROL (value: y)

warning: NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\modules\hal_nordic\nrfx\Kconfig:18) has direct dependencies NRFX_CLOCK && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - CLOCK_CONTROL_NRF_K32SRC_XTAL (defined at drivef:\Bluetooth\Nordic\SDK\hello_world\build\rs\clock_control\Kconfig.nrf:36), with value y, direct dependencies <choice CLOCK_CONTROL_NRF_SOURCE> (value: y), and select condition !SOC_SERIES_BSIM_NRFXX && !CLOCK_CONTROL_NRF_FORCE_ALT && <choice CLOCK_CONTROL_NRF_SOURCE> (value: y)

warning: NRFX_GPIOTE (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\modules\hal_nordic\nrfx\Kconfig:65) has direct dependencies HAS_HW_NRF_GPIOTE && HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
 - GPIO_NRFX (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\drivers\gpio\Kconfig.nrfx:4), with value y, direct dependencies SOC_FAMILY_NRF && GPIO (value: y), and select condition SOC_FAMILY_NRF && GPIO (value: y)

warning: NRFX_PPI (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\modules\hal_nordic\nrfx\Kconfig:109, f:\Bluetooth\Nordic\SDK\hello_world\build\drivers\serial\Kconfig.nrfx:381) has direct dependencies (HAS_HW_NRF_PPI && HAS_NRFX && 0) || (HAS_HW_NRF_PPI && (UART_0_NRF_HW_ASYNC || UART_1_NRF_HW_ASYNC || UART_2_NRF_HW_ASYNC || UART_3_NRF_HW_ASYNC) && UART_NRFX && SERIAL) with value n, but is currently being y-selected by the following symbols:
 - UART_ENHANCED_POLL_OUT (defined at f:\Bluetooth\Nordic\SDK\hello_world\build\drivers\serial\Kconfig.nrfx:398), with value y, direct dependencies (UART_0_ENHANCED_POLL_OUT || UART_1_ENHANCED_POLL_OUT || UART_2_ENHANCED_POLL_OUT || UART_3_ENHANCED_POLL_OUT) && UART_NRFX && SERIAL (value: y), and select condition HAS_HW_NRF_PPI && (UART_0_ENHANCED_POLL_OUT || UART_1_ENHANCED_POLL_OUT || UART_2_ENHANCED_POLL_OUT || UART_3_ENHANCED_POLL_OUT) && UART_NRFX && SERIAL (value: y)

error: Aborting due to Kconfig warnings

CMake Error at F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\zephyr\cmake\kconfig.cmake:272 (message):
  command failed with return code: 1
Call Stack (most recent call first):
  F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\zephyr\cmake\app\boilerplate.cmake:544 (include)
  F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:24 (include)
  F:\Bluetooth\Nordic\SDK\NCS\v1.9.1\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:35 (include_boilerplate)
  f:\Bluetooth\Nordic\SDK\hello_world\build\CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'f:\Bluetooth\Nordic\SDK\NCS\v1.9.1\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=f:\Bluetooth\Nordic\SDK\NCS\v1.9.1\toolchain\opt\bin\python.exe' '-Bf:\Bluetooth\Nordic\SDK\hello_world\build' '-Sf:\Bluetooth\Nordic\SDK\hello_world' -GNinja -DBOARD=nrf52840dk_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y
The terminal process terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

can you give me a hand?

Parents Reply Children
Related