-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake-kits.json incorrect CXX compiler #107
Comments
A correction on (only) note 2 above: Actually, I can't see how to regenerate I couldn't replicate my reported |
To clarify : my comment immediately above only applies to my side note. i.e. the wrong CXX entry was still generated with 2.0.0. It's just that I was unable to replicate the I was still unable to get the As a workaround for the |
This should be fixed with that commit for new projects - you can download the .vsix file from https://github.com/raspberrypi/pico-vscode/actions/runs/11596527499 to test it The toolchainFile issue is already fixed by removing that line, as it doesn't need to be set for the CMake Tools extension to work correctly |
TL;DR - the
.vs-code/cmake-kits.json
,compilers
->CXX
value seems incorrectly set by default. It picks gcc.exe, not the g++ exe as the C++ compiler.This seems easy enough to replicate: On Windows, create a project from the "blink" example, I chose SDK 1.5.1 and left the settings as default. This was on a Windows PC that had never have VS Code or Pico SDK on it before.
This resulted in a
.vs-code/cmake-kits.json
file like this:From some research, this may be related to the cmake plugin explicitly looking for a binary called "g++". ARM have prefixed the binary name with "arm-none-eabi-". Ref: https://github.com/microsoft/vscode-cmake-tools/blob/main/docs/kits.md#scan-for-kits
This incorrect config probably doesn't cause an issue with the blink example, but it did cause an issue with the project I was trying to work with that used C++: the build step failed at link time with various errors related to missing std c++ lib internal functions.
Related side notes (possibly separate issues):
toolchainFile
value would not update the path, i.e. it would still referencesdk/1.5.1
after switching to 2.0.0 (though the other settings in the file and elsewhere would update).cmake/preload/toolchains/pico_arm_gcc.cmake
for the toolchainFile. AIUI, the names under 2.0.0 are slightly different, I assume because of the new Pico 2 ARM cores and RISC-V cores - so, I don't think that will work (if it's used).The text was updated successfully, but these errors were encountered: