2024-04-03 6:07 AM
https://marketplace.visualstudio.com/items?itemName=stmicroelectronics.stm32-vscode-extension
2024-06-17 10:09 AM
There is actually a way in which you may be able to do port your project from CubeIDE to use the CMake support in MX.
Note1: In this approach you will no longer be able to use CubeIDE on this project.
Note2: You will instead use CubeMX stand-alone tool + CMake, and VS Code if you want, or any other editor...
This procedure is a bit experimental. It took me 5min to test this out with a satisfying result. But I just had a plain MX project without much added application code that I wrote myself. This porting is where the tool does not help you.
Anyway, you can try this approach:
This list of steps may sounds quite long and terrifying, but, assuming you are not using too much exotic post-build steps and similar this procedure should be quite easy.
Good luck and let us know if it worked or not?! :)
2024-06-18 1:19 AM
I like the VS Code extension a lot, but here here are a couple of things I miss from the STM32CubeIDE:
Run Without Debugging
In order to execute this from the VS Code top menu, I currently need to do these steps:
It all works but is a bit irritating since both these two steps works seamless in CubeIDE.
Is this a bug or just some settings that needs to be fixed?
“Clean Build” on the Run menu
There is no such thing on the Run menu which is a bit annoying.
Also, a simple “Build” would be nice to have in the Run menu.
2024-06-27 12:06 AM
@Southbranch wrote:
...
Run Without Debugging
...
It all works but is a bit irritating since both these two steps works seamless in CubeIDE.
Is this a bug or just some settings that needs to be fixed?
It is more of embracing a philosophical change. In VS Code you work more with keyboard shortcuts then with using your mouse to click on GUI buttons. Many developers would argue that this is more ergonomic / efficient. But the down-side is getting used to this and to learn the keyboard shortcuts... To make a complete answer on this topic for anyone reading this thread:
Today our VS Code extensions generates a tasks.json file (unless it already exist in your project, then we don't want to overwrite your stuff...) which provides a "task" labeled STM32: CubeProg: Flash project (SWD)
This is just a template we provide, feel free to modify to your needs!
To perform a "flash and reset" you can execute this task.
Executing this task can be done by "clicks" or by keyboard shortcuts.
If you choose the "click approach", then there will be several clicks since there is no dedicated button...
Also please notice that their are tasks named "Clean project" and "Build project". Option3 is the most efficient...
The other options require more than 1 user interactions.
2024-10-01 12:56 PM - edited 2024-10-01 12:59 PM
Hi there!
Having some problems with the off box VS Code Extension,
i have to install ninja build, since the program won't compile, cant't say it's my case or the program doesn't install itself.
Next on my STM32F411CEUx_FLASH.ld i receive errors on this archive, which GPT help me notice where it says that it's missing RAM parameters, which i highlighted where it lacks.
The archive is annexed down.
Then it compiles and debug correctly.
2025-02-19 2:59 AM
Can static library cmake-based projects be created?
2025-02-21 9:14 AM
From MX or from VS Code itself? The answer is "no" regardless, just curious to hear more about the use case you are looking for. We have had internal discussions. Nothing planned. But let us know what you want to achieve and we have a better chance to do a proper solution! :)
2025-02-22 2:00 AM
Hi!
I have managed to create a static lib from inside VS code itself by modifying the CMake file. Works fine.
I am also in the process of adding another CMake static lib for TouchGFX, however, I really wish CubeMX itself would support code generation for this.
2025-02-23 8:43 AM
@Southbranch wrote:I am also in the process of adding another CMake static lib for TouchGFX, however, I really wish CubeMX itself would support code generation for this.
CMake is fairly new in STM32Cube ecosystem. TGFX is, to my knowledge the only missing puzzle piece. We will recover that gap shortly.
We are grateful for all feedback on the CMake structure. For sure we expect additional iterations until we are happy with it.
2025-02-24 4:00 AM
Msmy thanks Mattias,
Thas was really great news! =)