Solved
How can I use C++ with the generated code from CubeMX ?
In STM32CubeIDE, I can compile C++ code in the project. The CMake file generated for the VSCode extension doesn't work with C++. Is there a way to use C++ code with less hassle than trying to get around this by hand?