2025-10-06 12:17 AM
I am able to create C++ project in STM32CubeIDE, like so:
However, I can't find a way to do the same in STM32 VS Code. Is there such a feature in VS Code for STM32?
2025-10-06 1:10 AM
Considering STM32CubeIDE for Visual Studio Code solution, no C/C++ concerns to get.
This solution relies on CMake as build system. Related toolchain file is both C and C++ capable. CMake is then managing the stuff properly for you taking care based on file extensions (.c or .cpp).
Let's start from empty project without any worries here:
By default main.c template is promoted. Just rename it to main.cpp and update CMakeLists.txt reference in sync. It will work !
2025-10-06 1:47 AM - edited 2025-10-06 1:47 AM
Hello @kaosad and welcome to the Community
You can refer to these articles contain steps and tips on using VS Code with CMake for STM32 projects: