Closed kunjsong01 closed 1 week ago
Hi @kunjsong01 , in the CMake tab of VSCode, Configure section, please ensure that a kit is selected: either Catapult SDK gcc-elf or Catapult SDK clang. Please let me know if this solves the problem.
Note there has been a bug in the CMake tools extension recently (https://github.com/microsoft/vscode-cmake-tools/issues/3901) which caused it to fail to ask the user to select a kit, resulting in the kit being listed as __unspec__
. This has now been fixed in CMake tools versions > 1.19. This may be causing users to hit this problem.
Hi @WiseCrohn
Thanks very much for the answers.
The issue is precisely as you have described in the above comment.
My CMake Tools version is v1.19.51 and there was no user prompt to select a kit after opening the hello example in VSCode, leaving the kit __unspec__
in CMake configure:
Following your proposed solution, the issue has been resolved using the steps below:
Catapult SDK gcc-elf
CMake: Delete Cache and Reconfigure
CMake: Build
The hello example was successfully built and executed:
[build] Build finished with exit code 0
[main] Building folder: /home/ks/catapult-sdk_examples/2024.2.1/examples/apps/hello/build
[build] Starting build
[proc] Executing command: /opt/imgtec/catapult-sdk_2024.2.1/build/bin/cmake --build /home/ks/catapult-sdk_examples/2024.2.1/examples/apps/hello/build --config Debug --target all --
[build] [1/2 50% :: 0.031] Building C object CMakeFiles/hello.elf.dir/hello.c.obj
[build] [2/2 100% :: 0.307] Linking C executable hello.elf
[driver] Build completed: 00:00:00.322
[build] Build finished with exit code 0
Updated the environment to VSCode v1.93 with CMake Tools 1.91.51 and got the user prompts in order - compiler selection followed by the platform selection before CMake configuration stage.
Describe the bug When building
examples/apps/hello
CMake failed in the configuration step :SDK version 2024.2.1
To Reproduce Steps to reproduce the behavior:
Catapult SDK (2024.2.1) Documentation
to install the Catapult SDK and VSCode extensionsEnvironment Variables for Using Catapult SDK
to set the PATH/Users/<user_name>/catapult-sdk_examples/2024.2.1/examples/apps/hello
in VSCodeRTXM2200MODEL
Expected behavior Expected a successful build.
Screenshots CMake Debug:
Host OS (please complete the following information):
Edit: Also failed on Ubuntu 22.04
RISC-V development platform: RTXM2200MODEL
Additional context I added some debug message in the following patch
The root cause appears to be
CMAKE_TOOLCHAIN_FILE
not set to anything.