Hi,
I upgraded Toolchain and SDK in VS Code to Version 2.6.1.
Now the build is failing.
As far as I can see the wrong CMake will be used - from Visual Studio but it should be Zephyr.
Errors:
Hi,
I upgraded Toolchain and SDK in VS Code to Version 2.6.1.
Now the build is failing.
As far as I can see the wrong CMake will be used - from Visual Studio but it should be Zephyr.
Errors:
Hi,
A couple of questions and requests:
Kind regards,
Andreas
1. Support Information looks like this:
Andreas Schurz said:1. Support Information looks like this:
One potential noteworthy difference between mine and your setup is the addition of "ms-vscode.cmake-tools": "1.18.42", under the "external: {}" part of the support information.
Another is that I have C:\\Program Files\\CMake\\bin in path under "environment" and "inherited".
I don't think that this necessarily is the root cause of the issue, but it could be worth looking into if the ms-vscode.cmake-tools you have overwrites whatever the SDK should use.
Andreas Schurz said:2. Created a new project from the scratch for this analysis. VS Code still goes:
Noted, thank you for verifying
Andreas Schurz said:3. nRF Connect Welcome Window
All looks good to me
Andreas Schurz said:4. Migration
This looks sane.
Andreas Schurz said:What I am observing is that the inital build after adding a build configuration works but all later builds after making changes result in the CMake-Errors above.
Interesting. Does this also occur if you build a clean hello_world, remove the build folder and then re-build with changes to the code?
Some other suggestions from are: docs.nordicsemi.com/.../index.html
settings.json
file or your Kit configuration to specify the preferred generator (ninja for windows)west
, which invokes cmake
and the underlying build tool (ninja
or make
) behind the scenes so everything should be set up properly from the installers side given that you don't have any conflicting instances of cmake with higher use priority set up in your VSCode installation/in your system variable PathKind regards,
Andreas
Regarding the paths:
Configure the generator in your system's PATH variable. This involves adding the directory containing the generator's executable to your system's PATH. Update yoursettings.json
file or your Kit configuration to specify the preferred generator (ninja for windows)
I am a little bit lost. I haven't found the information on the page: docs.nordicsemi.com/.../index.html
Could you supply an example where the generator executable is actually located?
My root dir is simply C:\ncs
Here? C:\ncs\v2.6.1\zephyr\cmake or where?
Where is settings.json and how to update it?
Regarding the failed build:
Interesting. Does this also occur if you build a clean hello_world, remove the build folder and then re-build with changes to the code?
This works. But only one time. I have to remove the build config and add again for every build. Builds then but CMake error also comes up. When I do an incremental build CMake error comes up and build fails.
And the final suggestion, which might save some debugging time, is to see if the issue is present after either a clean install of VS Code, the extension and the tools on your current computer or to see if the process is reproducable on another computer if you have one available. Atleast a new install of NCS resolved this other users issue with the fault: source
I can do a clean install + update on a dedicated devopment VM which I have to do anyway for documentation purposes next week.
Regarding the paths:
Configure the generator in your system's PATH variable. This involves adding the directory containing the generator's executable to your system's PATH. Update yoursettings.json
file or your Kit configuration to specify the preferred generator (ninja for windows)
I am a little bit lost. I haven't found the information on the page: docs.nordicsemi.com/.../index.html
Could you supply an example where the generator executable is actually located?
My root dir is simply C:\ncs
Here? C:\ncs\v2.6.1\zephyr\cmake or where?
Where is settings.json and how to update it?
Regarding the failed build:
Interesting. Does this also occur if you build a clean hello_world, remove the build folder and then re-build with changes to the code?
This works. But only one time. I have to remove the build config and add again for every build. Builds then but CMake error also comes up. When I do an incremental build CMake error comes up and build fails.
And the final suggestion, which might save some debugging time, is to see if the issue is present after either a clean install of VS Code, the extension and the tools on your current computer or to see if the process is reproducable on another computer if you have one available. Atleast a new install of NCS resolved this other users issue with the fault: source
I can do a clean install + update on a dedicated devopment VM which I have to do anyway for documentation purposes next week.
AHaug said:One potential noteworthy difference between mine and your setup is the addition of "ms-vscode.cmake-tools": "1.18.42", under the "external: {}" part of the support information.
While looking around I found that this might be the rootcause. Could you check your VS Code extensions and see if the microsoft cmake tools is conflicting with what is installed through the SDK installer? Another user suggested that this extension could cause conflicts for other things, but it might also cause the conflict that you're seeing
Andreas Schurz said:I am a little bit lost. I haven't found the information on the page: docs.nordicsemi.com/.../index.html
Could you supply an example where the generator executable is actually located?
No worries,
To my understanding it is here:
Before making any changes, could you check if there are any conflicting versions here?
And could you check your systems environmental path items to see if there are any confliciting cmake instances there?
Andreas Schurz said:I can do a clean install + update on a dedicated devopment VM which I have to do anyway for documentation purposes next week.
Noted, if the removal of the ms cmake extension does not resolve it, then there could be something that has gone wrong through the installation procedure.
Kind regards,
Andreas
Ok. That's the issue.
Trick is to disable VS Code CMake build extensions.
1. Open VS Code Extensions via Ctrl + Shift X
2. Disable the following extensions
Now everything works as expected.
Regards, Andreas
Happy to hear that this fixed it for you, Andreas!
I will mark this case as verified. As always, please feel free to open new cases if new you have any new questions/issues you need some input on
Kind regards,
Andreas