cancel
Showing results for 
Search instead for 
Did you mean: 

Configure CubeIDE for VS Code for flashing a device

Ricko
Senior III

Hi,

I’m new to using the STM32 plugin for VS Code, as well as to VS Code itself. I’m currently using a J-Link programmer and have successfully set it up for debugging.

Could you please advise on how to setup and configure VS Code and the STM32 plugin to flash firmware onto the microcontroller for a production release (i.e., programming the device not for/in debugging mode)?

Thank you for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
Cartu38 OpenDev
Lead III

@Ricko 
Just select target CMake preset, build & debug the same then.

Cartu38OpenDev_0-1769752881252.png

 

View solution in original post

4 REPLIES 4
Cartu38 OpenDev
Lead III

@Ricko 
Just select target CMake preset, build & debug the same then.

Cartu38OpenDev_0-1769752881252.png

 

Thank you @Cartu38 OpenDev 

Ricko
Senior III

After trying that I went back to the debug preset and out of the three buttons on the bottom bar (build, debug and run - see screenshot below) only the build works. The debug button and run button don't. But the main menu's F5 ("Start Debugging" and CTRL+F5 ("Run without debugging") do work correctly.

Ricko_1-1770179300903.png

When I press the bar's debug button it gives this error:

 

Ricko_2-1770179518778.png

 

And when I press the bar's run button it tried to open the .elf file which does exist and the location is correct. But not sure what is trying to open it and most importantly why...

Ricko_0-1770182809326.png

 

Any suggestions/help would be very much appreciated as always. :smiling_face_with_smiling_eyes:

Thank you

 

 

@Ricko 

Looking at notification details source is CMake Tools extension. Nothing STM32Cube may do / being involved here i guess.