2026-01-06 11:39 AM
I normally use the CMake Tools extension (by Microsoft) for compiling cmake projects in visual studio code. After installing the STM32CubeIDE extension, the CMake Tools extension stopped working. Presumably to do with the stm extension changing to using cube-cmake. After uninstalling all STM32CubeIDE extensions, reinstalling CMake Tools, restaring VS code, the CMake Tools extension is still still broken. Trying to configure a project through the IDE gives the following output:
2026-01-06 11:54 AM - edited 2026-01-06 12:38 PM
As a follow up, I noticed the folling are left behind in the settings.json file after an uninstall of all STM32CubeIDE extensions:
Perhaps the STM3CubeIDE extension should set this on a per project basis or something, so it doesn't mess up the CMake Tools extension.
But, this still does not resolve the problem. cmake is still called on the command line with -DCMKE_COMMAND=cube-cmake. It turns out that the stm extension also sneakily modifies the hidden settings.json file in your projects .vscode folder by adding:
2026-01-07 12:32 AM
Hi @ADunc.1,
What you describe is entirely valid:
The fact is that VSCode does not offer a rich API to allow extensions to perform a full cleanup once they are uninstalled. Here is the developer documentation: https://code.visualstudio.com/updates/v1_21#_extension-uninstall-hook. Running an external Node process breaks the link to your currently running VSCode instance, including its settings, opened folders, and so on.
The same applies to CMake Tools integration; the Microsoft extension does not offer any public API that allows smoother integration. That’s why we chose to insert our integration directly into the project's .vscode/settings.json to avoid breaking other running projects that are not necessarily STM32 projects.
2026-01-07 11:25 AM
@Julien D Thankyou for the detailed reply.
The project in question here was not a STM32CudeIDE project. It is a standalone project. I dont know how it got associated as a STM32CubeIDE project.
I am still not clear if it is possible to have the STM32CubeIDE extension installed, and CMake Tools, in a way that allows building both standalone cmake and STM32CubeIDE projects using the correct cmake path (when clicking the build button on Visual Studio Codes bottom bar).
2026-01-07 12:10 PM
By standalone project I assume it is a cmake project.
Then, normally, if it has been associated it is because you choose 'yes' at some point when this notification popup:
Or you might have clicked on the Setup STM32Cube project(s) action:
Otherwise, we clearly have troubles here, and I would be pleased to receive your scenario that leads to this issue.
To address your last point, the promise is that you can fully develop two projects simultaneously: one being an STM32CubeIDE project (with our settings in .vscode/settings.json), and the other a generic CMake project. Both are handled by CMake Tools and can be built via the bottom bar action. Feel free to reach out if something does not work as you expect.
2026-01-07 2:32 PM
OK, thanks for your help. I don't remember clicking on those popups, but maybe I did...
My scenario is that I have a completely standalone cmake project (it just so happens to be for an STM32, but has its own cmake build system). When I am working on that project I want it to just build like it always has with CMake Tools only.
I added the STM32CubeIDE extension as I wanted to test debugging this project on real hardware in VS Code. I normally use the STM eclipse based IDE for this project, with a custom launch configuration. I build it outside the IDE first, usually in VSCode.
I also have other projects, like STM32CubeMX generated ones that are edited and launched through the eclipse IDE. I thought maybe I could combine all my editing and debugging into VSCode.
2026-01-08 1:48 AM
I confirm that what you described should be possible.
Even if you want to debug only your STM32Cube project with VSCode and build it using another method, in that case you need to manually configure your launch.json for debugging with the appropriate attributes.
2026-01-11 9:27 AM - edited 2026-01-11 9:28 AM
Hi @ADunc.1,
I can confirm that the STM32CubeIDE extensions do work properly with both projects that embrace the STM's extensions, and projects which do not, and at the same time, too.
You can find a practical example from a code repository I am currently developing: https://github.com/anttikes/usb-fm-radio.
Key points:
Feel free to take inspiration from the way I have set things up, if that's of any help.
2026-01-11 11:02 AM
@ankes Thanks for taking the time to explain your configuration. Maybe I will brave up and re-install the stm32cubeIDE extension and have another go with my projects.