2025-07-27 4:54 PM
Solved! Go to Solution.
2025-07-27 11:22 PM
@horizon105457 it's not a regression it's a choice as part of new experience we want to propose.
As always pro & cons. We are happy to get your comments here. We aim to be driven by end users feedbacks. Feel free to share !
You're right <=2.2.1 extension was promoting at STM32CubeMX project import couple of launch.json and tasks.json files. One way was convenient, the other was hard coding too much settings to project structure & co promoted by us. We have ambition to relax end user creativity and support more custom (and possibly more complex, wide, ...) way of working.
So starting 3.4.11 extension versions (currently all pre-release to collect feedbacks) the experience has been updated a bit:
+ Already no need any more to import a project what is not so VSCode way of working. You just have now to add a project your VSCode workspace and like CMake tools extension is doing we are discovering live if added material may be a STM32Cube candidate. As end user you have to confirm it or not.
Part of new experience .. we are forcing nobody: end user has to get the control.
+ Once your project is a STM32Cube one, launch.json (and device flashing coming with) is generated either live under the hood pushing "Run & Debug" button
or if more control required, you can ask for "create a launch.json file" or add an extra configuration if exists already.
Based on launch.json we are fully supporting rich editor experience ... please rely on code completion to access the power of rich debug session we are supporting.
Such said you are in control to create by yourself all tasks you want adapting to your way of working. Brand new STM32Cube bundles based architecture is promoting you all STM32Cube available as a CLI. For example from VSCode integrated terminal STM32CUbe programmer is ready for you. Have a try about:
cube programmer --help
you can flash erase:
cube programmer -c port=SWD -e all
or program:
cube programmer -c port=SWD -d <binary file>
or ...
The very same you cam build:
cube cmake ....
2025-07-27 11:22 PM
@horizon105457 it's not a regression it's a choice as part of new experience we want to propose.
As always pro & cons. We are happy to get your comments here. We aim to be driven by end users feedbacks. Feel free to share !
You're right <=2.2.1 extension was promoting at STM32CubeMX project import couple of launch.json and tasks.json files. One way was convenient, the other was hard coding too much settings to project structure & co promoted by us. We have ambition to relax end user creativity and support more custom (and possibly more complex, wide, ...) way of working.
So starting 3.4.11 extension versions (currently all pre-release to collect feedbacks) the experience has been updated a bit:
+ Already no need any more to import a project what is not so VSCode way of working. You just have now to add a project your VSCode workspace and like CMake tools extension is doing we are discovering live if added material may be a STM32Cube candidate. As end user you have to confirm it or not.
Part of new experience .. we are forcing nobody: end user has to get the control.
+ Once your project is a STM32Cube one, launch.json (and device flashing coming with) is generated either live under the hood pushing "Run & Debug" button
or if more control required, you can ask for "create a launch.json file" or add an extra configuration if exists already.
Based on launch.json we are fully supporting rich editor experience ... please rely on code completion to access the power of rich debug session we are supporting.
Such said you are in control to create by yourself all tasks you want adapting to your way of working. Brand new STM32Cube bundles based architecture is promoting you all STM32Cube available as a CLI. For example from VSCode integrated terminal STM32CUbe programmer is ready for you. Have a try about:
cube programmer --help
you can flash erase:
cube programmer -c port=SWD -e all
or program:
cube programmer -c port=SWD -d <binary file>
or ...
The very same you cam build:
cube cmake ....
2025-08-01 4:57 AM
I manually added the following task.json file, and now I can compile and upload by running the task, which is in line with my previous EIDE habits.
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "build",
"command": "${command:st-stm32-ide-debug-launch.build}",
"args": [],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
},
{
"type": "shell",
"label": "flash-with-cubeprogrammer",
"command": "${command:st-stm32-ide-debug-launch.get-programmer-path}/STM32_Programmer_CLI",
"args": [
"-c",
"port=SWD",
"-d",
"${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
],
"group": {
"kind": "build",
"isDefault": false
},
"problemMatcher": [],
"dependsOn": [
"build"
]
}
]
}
If there are better solutions, please be sure to share them with us.