Could not find a package configuration file provided by "Zephyr-sdk" on macOS

minimal_log_button_gpioe % west build -b custom_nrf52832
-- west build: generating a build system
Loading Zephyr default modules (Zephyr base).
-- Application: /opt/nordic/ncs/v2.3.0/nrf/samples/minimal_log_button_gpioe
-- Using NCS Toolchain 2.3.0 for building. (/opt/nordic/ncs/toolchains/v2.3.0/cmake)
-- Found Python3: /opt/nordic/ncs/toolchains/v2.3.0/bin/python3 (found suitable exact version "3.9.6") found components: Interpreter
-- Cache files will be written to: /Users/andyueng/Library/Caches/zephyr
-- Zephyr version: 3.2.99 (/opt/nordic/ncs/v2.3.0/zephyr)
-- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
-- Board: custom_nrf52832
CMake Error at /opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/FindZephyr-sdk.cmake:63 (find_package):
Could not find a package configuration file provided by "Zephyr-sdk"
(requested version 0.15) with any of the following names:

Zephyr-sdkConfig.cmake
zephyr-sdk-config.cmake

Add the installation prefix of "Zephyr-sdk" to CMAKE_PREFIX_PATH or set
"Zephyr-sdk_DIR" to a directory containing one of the above files. If
"Zephyr-sdk" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
/opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/FindHostTools.cmake:53 (find_package)
/opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/dts.cmake:8 (find_package)
/opt/nordic/ncs/v2.3.0/zephyr/cmake/modules/zephyr_default.cmake:108 (include)
/opt/nordic/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:66 (include)
/opt/nordic/ncs/v2.3.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:92 (include_boilerplate)
CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake -DWEST_PYTHON=/opt/homebrew/Cellar/west/1.0.0/libexec/bin/python3.11 -B/opt/nordic/ncs/v2.3.0/nrf/samples/minimal_log_button_gpioe/build -GNinja -DBOARD=custom_nrf52832 -S/opt/nordic/ncs/v2.3.0/nrf/samples/minimal_log_button_gpioe

Parents
  • Hello,

    This means that either the Zephyr-SDK install did not create a cmake package properly, or it cannot be found.

    How did you install NCS? Did you do an automatic install with the Toolchain Manager?

    If so, did you open your VSCode or terminal using that application, as you can see on the picture below? This should set up the required environmental variables automatically, that you may be missing otherwise by default.

    Best regards,

    Michal

  • Hi there,

    was this issue being resolved and how?

    I came across something pretty similar by trying to run twister from python

    I am following documentation from here

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.1.4/zephyr/develop/test/ztest.html

    Quick start - Integration testing

    Very much interested into what the resolution was...

    I am upgraded to the latest nRF SDK and Toolchain v2.5.0

    Thank you

    $ python.exe ./scripts/twister  -s   c:/nRF/test/foo/bar/test-identifier
    ZEPHYR_BASE unset, using "C:\ncs\v2.5.0\zephyr"
    Install tabulate python module with pip to use --device-testing option.
    Renaming output directory to C:\ncs\v2.5.0\zephyr\twister-out.8
    INFO    - Using Ninja..
    INFO    - Zephyr version: v3.4.99-ncs1
    ERROR   - Cmake script failure: C:\ncs\v2.5.0\zephyr\cmake\verify-toolchain.cmake
    E: CMake Error at C:/ncs/v2.5.0/zephyr/cmake/modules/FindZephyr-sdk.cmake:109 (find_package):
      Could not find a package configuration file provided by "Zephyr-sdk"
      (requested version 0.15) with any of the following names:

        Zephyr-sdkConfig.cmake
        zephyr-sdk-config.cmake

      Add the installation prefix of "Zephyr-sdk" to CMAKE_PREFIX_PATH or set
      "Zephyr-sdk_DIR" to a directory containing one of the above files.  If
      "Zephyr-sdk" provides a separate development package or SDK, be sure it has
      been installed.
    Call Stack (most recent call first):
      C:/ncs/v2.5.0/zephyr/cmake/modules/FindHostTools.cmake:53 (find_package)
      C:/ncs/v2.5.0/zephyr/cmake/verify-toolchain.cmake:30 (find_package)

  • is this ticket assigned to Nordic Support Team?

    still looking forward to the resolution of the CMake Error

    please LMK if you need additional information and whether creating a new ticket is preferred...

    thank you

  • Hi,

    I am having same error running z-test on provided Nordic test samples. 

    Installed  nRF SDK v2.00, using nRF-Connect & Tool chain manager.

    I have tried setting:

    - Set ZEPHYR_BASE to the location of the zephyr repository:
      zephyr-env.cmd

    - Set Zephyr SDK Install directory:
      set ZEPHYR_SDK_INSTALL_DIR = C:\ncs\toolchains\v2.0.0\
    - Set Zephyr Tool Chain:
      set ZEPHYR_TOOL_CHAIN_VARIANT = zephyr

    Additionally:

    To avoid reported CMake error during z-test:
    - Export Zephyr CMake package allows CMake to automatically find a Zephyr base.
     cmake -P C:\ncs\v2.0.0\zephyr\share\zephyr-package\cmake\zephyr_export.cmake
      - Consequently Added to the user package registry in:
        HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr

    However the same CMake error persists (as in previous post).

    BTW those files do not seem to be in my install directory, namely:

    zephyr-sdk-config.cmake (or similar).

    Can Nordic support suggest a solution?

    I have also posted on Discord (Zephyr support) but no replies received.

    Thanking you in advance.

Reply
  • Hi,

    I am having same error running z-test on provided Nordic test samples. 

    Installed  nRF SDK v2.00, using nRF-Connect & Tool chain manager.

    I have tried setting:

    - Set ZEPHYR_BASE to the location of the zephyr repository:
      zephyr-env.cmd

    - Set Zephyr SDK Install directory:
      set ZEPHYR_SDK_INSTALL_DIR = C:\ncs\toolchains\v2.0.0\
    - Set Zephyr Tool Chain:
      set ZEPHYR_TOOL_CHAIN_VARIANT = zephyr

    Additionally:

    To avoid reported CMake error during z-test:
    - Export Zephyr CMake package allows CMake to automatically find a Zephyr base.
     cmake -P C:\ncs\v2.0.0\zephyr\share\zephyr-package\cmake\zephyr_export.cmake
      - Consequently Added to the user package registry in:
        HKEY_CURRENT_USER\Software\Kitware\CMake\Packages\Zephyr

    However the same CMake error persists (as in previous post).

    BTW those files do not seem to be in my install directory, namely:

    zephyr-sdk-config.cmake (or similar).

    Can Nordic support suggest a solution?

    I have also posted on Discord (Zephyr support) but no replies received.

    Thanking you in advance.

Children
No Data
Related