This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

cmake failed

I have downloaded the nrf connect sdk 1.7.1 and want to use the newset version of nordic official sdk. However, I have tried so many times to delete and redownload the sdk, when I build the direction_finding_connectionless_rx or direction_finding_connectionless_tx, it always turns out cmake error.  By the way, I have chosen the right board, which is nrf52833dk-52833, and even the simplest project blinky_pwm wasn't working good. The error seemed the same. 

error: Aborting due to Kconfig warnings

CMake Error at C:/Users/Marcous/ncs/v1.7.1/zephyr/cmake/kconfig.cmake:268 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/Users/Marcous/ncs/v1.7.1/zephyr/cmake/app/boilerplate.cmake:554 (include)
C:/Users/Marcous/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
C:/Users/Marcous/ncs/v1.7.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:4 (find_package)

error: cmake failed
create_nordic_project.py failed (1)

Parents
  • Hi,

    Please try the fixes in this guide and see if any of them solves your issue: Common fixes for nRF Connect SDK build problems.

    If you are still getting this error after going through the guide, please let me know.

    Best regards,

    Marte

  • Hi Marte,

    I must say sorry that, try as I might, I could not find a solution to the problem.

    I have changed the download path to C/ncs disk and E/ncs to avoid a long path, but after trying to redownload the nrf connect SDK v1.7.1  and delete, it still did not work well.

    Most of the time, in a clean folder without anything about nrf connect, after downloading the SDK for the first time, the result is like this:

    And I try to do update SDK and update the toolchain, it goes well with SDK, like what I have downloaded of version v1.6.0:

    But in v1.7.1, as the same problem I mentioned in the main ticket, it could not build a single demo with any board successfully.  

    Best regards,

    Marcous

Reply
  • Hi Marte,

    I must say sorry that, try as I might, I could not find a solution to the problem.

    I have changed the download path to C/ncs disk and E/ncs to avoid a long path, but after trying to redownload the nrf connect SDK v1.7.1  and delete, it still did not work well.

    Most of the time, in a clean folder without anything about nrf connect, after downloading the SDK for the first time, the result is like this:

    And I try to do update SDK and update the toolchain, it goes well with SDK, like what I have downloaded of version v1.6.0:

    But in v1.7.1, as the same problem I mentioned in the main ticket, it could not build a single demo with any board successfully.  

    Best regards,

    Marcous

Children
  • Hi Marcous,

    What are you using to build the samples, SES, VS Code, command line, or something else? How are you building? Can you share the entire log from when the error occurs?

    Best regards,

    Marte

  • I tried to build the latest v1.8.0 in the E/ncs. Opening the simplest sample hello_world , the error information is like:

    Creating solution hello_world.emProject
    E:/ncs/v1.8.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf52833dk_nrf52833 -DBOARD_DIR=E:\ncs\v1.8.0\zephyr\boards\arm\nrf52833dk_nrf52833 -BE:\ncs\v1.8.0\zephyr\samples\hello_world\build_nrf52833dk_nrf52833 -SE:\ncs\v1.8.0\zephyr\samples\hello_world -DNCS_TOOLCHAIN_VERSION=1.8.0 -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=E:\ncs\v1.8.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
    -- Application: E:/ncs/v1.8.0/zephyr/samples/hello_world
    -- Zephyr version: 2.7.0 (E:/ncs/v1.8.0/zephyr), build: v2.7.0-ncs1
    -- Found Python3: E:/ncs/v1.8.0/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: nrf52833dk_nrf52833
    -- Cache files will be written to: E:/ncs/v1.8.0/zephyr/.cache
    -- Found dtc: E:/ncs/v1.8.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (E:/ncs/v1.8.0/toolchain/opt)
    -- Found BOARD.dts: E:/ncs/v1.8.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Generated zephyr.dts: E:/ncs/v1.8.0/zephyr/samples/hello_world/build_nrf52833dk_nrf52833/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: E:/ncs/v1.8.0/zephyr/samples/hello_world/build_nrf52833dk_nrf52833/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: E:/ncs/v1.8.0/zephyr/samples/hello_world/build_nrf52833dk_nrf52833/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: E:/ncs/v1.8.0/zephyr/samples/hello_world/build_nrf52833dk_nrf52833/zephyr/dts.cmake
    Parsing E:/ncs/v1.8.0/zephyr/Kconfig
    Loaded configuration 'E:/ncs/v1.8.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'E:/ncs/v1.8.0/zephyr/samples/hello_world/prj.conf'
    -- Configuring incomplete, errors occurred!
    Including boilerplate (Zephyr base): E:/ncs/v1.8.0/zephyr/cmake/app/boilerplate.cmake
    -- Using NCS Toolchain 1.8.0 for building. (E:/ncs/v1.8.0/toolchain/cmake)
    
    warning: the hex symbol NRF_MODEM_LIB_SHMEM_CTRL_SIZE (defined at E:/ncs/v1.8.0/nrf\lib\nrf_modem_lib/Kconfig:109) has a non-hex default NRF_MODEM_SHMEM_CTRL_SIZE (undefined)
    
    warning: MBEDTLS_SHA1_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls.defconfig:9, E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:1) defined without a type
    
    warning: MBEDTLS_TLS_LIBRARY (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:9) defined without a type
    
    warning: MBEDTLS_X509_LIBRARY (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:12) defined without a type
    
    warning: MBEDTLS_ECP_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:21) defined without a type
    
    warning: MBEDTLS_CTR_DRBG_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:24) defined without a type
    
    warning: MBEDTLS_CMAC_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:33) defined without a type
    
    warning: MBEDTLS_CCM_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:36) defined without a type
    
    warning: MBEDTLS_PSA_CRYPTO_STORAGE_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:48) defined without a type
    
    warning: <choice MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT> (defined at E:/ncs/v1.8.0/nrf\modules\memfault/Kconfig:166) defined with type unknown
    
    warning: <choice MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT> (defined at E:/ncs/v1.8.0/nrf\modules\memfault/Kconfig:166) defined without a prompt
    
    warning: the default selection MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_DEDICATED_WORKQUEUE (undefined) of <choice MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT> (defined at E:/ncs/v1.8.0/nrf\modules\memfault/Kconfig:166) is not contained in the choice
    
    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_NRF52X (defined at 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 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 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 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 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 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: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 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 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 modules\hal_nordic\nrfx/Kconfig:101, drivers/serial/Kconfig.nrfx:371) 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 drivers/serial/Kconfig.nrfx:388), 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 E:/ncs/v1.8.0/zephyr/cmake/kconfig.cmake:270 (message):
      command failed with return code: 1
    Call Stack (most recent call first):
      E:/ncs/v1.8.0/zephyr/cmake/app/boilerplate.cmake:546 (include)
      E:/ncs/v1.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
      E:/ncs/v1.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
      CMakeLists.txt:5 (find_package)
    
    
    
    error: cmake failed
    create_nordic_project.py failed (1)
    

  • Hi,

    I am unable to reproduce your issue.

    Can you try building with west on command line and see if you get the same error? Press the down arrow next to Open Segger Embedded Studio and select Open bash or Open command prompt. Go to the directory of the hello world sample in the terminal and build by issuing the following command:

    west build -b nrf52833dk_nrf52833

    You can also try building using VS Code and our extension, nRF Connect for VS Code. For more information on how to use this, you can see nRF Connect for VS Code documentation and nRF Connect for VS Code tutorials.

    Best regards,

    Marte

  • Hi Marte,

    I tried to build the demo in the command line, the error occurred with slight difference:

    Marcous@Marcous-rubbish-g7 MINGW64 /e/ncs/v1.8.0/zephyr/samples/hello_world ((v2.7.0-ncs1))
    $ west build -b nrf52833dk_nrf52833
    -- west build: generating a build system
    Including boilerplate (Zephyr base (cached)): E:/ncs/v1.8.0/zephyr/cmake/app/boilerplate.cmake
    -- Application: E:/ncs/v1.8.0/zephyr/samples/hello_world
    -- Using NCS Toolchain 1.8.0 for building. (E:/ncs/v1.8.0/toolchain/cmake)
    -- Zephyr version: 2.7.0 (E:/ncs/v1.8.0/zephyr), build: v2.7.0-ncs1
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: nrf52833dk_nrf52833
    -- Cache files will be written to: E:/ncs/v1.8.0/zephyr/.cache
    -- Found dtc: E:/ncs/v1.8.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (E:/ncs/v1.8.0/toolchain/opt)
    -- Found BOARD.dts: E:/ncs/v1.8.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833.dts
    -- Generated zephyr.dts: E:/ncs/v1.8.0/zephyr/samples/hello_world/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: E:/ncs/v1.8.0/zephyr/samples/hello_world/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: E:/ncs/v1.8.0/zephyr/samples/hello_world/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: E:/ncs/v1.8.0/zephyr/samples/hello_world/build/zephyr/dts.cmake

    warning: the hex symbol NRF_MODEM_LIB_SHMEM_CTRL_SIZE (defined at E:/ncs/v1.8.0/nrf\lib\nrf_modem_lib/Kconfig:109) has a non-hex default NRF_MODEM_SHMEM_CTRL_SIZE (undefined)

    warning: MBEDTLS_SHA1_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls.defconfig:9, E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:1) defined without a type

    warning: MBEDTLS_TLS_LIBRARY (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:9) defined without a type

    warning: MBEDTLS_X509_LIBRARY (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:12) defined without a type

    warning: MBEDTLS_ECP_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:21) defined without a type

    warning: MBEDTLS_CTR_DRBG_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:24) defined without a type

    warning: MBEDTLS_CMAC_C (defined Parsing E:/ncs/v1.8.0/zephyr/Kconfig
    Loaded configuration 'E:/ncs/v1.8.0/zephyr/boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833_defconfig'
    Merged configuration 'E:/ncs/v1.8.0/zephyr/samples/hello_world/prj.conf'
    at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:33) defined without a type

    warning: MBEDTLS_CCM_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:36) defined without a type

    warning: MBEDTLS_PSA_CRYPTO_STORAGE_C (defined at E:/ncs/v1.8.0/nrf/modules/trusted-firmware-m\Kconfig.mbedtls_minimal.defconfig:48) defined without a type

    warning: <choice MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT> (defined at E:/ncs/v1.8.0/nrf\modules\memfault/Kconfig:166) defined with type unknown

    warning: <choice MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT> (defined at E:/ncs/v1.8.0/nrf\modules\memfault/Kconfig:166) defined without a prompt

    warning: the default selection MEMFAULT_HTTP_PERIODIC_UPLOAD_USE_DEDICATED_WORKQUEUE (undefined) of <choice MEMFAULT_HTTP_PERIODIC_UPLOAD_CONTEXT> (defined at E:/ncs/v1.8.0/nrf\modules\memfault/Kconfig:166) is not contained in the choice

    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_NRF52X (defined at 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 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 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 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 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 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: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 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 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 modules\hal_nordic\nrfx/Kconfig:101, drivers/serial/Kconfig.nrfx:371) 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 drivers/serial/Kconfig.nrfx:388), 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 E:/ncs/v1.8.0/zephyr/cmake/kconfig.cmake:270 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    E:/ncs/v1.8.0/zephyr/cmake/app/boilerplate.cmake:546 (include)
    E:/ncs/v1.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    E:/ncs/v1.8.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:5 (find_package)


    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'E:\ncs\v1.8.0\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=E:\ncs\v1.8.0\toolchain\opt\bin\python.exe' '-BE:\ncs\v1.8.0\zephyr\samples\hello_world\build' '-SE:\ncs\v1.8.0\zephyr\samples\hello_world' -GNinja

  • Hi,

    I have been trying to reproduce your issue, but so far I have not been able to do so.

    Have you made any changes to any of the files in the SDK? Are you using VPN when downloading the SDK and/or the toolchain through Toolchain Manager?

    Another option is to try to install the SDK manually, by following this guide: Installing manually.

    Best regards,

    Marte

Related