cancel
Showing results for 
Search instead for 
Did you mean: 

TrueSTUDIO run configuration

Krystof Vanek
Associate II
Posted on March 07, 2018 at 12:44

Hello,

is there a way to create run configuration in TrueSTUDIO in a same way as it is in SW4STM32?

I would like to 'launch' the code without entering the debug perspective. Just flash and run.

Thanks for helping.

#truestudio
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on March 07, 2018 at 15:17

Were you replying to me or to

Vanek.Krystof

?

With the method I explained, the extensionis.hex(but I suppose you could use a .bin if necessary) and the path is already taken into account by the arguments I specified, so I have only 1 external tool configuration for my whole workspace.

0690X00000609zgQAA.png

View solution in original post

16 REPLIES 16
Geo En
Associate III
Posted on March 07, 2018 at 13:16

For this situation, I have made a copy of the ''.elf'' file in ''Debug configuration'' : ''blablabla.elf FLASH ONLY''.

In this configuration, I have modified the ''Startup script''. I have removed everything under ''load'' and I have added ''quit''.

Debbuger will now flash the device and get back to normal editing mode.

0690X00000609z2QAA.png

Hope this helps.
Kraal
Senior III
Posted on March 07, 2018 at 13:46

Hi ! The solution proposed by

enjolras.g

is good but the loading process is slower through the debug interface. If you are using the ST-Link pod, I suggest to read the TrueStudio user manual (which can be found inC:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.0.0\Manuals\General) on page 194, which explains how to call ST-Link Utility through TrueStudio. It is the method I'm using and it is really fast. However I have not found yet how to create a shortcut to call this easily.

Kraal
Senior III
Posted on March 07, 2018 at 14:21

I should add the arguments needed:

-c SWD UR -ME -P ${workspace_loc}\${project_name}\${config_name:${project_name}}\${project_name}.hex -V -Rst

SWD : connect using SWD protocol

UR : connect Under Reset

-ME : perform a mass erase before programming

-P : program the hex file, ${...} is to be able to run the tool for any project

-V : verify the program

-Rst : reset the uC to let it run

Posted on March 07, 2018 at 15:00

In Eclipse, I configure the External Tools under Run menu like this:

0690X00000609zWQAQ.png

Probably, your extension will be .binary ?

And the path will also differ, as your binary will be in Debug or Release...

Posted on March 07, 2018 at 15:17

Were you replying to me or to

Vanek.Krystof

?

With the method I explained, the extensionis.hex(but I suppose you could use a .bin if necessary) and the path is already taken into account by the arguments I specified, so I have only 1 external tool configuration for my whole workspace.

0690X00000609zgQAA.png

Posted on March 07, 2018 at 15:22

0690X00000609wxQAA.png

No problem

Kjeldsen.Carl_Nicola

, I do not compete... this is a Linux solution and yes, for the entire workspace but for projects generated for Makefile (IDE independent) and using the @texane tool.

Hmm, didn't realize that I had it setup for Atollic as well, I always reach Eclipse first...

0690X00000609zqQAA.png

Vanek.Krystof

, for the binary created in Debug folder, you can create another entry in the menu, eventually named ST_Link_Debug... but of course, for the ST Link utility you are using under Windows...

Posted on March 07, 2018 at 16:15

I'm sorry

Guta_Ciucur.Vasile

if I sounded a bit harsh, that was not my intention. I think you can use ${config_name:${project_name}} to switch automatically between Debug and Release.

Have a nice day,

Kraal

Posted on March 07, 2018 at 16:27

No offense taken, I learned something new from you!

Krystof Vanek
Associate II
Posted on March 08, 2018 at 11:58

Hi again,

thanks a lot to

Guta_Ciucur.Vasile

‌ and

Kjeldsen.Carl_Nicola

‌, your solution does exactly what I'd like to.

I just modified it a bit to use with STM32CubeProgrammer (CLI).

0690X00000609sYQAQ.png

The argumets are:

''-q'' quiet mode (no progress bar)

''-c port=SWD'' Choode SWD

''-e all'' erase all memory

''-d .....'' Download specified file

''-v'' verify

''-rst'' reset target

After that i used ''Customize perspective'' to add the option to toolbar.

Only problem is the console output is kinda messy, containing some strange characters. This probably is inherited by the system (Linux x64).

0690X0000060A13QAE.png