Cmake error for Zephyr Sample Code in Visual Studio #51616
Unanswered
swatikumari1-eaton
asked this question in
General
Replies: 1 comment
-
I've moved your issue to a discussion as we do not have official support for Visual Studio. Still, this is a good question to ask the community since there are a few elusive Visual Studio users out there, I'm sure (though more of us use VS Code). You can also ask on the Discord #devenv channel for support. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
trying to Compile and debug "....\zephyr\samples\hello_world" in Visual studio 2022.
Please also mention any information which could help others to understand
the problem you're facing:
Reproduce
open visual studio 2022
Open local folder
Select hello world
Expected behavior
Able to compile and debug.
Logs and console output
I1> Provided 'inheritEnvironments' doesn't provide the necessary environment variables needed to set the context for the configuration x64-Debug. You can work around this by adding the necessary environment variables such as INCLUDE, LIBPATH, PATH and others to an environment block in your CMakeSettings.json.
1> CMake generation started for configuration: 'x64-Debug'.


1> Command line: "C:\Windows\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\samples\hello_world\out\install\x64-Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\samples\hello_world" 2>&1"
1> Working directory: D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\samples\hello_world\out\build\x64-Debug
1> [CMake] Including boilerplate (Zephyr base (cached)): D:/BLERTOS/zephyrproject/zephyr-v3.0.0/zephyr/cmake/app/boilerplate.cmake
1> [CMake] -- Application: D:/BLERTOS/zephyrproject/zephyr-v3.0.0/zephyr/samples/hello_world
1> [CMake] -- Zephyr version: 3.0.0 (D:/BLERTOS/zephyrproject/zephyr-v3.0.0/zephyr)
1> [CMake] -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
1> [CMake] CMake Error at D:/BLERTOS/zephyrproject/zephyr-v3.0.0/zephyr/cmake/zephyr_module.cmake:61 (message):
1> [CMake] Traceback (most recent call last):
1> [CMake]
1> [CMake] File "D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\scripts\zephyr_module.py", line 542, in
1> [CMake] main()
1> [CMake] File "D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\scripts\zephyr_module.py", line 492, in main
1> [CMake] west_proj = west_projects()
1> [CMake] File "D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\scripts\zephyr_module.py", line 375, in west_projects
1> [CMake] manifest = Manifest.from_file()
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 1170, in from_file
1> [CMake] return Manifest(topdir=topdir, config=config,
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 1396, in init
1> [CMake] self._load_validated()
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 1791, in _load_validated
1> [CMake] self._load_projects(manifest_data, url_bases, defaults)
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 2114, in _load_projects
1> [CMake] self._import_from_project(project, imp)
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 2293, in _import_from_project
1> [CMake] self._import_path_from_project(project, _WEST_YML)
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 2310, in _import_path_from_project
1> [CMake] imported = self._import_content_from_project(project, path)
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 2395, in _import_content_from_project
1> [CMake] content = self._ctx.project_importer(project, path)
1> [CMake] File "C:\Python310\lib\site-packages\west\manifest.py", line 164, in _default_importer
1> [CMake] raise ManifestImportFailed(project, file)
1> [CMake]
1> [CMake] west.manifest.ManifestImportFailed: ManifestImportFailed: project <Project
1> [CMake] zephyr ('D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr') at
1> [CMake] zephyr-v3.0.0> value west.yml
1> [CMake]
1> [CMake] Call Stack (most recent call first):
1> [CMake] D:/BLERTOS/zephyrproject/zephyr-v3.0.0/zephyr/cmake/app/boilerplate.cmake:174 (include)
1> [CMake] D:/BLERTOS/zephyrproject/zephyr-v3.0.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
1> [CMake] D:/BLERTOS/zephyrproject/zephyr-v3.0.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
1> [CMake] CMakeLists.txt:5 (find_package)
1> [CMake] -- Configuring incomplete, errors occurred!
1> 'C:\Windows\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\samples\hello_world\out\install\x64-Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\samples\hello_world" 2>&1"' execution failed with error: ''C:\Windows\system32\cmd.exe' '/c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe" -G "Ninja" -DCMAKE_BUILD_TYPE:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\samples\hello_world\out\install\x64-Debug" -DCMAKE_MAKE_PROGRAM="C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\2022\PROFESSIONAL\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\Ninja\ninja.exe" "D:\BLERTOS\zephyrproject\zephyr-v3.0.0\zephyr\samples\hello_world" 2>&1"' returned with exit code: 1'.
Environment (please complete the following information):
Additional context
target configuration-
connected with STLinkV2 USB cable
Power supply
Beta Was this translation helpful? Give feedback.
All reactions