Configuring incomplete, errors occurred! using nRF Connect for VS code with nRF5340 DK

Please, I am trying to learn how to use VS Code with nRF Connect and this is throwing errors. I have followed the instructions in these videos:

nRF Connect for VS Code, part 1: Installation

nRF Connect for VS Code, part 2: Creating an application

nRF Connect for VS Code, part 3: Building an application

nRF Connect for VS Code, part 4: Flashing an application

However, when I get to part 3 this throws configuration errors:

Executing task: nRF Connect: Generate config nrf5340_audio_dk_nrf5340_cpuapp for c:\nordic\myApps\blinky_demo

Building blinky_demo
C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/nordic/myApps/blinky_demo/build c:/nordic/myApps/blinky_demo --pristine --board nrf5340_audio_dk_nrf5340_cpuapp --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING="c:/nordic/myapps/blinky_demo""

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: C:/nordic/myApps/blinky_demo
-- CMake version: 3.20.5
-- Found Python3: C:/ncs/toolchains/31f4403e35/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Cache files will be written to: C:/ncs/v2.4.1/zephyr/.cache
-- Zephyr version: 3.3.99 (C:/ncs/v2.4.1/zephyr)
-- Found west (found suitable version "1.0.0", minimum required is "0.7.1")
-- Board: nrf5340_audio_dk_nrf5340_cpuapp
-- Found host-tools: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found toolchain: zephyr 0.16.0 (C:/ncs/toolchains/31f4403e35/opt/zephyr-sdk)
-- Found Dtc: C:/ncs/toolchains/31f4403e35/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found BOARD.dts: C:/ncs/v2.4.1/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: C:/nordic/myApps/blinky_demo/build/zephyr/zephyr.dts
-- Generated devicetree_generated.h: C:/nordic/myApps/blinky_demo/build/zephyr/include/generated/devicetree_generated.h
-- Including generated dts.cmake file: C:/nordic/myApps/blinky_demo/build/zephyr/dts.cmake
Parsing C:/ncs/v2.4.1/zephyr/Kconfig
Loaded configuration 'C:/ncs/v2.4.1/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/nrf5340_audio_dk_nrf5340_cpuapp_defconfig'
Merged configuration 'C:/nordic/myApps/blinky_demo/prj.conf'
Merged configuration 'C:/nordic/myApps/blinky_demo/build/zephyr/misc/generated/extra_kconfig_options.conf'

warning: the hex symbol NRF_MODEM_LIB_SHMEM_CTRL_SIZE (defined at C:/ncs/v2.4.1/nrf\lib\nrf_modem_lib\Kconfig.modemlib:45) has a non-hex default NRF_MODEM_SHMEM_CTRL_SIZE (undefined)

warning: the default selection OPENTHREAD_LIBRARY (undefined) of <choice OPENTHREAD_IMPLEMENTATION> (defined at C:/ncs/v2.4.1/nrf\subsys/net/openthread/Kconfig.defconfig:29, subsys/net/l2/openthread/Kconfig:36) is not contained in the choice

warning: HAS_SEGGER_RTT (defined at modules\segger\Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
- SOC_SERIES_NRF53X (defined at soc/arm/nordic_nrf\nrf53\Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: HAS_NORDIC_DRIVERS (defined at modules\hal_nordic\Kconfig:7) has direct dependencies 0 with value n, but is currently being y-selected by the following symbols:
- SOC_SERIES_NRF53X (defined at soc/arm/nordic_nrf\nrf53\Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: HAS_NRFX (defined at 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_NRF53X (defined at soc/arm/nordic_nrf\nrf53\Kconfig.series:6), with value y, direct dependencies <choice> (value: y), and select condition <choice> (value: y)

warning: NRFX_GPIOTE (defined at modules\hal_nordic\nrfx/Kconfig:63) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- GPIO_NRFX (defined at drivers/gpio/Kconfig.nrfx:4), with value y, direct dependencies DT_HAS_NORDIC_NRF_GPIO_ENABLED && GPIO (value: y), and select condition DT_HAS_NORDIC_NRF_GPIO_ENABLED && GPIO (value: y)

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

warning: NRFX_CLOCK_LFXO_TWO_STAGE_ENABLED (defined at 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 drivers/clock_control/Kconfig.nrf:37), 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_DPPI (defined at modules\hal_nordic\nrfx/Kconfig:26) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- NRF53_SYNC_RTC (defined at soc/arm/nordic_nrf\nrf53\Kconfig.soc:159), with value y, direct dependencies NRF_RTC_TIMER && SOC_SERIES_NRF53X && SOC_FAMILY_NRF (value: y), and select condition NRF_RTC_TIMER && SOC_SERIES_NRF53X && SOC_FAMILY_NRF (value: y)
- UART_ENHANCED_POLL_OUT (defined at drivers/serial/Kconfig.nrfx:396), 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_DPPIC && (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)

warning: NRFX_IPC (defined at modules\hal_nordic\nrfx/Kconfig:79) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- MBOX_NRFX_IPC (defined at C:/ncs/v2.4.1/zephyr/boards/arm/nrf5340_audio_dk_nrf5340/Kconfig.defconfig:67, drivers/mbox/Kconfig.nrfx:4), with value y, direct dependencies y (value: y), and select condition HAS_HW_NRF_IPC && MBOX (value: y)

warning: NRFX_PWM0 (defined at modules\hal_nordic\nrfx/Kconfig:118) has direct dependencies HAS_NRFX && 0 with value n, but is currently being y-selected by the following symbols:
- PWM_NRFX (defined at drivers/pwm/Kconfig.nrfx:4), with value y, direct dependencies DT_HAS_NORDIC_NRF_PWM_ENABLED && PWM (value: y), and select condition HAS_HW_NRF_PWM0 && DT_HAS_NORDIC_NRF_PWM_ENABLED && PWM (value: y)

error: Aborting due to Kconfig warnings

CMake Error at C:/ncs/v2.4.1/zephyr/cmake/modules/kconfig.cmake:339 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/ncs/v2.4.1/nrf/cmake/modules/kconfig.cmake:29 (include)
C:/ncs/v2.4.1/zephyr/cmake/modules/zephyr_default.cmake:115 (include)
C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
C:/ncs/v2.4.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/31f4403e35/opt/bin/python.exe '-Bc:\nordic\myApps\blinky_demo\build' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING=c:/nordic/myapps/blinky_demo '-Sc:\nordic\myApps\blinky_demo'

Maybe the solution is simple but I don't know. Before nRF Connect SDK without Visual Studio I didn't have these problems.

-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/31f4403e35/opt/bin/python.exe '-Bc:\nordic\myApps\blinky_demo\build' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING=c:/nordic/myapps/blinky_demo '-Sc:\nordic\myApps\blinky_demo'

Kind regards,

Guillermo

  • Hello Guillermo,

    That is odd.

    Before nRF Connect SDK without Visual Studio I didn't have these problems.

    So I assume you have gotten the toolchain up and running using SES before, and that worked well for you?

    Do you have nrf Command line tools installed? Did you make sure that your toolchain version matches your NCS version when creating the project? Did you select a freestanding application?

    Regards,

    Elfving

  • Hi Elfving, Thanks for your support.

    For me Nordic Edition of the SEGGER Embedded Studio (SES) IDE is better than Visual Studio version, which is so confused.

    I have repaired Command-Line Tools 

    Toolchain matches with nRF Connect SDK v2.4.1 

    freestanding app

    and Build config

    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\31f4403e35\opt\bin\cmake.EXE' -DWEST_PYTHON=C:/ncs/toolchains/31f4403e35/opt/bin/python.exe '-Bc:\nordic\myApps\blinky_pwm\build' -GNinja -DBOARD=nrf5340_audio_dk_nrf5340_cpuapp_ns -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DCONF_FILE:STRING=c:/nordic/myApps/blinky_pwm/prj.conf -DBOARD_ROOT:STRING=c:/nordic/myapps/blinky_pwm '-Sc:\nordic\myApps\blinky_pwm'

    And If I use default setup v2.0.0

    I got this error

    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\v2.0.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=C:\ncs\toolchains\v2.0.0\opt\bin\python.exe' '-Bc:\nordic\myApps\blinky_pwm\build' '-Sc:\nordic\myApps\blinky_pwm' -GNinja

    I hope some good advice.


    Guillermo

  • Hello again,

    It seems that you might be building it for the nrf5340_audio_dk_nrf5340. So the audio DK, not the normal 5340DK. Did you mean to build it for the Audio one?

    Regards,

    Elfving

  • Hi Elfving,

    Whichever board variant I choose the error is the same. Here I removed the audio

    and the error doesn't disappear

    It seems to me that this only works on the inventor's machine with his/her own version of Visual Studio, and C/C++ packages and Windows or Linux OS. Maybe reinstall all the packages, but I don't think it will work.

    Regards

    Guillermo

  • gap_guillen said:
    It seems to me that this only works on the inventor's machine with his/her own version of Visual Studio, and C/C++ packages and Windows or Linux OS.

    I am not so sure about that, I haven't seen this issue before myself.

    As you usually use Segger, and this is an NCS version that doesn't work for Segger, I assume you recently downloaded this version of NCS and do not necessarily know if the download worked successfully.

    Are you downloading the NCS SDK using a VPN? That has typically lead to a few issues with things missing from the SDK. Could you try repairing NCS using "Update toolchain" or "Update SDK" in the drop down menu, on the NCS version in question, in the toolchain manager?

    If that doesn't work, are you getting the same issue when building the hello world sample for the nRF52832 DK? If it doesn't work, could you send me the entire log?

    Regards,

    Elfving

Related