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

  • 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

  • Hello again,

    I tried to install the SDK without a VPN and anti-virus software. The process of building any single demo sample always failed. I found the file path \modules\hal\nordic is empty, and I guess my situation is similar to the problem https://devzone.nordicsemi.com/f/nordic-q-a/79767/reply-button-not-found. and https://devzone.nordicsemi.com/f/nordic-q-a/79614/error-cmake-failed-andcreate_nordic_project-py-failed-1 That is, my log information with building the sample and information on the command line after typing west update are almost the same

    Since I am in China, I need a VPN to get the access to github, but you mentioned somehow a VPN could affect the downloading. Maybe I should change a VPN? 

  • Updates:

    By using VPN and some other command, I can get access to github and using the command "west update", I successfully downloaded the latest SDK of version v1.8.0. I will give the detailed solution in the following days for those who have encoutered the same problem with me. 

Reply
  • Updates:

    By using VPN and some other command, I can get access to github and using the command "west update", I successfully downloaded the latest SDK of version v1.8.0. I will give the detailed solution in the following days for those who have encoutered the same problem with me. 

Children
  • Hi,

    I am happy to hear that you managed to download the SDK! We have seen some issues with downloading it in China and when using VPN, so it is good to hear that you found a solution to it.

    Best regards,

    Marte

  • Hi, here I give the solution to the installation of SDK in the region of China.

    1. Firstly, you need a VPN and open it while downloading the SDK, recommended path is C:\Users\{user}\ncs, which is the default path.

    2. Re-try downloading till you get the picture like this:

    Note that there is a chance that the result only contains the "First Steps" and "Open VS Code".

    In this case, remove the downloaded file, for example, \ncs\v1.8.0, and retry till getting the result above.

    3. Go to the path C:\Users\{user}ncs\v1.8.0\modules\hal\nordic, if this file is empty, then a CMake error will occur when building any single demo. To cover this,  Press the down arrow next to Open Segger Embedded Studio and select Open bash. In the command line, enter "west update", if the update process goes without error, then go back to the \v1.8.0\modules\hal\nordic, the file should be like this:   

    Then it can build a demo successfully. 

    4. If the "west update " does not go well. For me, even though I opened a VPN, I got two problems:

    - OpenSSL SSL_read: Connection was reset, errno 10054

    - Failed to connect to github.com port 443:connection timed out

    To tackle this, I use the following command:

    $ git config --global http.proxy http://127.0.0.1:xxxx
    $ git config --global http.sslVerify "false"
    $ west update 

    where in the first line, the last "xxxx" should be replaced by the port number while opening the VPN (my case is 11000). To see this value, search Internet Options -> Connection -> Lan Settings -> port, like this:

    Hopefully, the above process will help those with trouble downloading SDK and building demo.

Related