cancel
Showing results for 
Search instead for 
Did you mean: 

Upload without debugging

QcFe
Associate

Hello everyone.

I'm rather new to STMCubeIDE. I used a little STM Workbench in the past but never had the opportunity to work on a full project.

Now, after I started a new project and worked on it, debugged it and so, I have the need to compile and upload it on my MCU without starting the debugger.

It seems absurd, but I couldn't find anything on the Internet about this.

Isn't there any option to do this directly from the Cube IDE?

The debug mode works greatly. The code is uploaded and the debug starts and works perfectly. But Is there any way to actually NOT start the debugger after the upload?

4 REPLIES 4
scottSD
Senior III

I have wondered the same thing. All IDEs I have used in the past had a way to simply program the target.

What I have found is that if I run the debug, the target is indeed loaded. If I disconnect/reconnect the target, it starts up and runs what I just programmed it using the Run > Debug.

QcFe
Associate

That's correct, and that's what I do indeed. I actually just click on the stop button, it just detaches the debugger and the program keeps running.

But it's often annoying to wait for it to connect, sync and all, then stop.

Many times I just need to tweak a couple of things, then re-upload and look at the serial output. Eclipse is so damn slow with its unresponsive feeling already, and it's really annoying to just stay there and wait...

But still, I think it's more of a principle issue... It makes no sense!

We got the debug option and that's awesome.

But we miss a production option/procedure!

How can it be possible that there isn't any straightforward procedure to compile a release binary without debugging symbols and upload it directly?

I hope your post will be a suggestion for a future update on the IDE.

There is a vast improvement to the IDE since the initial release, so they are making strides and I think it's a good idea to offer any suggestions we can for future releases.

berendi
Principal

Enable generating an Intel .HEX file in Project properties - C/C++ Build - MCU Post build outputs. It can then be uploaded with the ST-LINK utility or a variety of 3rd party tools.

To make it a one-click operation, first figure out the command line parameters for ST-LINK or your preferred upload software to upload the gerated .HEX file, then configure it as an external tool. By default, all projects in the workspace will be built when launching the tool, though you can restrict it to the active project.