Skip to main content
Technical Moderator
March 10, 2023
Question

VSCode for STM32 extension 1.0.0 released

  • March 10, 2023
  • 22 replies
  • 40799 views

VSCode for STM32 extension 1.0.0 is available now

STM32 VS Code Extension

STM32 embedded development support added to Visual Studio Code.

A new STM32 VS Code Extension view container is added to the activity bar which contains lists of functionality that can be activated through a click.

Prerequisites

STM32CubeCLT is a toolset for third-party integrated development environment (IDE) providers, allowing the use of STMicroelectronics proprietary tools within their own IDE frameworks.

It is required for basic build and debug functionality.

For full functionality, three programs need to be installed on your computer:

Features

  • Create VS Code compatible projects from STM32Cube projects
  • Shortcut to create new application projects in STM32CubeMX
  • Cloning of STM32Cube firmware from GitHub
  • Resources containing shortcuts relevant for STM32 development
    • STM32 MCU Developer Zone
    • STM32 firmware on GitHub
    • STMCUFinder
    • ST Community forum
    • Give feedback

Create VS Code compatible projects from STM32Cube projects

This feature makes use of the extension "Embedded Tools" by Microsoft to create a VS Code compatible project from an STM32Cube project.

When clicked, a file selection window is opened up where a cproject file can be selected to import the project.

Shortcut to create new application projects in STM32CubeMX

Opens STM32CubeMX if it is installed on your computer.

When opened up a new application project can be created.

Cloning of STM32Cube firmware from GitHub

Allows selecting firmware for an STM32 device to be downloaded and used in the project or used for source code referencing.

STM32 MCU Developer Zone

A web page dedicated to STM32 developers describing all key ecosystem elements of STM32 and STM32Cube.

STM32 firmware on GitHub

This is where STM32 firmware can be browsed for download or source code referencing.

STMCUFinder

Opens STMCUFinder if it is installed on your computer.

This allows you to browse through the available ST MCUs to find the ones suitable for your projects.

ST Community forum

A place where you can get support from other developers and ST employees, as well as contribute your own knowledge to help others.

Give feedback

This is where you can provide your feedback about this extension that you want us to hear.

Where to get get it

available on the VS Code Extension Marketplace

https://marketplace.visualstudio.com/items?itemName=stmicroelectronics.stm32-vscode-extension

    This topic has been closed for replies.

    22 replies

    Visitor II
    March 12, 2023

    Hi All,

    Does anybody know how to see the peripherals register when debugging? I can only see the registers in CPU.

    Thanks

    Best Regards

    Frank

    Visitor II
    March 12, 2023

    Need to Install Cortex-M Debug Extension​, Enjoy debugging!

    Visitor II
    April 17, 2023

    I had the same problem and I tried to install Cortex-M Debug Extension​, but it didn't work

    Explorer
    March 14, 2023

    Hi,

    How to make a project for Visual Studio Code using STM32CubeMX? In the current version there is still no option to choose VS Code as IDE.

    In the installation process, do I need to install STM32CubeCLT even if my machine already has STM32CubeIDE installed?

    Technical Moderator
    March 15, 2023

    Hi Amend,

    Yes VSCode is not yet listed as an IDE in STM32CubeMX but it is totally compatible with STM32CubeIDE projects, so you have to select STM32CubeIDE as toolchain and the import the project in VSCode by using the import project menu.

    if it is already installed it is ok

    Visitor II
    March 16, 2023

    I have all the dependencies installed. I tried to import a project after generating it with CubeMX for STM32CubeIDE. The importer does not recognise any of the files in the folder as an "ST projects" file. Any ideas?

    Explorer
    March 15, 2023

    Hi Nawres,

    I have some doubts in the installation process. In the video contained in the link below, you only need to install the STM32 extension, but in the text of the same link I would supposedly need to install the STM32CubeCLT. Could you send me the procedure to have full development support for STM32 using VS Code?

    https://marketplace.visualstudio.com/items?itemName=stmicroelectronics.stm32-vscode-extension

    Explorer
    March 15, 2023

    Is this coming to https://open-vsx.org/ also?

    Visitor II
    March 16, 2023

    Hi

    I'm trying to run an CubeMx generated project on Win10

    and I've following error:

    See LICENSE.txt for license information.

    > Bundled version of vcpkg: "2023-01-24-8a88d63f241d391772fbde69af9cab96c3c64c75".

    > Running vcpkg with arguments ["activate","--project","d:\\tmp\\test","--json","C:\\Users\\pawel\\AppData\\Local\\Temp\\a2389955aa436cb38da1dafe11f3fdb9"].

    warning: vcpkg-ce ('configure environment') is experimental and may change at any time.

    Downloading vcpkg-artifacts bundle 2023-01-24...

    Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2023-01-24/vcpkg-ce.tgz

    write_contents("C:\Users\pawel\AppData\Roaming\Code\User\globalStorage\ms-vscode.vscode-embedded-tools\vcpkg\root\node_modules\ce-sha.txt"): no such file or directory

    > Failed with exit code "1".

    > Failed to activate environment at "d:\tmp\test\vcpkg-configuration.json".

    when trying to load local project

    Best regards

    PK

    Visitor II
    March 17, 2023

    Me too...but slightly different and I'm running on Ubuntu 20.04

    Downloading vcpkg-artifacts bundle 2023-03-14...

    error: Failed to provision vcpkg-artifacts.

    > Failed with exit code "1".

    > Failed to activate environment at ...

    Explorer
    March 23, 2023

    Thank you.

    Visitor II
    March 26, 2023

    It seem that a limitation of the import tool is that it does not import configurations from the .cproject file such as excluded files and linked resources (at least in my experience). Is it possible to add a list of supported cross functionality so users with existing CubeIDE code bases can understand what functionality is not fully supported via the import tool?

    Visitor II
    March 26, 2023

    Looking into this further, it looks like the import tool does not recognize workspace includes as shown,

    0693W00000aJiCwQAK.pngI changed the include path to a relative path and resolved this problem,

    0693W00000aJiD1QAK.png 

    However, I still require manual removal of excluded target sources. It looks like the importer is including all source files in the workspace recursively instead of using the files specified in the paths and symbols options. In this case, the target_sources is including my testing and mocking files that are intentionally excluded from the source paths. Note: I was incorrect in my initial comment that files excluded from build were showing up, it was these files that the imported added that were causing issues.

    0693W00000aJiDVQA0.png0693W00000aJiEYQA0.png 

    Explorer
    April 17, 2023

    I already asked this a month ago, but is this coming to  https://open-vsx.org/ ?

    Also this can't be installed on 1.72.2 VSCode, because it is not compatible. There doesn't seem to be any mention which versions are compatible.

    Visitor II
    April 22, 2023

    Hi,

    I installed the new extension and could compile code from vscode but I had a problem. When I see any file with #include vscode shows me with red underlines and I can't navigate through my project files. Output send this message:

    Unable to resolve configuration with compilerPath: "/opt/st/stm32cubeclt/gnu-tools-for-stm32/bin/arm-none-eabi-gcc". Using "/usr/bin/clang" instead.

    Any have the same issue?

    Visitor II
    May 2, 2023

    Hi,​

    When I select it on a build error, it tries to read a file with a strange path. As a result, vscode says it's a non-existent file.