Small example to run a STM32F303 under VSCode with CMake and Ninja.
If you need a teplate with settings without STM32CUBE files go to:
Template
- arm-none-eabi-gcc
- STM32CubeProgrammer
- ST-Link_gdbserver1
- CMake
- Ninja Ninja build system
- ms-vscode.cpptools: Syntax highlighting and other core features for C/C++ development
- ms-vscode.cmake-tools: CMake core tools, build system generator tool
- twxs.cmake: CMake color highlighting
- marus25.cortex-debug: Cortex-M debugging extension, mandatory for STM32 debug from VSCode
- dan-c-underwood.arm: ARM Assembly syntax highlighter
- zixuanwang.linkerscript: GCC Linker script syntax highlighter
For a good exaple with F7 and a walktrough visit: Tilen Majerle
Generated .hex is bigger with VSCode even with the same settings
- CubeIDE: 18,9KB - RAM: 1587 B, FLASH: 6850 B
- VSCode: 50,8KB - RAM: 2064 B, FLASH: 18496 B
For now it seems to be comparable, will see on DSP applications (updates will come)
Comparable, some options are better on VSC some on STMCubeIDE
For a beginner STMCubeIDE would be to recommend, but for advanced users VSCode is nice, it gives you one editor for more languages for testing scripts, GUI, frontend, etc...
- Include files path error highligting (c_cpp_properties.json needs to be adjusted)