Skip to content

FoxMD/VSCode-STM32-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

VSCode-STM32-template

STM32 template needed to open and build CUBE IDE/Atollic projects in VS Code
Example on: STM32F303 Discovery

Used tools:

Used VSCode plugins/tools:

Requirements

Tools and VSCode plugins from above

Installed with STM32-CUBE IDE

arm-none-eabi-gcc
STM32CubeProgrammer
ST-Link_gdbserver

Manual install

CMake - Download, install
Ninja - Standalone version

VSCode

To install them in one shot, copy code below to terminal in VSCode

code --install-extension ms-vscode.cpptools
code --install-extension ms-vscode.cmake-tools
code --install-extension twxs.cmake
code --install-extension marus25.cortex-debug
code --install-extension dan-c-underwood.arm
code --install-extension zixuanwang.linkerscript

Modifications

CMakeLists.txt - everywhere under #Modified .vscode/launch.json - CPU and Paths

TODO

Intelisence highligting (.vscode/c_cpp_properties.json needs to be adjusted.
Workaround: "C_Cpp.errorSquiggles": "Disabled" -> "Enabled" (not recommended)

Known issues

  • Generated files (.hex, .bin) are bigger with same compiler settings then in STM32-CUBE IDE

Footnotes

  1. Some AV delete ST-Link_servergdb.exe and let the .bat file exist, while trying to debug your project, you get an error: Debugger error: Client: Error: read ECONNRESET
    Solution: Just install it again and put a exception in your AV for the exe file before you run it again1. 2

About

CMake template for VSCode and STM32

Topics

Resources

Stars

Watchers

Forks

Languages