Skip to main content
TDJ
Senior III
February 11, 2026
Solved

How to deploy image without debugging?

  • February 11, 2026
  • 2 replies
  • 207 views

Probably this is trivial, but I just cannot find it.
How to deploy image using CubeIDE for VS Code without debugging?
How to properly configure Build+Deploy only (no debug) task in tasks.json file?
How to configure Build+Deploy with debug task?
Should I use cube cli for that or there is some easier way?

Best answer by vincent_grenet

@TDJ 
Relying on VS Code integrated terminal please have a try

cube programmer -c port=SWD -d <your .elf file>

2 replies

vincent_grenetBest answer
ST Employee
February 12, 2026

@TDJ 
Relying on VS Code integrated terminal please have a try

cube programmer -c port=SWD -d <your .elf file>
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
TDJ
TDJAuthor
Senior III
February 12, 2026

@vincent_grenetThank you! It may be worth mentioning that a file path like

${workspaceFolder}/build/debug/${workspaceRootFolderName}.elf

does not work on Windows. I had to use build/debug/${workspaceRootFolderName}.elf instead.

It is likely that "cube programmer" cmd does not handle mixed path separators well.

I think it would make sense to create some sort of shortcut under "STM32CUBE KEY ACTIONS".

 

 
ST Employee
February 13, 2026

@TDJ 

Thank you for reporting.

We are considering the situation. Unfortunately, the key action cannot be the solution. Lot of end users are using the multi-root workspace feature, which allows multiple projects per workspace / unique Visual Studio Code instance. Additional logic is required to safely retrieve the binary file.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.