STM32 VS Code Extension
STM32 embedded development support added to Visual Studio Code.
A new view container for the STM32VS Code extension is included in the activity bar, which provides a list of features that can be accessed with a single click.
Evolution and Breaking Changes
Version 2.1.0 of the STM32Cube VS Code extension added the support of:
- TrustZone devices
- Dual-core devices
- Boot flash devices
Working with simple / single-core devices, requires STM32CubeMX v6.11 and STM32CubeCLT v1.15.
Working with TrustZone, Dual-core, or Boot flash devices, requires using STM32CubeMX v6.12 and STM32CubeCLT v1.16.
Prerequisites
- STM32CubeCLT v1.15.0 or later : STM32CubeCLT is a package containing toolchain and STM32 device related data required for project creation, build, and debug functionality.
To have all features available, you also need to install the following:
STM32CubeMX v6.11.0 or later : STM32CubeMX simplifies the configuration of STM32 microcontrollers and generates the corresponding initialization C code.
Starting from v6.11.0, STM32CubeMX can generate VSCode-compatible CMake projects, eliminating the need for .cproject/.project conversion in CubeIDE.
ST-MCU-FINDER : ST-MCU-FINDER-PC connects to and explores the full range of STM32 and STM8 microcontrollers, processors, dev boards, and examples.
Libncurses :
Ncurses is a tool that helps programmers create text-based user interfaces that work on different types of computers.
It is mandatory to install this requirement when using Linux.
apt-get install libncurses
To use a specific version of STM32CubeMX, ST-MCU-FINDER, or STM32CubeCLT with this extension on a computer with multiple installations, modify the relevant setting identifiers in VS Code settings.
The setting identifiers are as follows:
- STM32VSCodeExtension.projectCreator.executablePath for STM32CubeMX
- STM32VSCodeExtension.productFinder.executablePath for STM32CubeFinder
- STM32VSCodeExtension.cubeClt.Path for STM32CubeCLT
To make the necessary adjustments, open the VS Code settings, search for STM32VSCodeExtension, and update the tools paths accordingly.
Features
Compatibility with Windows, Linux, and MacOS
Project creation in two modes:
- STM32CubeMX projects (with CMake)
- Empty projects (with CMake)
Ability to browse and import CMake projects
- If the project is detected as an STM32 project, the VS Code extension autogenerates json-files
Shortcuts to launch some of ST tools:
- STM32CubeMX
- ST-MCU-FINDER
- STLINK firmware updater tool
Resources links to access:
- User guide
- STM32 MCU Developer Zone
- STM32 firmware
- ST Community forum
- Feedback section
Quick Start with Tutorial Videos
Get up to speed with the new version using our easy-to-follow tutorial videos:
License
STM32 VS Code extension is delivered under the LICENSE.
Where to learn more
After successfully installing the extension, you can access our user guide under the resources section. This documentation provides you with valuable information about the STM32 VSCode extension.
Additionally, the resources section contains links to other helpful resources such as:
STM32 MCU Developer Zone: a web page dedicated to STM32 developers describing all key ecosystem elements of STM32 and STM32Cube.
STM32 firmware: a GitHub page where STM32 firmware can be browsed for download or source code referencing.
ST Community forum: a webpage for support and knowledge sharing among developers and ST employees.
Feedback section: this is where you can provide your feedback about this extension that you want us to hear.
Limitations
STM32CubeMX 6.12.0 CMake project generator has the following limitations:
- TouchGFX projects are not supported
- On Linux, when using STM32CubeMX V6.12.0, compiling multicontext projects fails. It includes configurations for STM32WL, STM32WBA, STM32U5, STM32L5, STM32H5, STM32H7Rx/7Sx, and STM32H7 dual-core microcontrollers. To resolve this issue, the user must:
- Rename the startup folder to Startup in all subprojects within the project folder
- Regenerate the project with STM32CubeMX
- Build the project
STM32CubeCLT v1.16.0 has the following limitation:
- The SVD peripheral description file of the following devices contains incorrect interrupt and exception vector information.
- STM32L476.svd
- STM32F767.svd
- STM32C011.svd
This issue have impacted STM32 VS Code extension startup file generator.
STM32 VS Code Extension v2.0.0 or later has the following limitation:
- STM32Cube examples and STM32CubeIDE projects cannot be imported to VS Code in an automatic way. The user must do some manual work. Check the Troubleshooting section in the user guide for further details.