On running z-test, reports CMake error - Could not find a package configuration file provided by "Zephyr-sdk" on Windows

Hi,

I am having similar error as reported in Case ID: 308488, however here issue is running z-test on provided Nordic test samples.

(note: nRF-connect SDK, works as expected for standard build using VS Studio).

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.

Parents
  • Customer reply

    This issue appears to arise due to a failure in the CMake tool verification (see attached).
    This script run error message is reported by twister (Z-Test) for me on running any test :
    There doesn't appear to be a build log generated as such as the test fails at toolchain CMake verifiy:
    PS C:\ncs\v2.0.0\zephyr> python ./scripts/twister -T tests/ztest/base
    ZEPHYR_BASE unset, using "C:\ncs\v2.0.0\zephyr"
    Renaming output directory to C:\ncs\v2.0.0\zephyr\twister-out.28
    INFO - Zephyr version: v3.0.99-ncs1
    INFO - JOBS: 8
    ERROR - Cmake script failure: C:\ncs\v2.0.0\zephyr\cmake\modules\verify-toolchain.cmake
    E: CMake Error at cmake/modules/verify-toolchain.cmake:84 (find_package):
    Could not find a package configuration file provided by "Zephyr-sdk"
    (requested version 0.13.1) 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
    Let me know what you think & if you can also resolve issue with posting on the forum.

    been installed.
    Above fail was tested & repeatable even on the Ztest base sample.
  • Hi

    When you ran the samples, did you start the command line prompt from the start menu or launching cmd/bash from the toolchain manager dropdown/nRF Connect  terminal inside vscode? The difference is that if you just ran just by starting powershell/terminal the environment from the toolchain may not have been loaded. 

    Regards

    Runar

Reply
  • Hi

    When you ran the samples, did you start the command line prompt from the start menu or launching cmd/bash from the toolchain manager dropdown/nRF Connect  terminal inside vscode? The difference is that if you just ran just by starting powershell/terminal the environment from the toolchain may not have been loaded. 

    Regards

    Runar

Children
Related