This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Whenever I am importing the sample project I am getting a source directory that does not exist error, adding error report below.

Loading solution asset_tracker.emProject
Executing load commands
cmake -GNinja -DBOARD=nrf52840_pca10056 -DBOARD_DIR=C:/Windows/System32/ncs/zephyr/boards/arm/nrf52840_pca10056 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/Users/Bhumit/ncs/v1.2.0/toolchain/opt -BC:/Windows/System32/ncs/nrf/applications/asset_tracker/build_nrf52840_pca10056 -HC:/Windows/System32/ncs/nrf/applications/asset_tracker -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Users/Bhumit/ncs/v1.2.0/toolchain/segger_embedded_studio/html/configure_nordic_project_menuconfig.py
CMake Error: The source directory "C:/Windows/System32/ncs/nrf/applications/asset_tracker" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
Project load failed
Reported error: solution load command failed (1)

  • I have added CMake path to segger studio now I am getting this error.

    Loading solution asset_tracker.emProject
    Executing load commands
    C:/Program Files/CMake/bin/cmake.exe -GNinja -DBOARD=nrf52840_pca10056 -DBOARD_DIR=C:/Windows/System32/ncs/zephyr/boards/arm/nrf52840_pca10056 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/Users/Bhumit/ncs/v1.2.0/toolchain/opt -BC:/Windows/System32/ncs/nrf/applications/asset_tracker/build_nrf52840_pca10056 -HC:/Windows/System32/ncs/nrf/applications/asset_tracker -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Users/Bhumit/ncs/v1.2.0/toolchain/segger_embedded_studio/html/configure_nordic_project_menuconfig.py
    -- Zephyr version: 2.1.99
    -- Selected BOARD nrf52840_pca10056
    -- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.7.2", minimum required is "0.6.0")
    CMake Error at C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/host-tools.cmake:67 (string):
    string sub-command REGEX, mode MATCH needs at least 5 arguments total to
    command.
    Call Stack (most recent call first):
    C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/app/boilerplate.cmake:443 (include)
    CMakeLists.txt:11 (include)


    CMake Error at C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/host-tools.cmake:68 (if):
    if given arguments:

    "VERSION_LESS" "1.4.6"

    Unknown arguments specified
    Call Stack (most recent call first):
    C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/app/boilerplate.cmake:443 (include)
    CMakeLists.txt:11 (include)


    -- Configuring incomplete, errors occurred!
    Project load failed
    Reported error: solution load command failed (1)

  • Hello,

    Are you following a specific guide or tutorial? - are you developing using Segger Embedded studio?
    Which CMake and nRF Connect SDK versions are you using?
    I have heard from customers that faced this same error that updating their CMake solved the issue.

    Please see this section for our recommended way of installing the toolchain and Connect SDK.
    Could you also provide the full command you ran when this error occurred?

    Bhavit Rajput said:

    CMake Error at C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/host-tools.cmake:67 (string):
    string sub-command REGEX, mode MATCH needs at least 5 arguments total to
    command.
    Call Stack (most recent call first):
    C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/app/boilerplate.cmake:443 (include)
    CMakeLists.txt:11 (include)


    CMake Error at C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/host-tools.cmake:68 (if):
    if given arguments:

    "VERSION_LESS" "1.4.6"

    Unknown arguments specified
    Call Stack (most recent call first):
    C:/Users/Bhumit/ncs/v1.2.0/zephyr/cmake/app/boilerplate.cmake:443 (include)
    CMakeLists.txt:11 (include)



    Judging by the error message you provided, it seems that not enough arguments was provided to the CMake command.
    As mentioned above, this might be dependent on what CMake version you are using.

    Best regards,
    Karl

  • Yes, i am using segger embedded studio (nordic edition), I have updated CMake from 3.14 to 3.17.2 even though I am getting the same error. I have installed nrf connect sdk using the toolchain manager.

  • Which Segger Embedded Studio version are you using? Could you also tell me if you are following a tutorial or guide?

  • Segger (nordic edition) v4.52, nrf connect desktop tool is available in which application is there called as toolchain manager where the option is available to install sdk I have just clicked that button and it has installed all the necessary things for sdk including segger studio.

Related