Skip to main content
Pavel A.
December 8, 2019
Solved

Atollic/CubeIDE Automatically start SWO trace - still not done?

  • December 8, 2019
  • 13 replies
  • 2777 views

"Is it possible to automatically record SWV output in the SWV Console window so i do not have to push the red button manually on every launch?"

This was asked back in 2018 and still annoyes users...

https://blog.atollic.com/learn-serial-wire-viewer-debugging-on-cortex-m

Any chance it will be done?

Thanks,

Pavel

This topic has been closed for replies.
Best answer by LaurentL

Hello,

This feature is supported since STM32CubeIde 1.8.0 version.

You have to start it once (with the red button) and it will be automatically started on the next debug sessions.

Rgds,

Laurent

13 replies

Markus GIRDLAND
ST Employee
December 9, 2019

I've tried to raise this issue as well. Apparently it's more complicated than at least I would have guessed. There's more to that little red button than meets the eye. But I'll keep on fighting to make it no longer necessary to activate it every launch! :smiling_face_with_smiling_eyes:

Pavel A.
Pavel A.Author
December 10, 2019

Thank you for your efforts, Markus.

If this can be done via some monitor command in the debug start script, would be OK for me.

-- pa

bully
Senior
April 14, 2020

I agree, this one is really annoying...

R.

Schmid.M.
Associate III
July 9, 2020

still annoying!

Rob Meades
Senior
July 9, 2020

...and it can't be that complicated to do 'cos I can make it happen from the command-line using the OpenOCD and configuration files that are provided inside the STM32Cube directory with:

openocd –f stlink.cfg –f stm32f4.cfg -c init -c "itm port 0 on" -c "tpiu config internal temp.dat uart off 168000000 2000000" -c "reset init" -c resume

Surely it can't be easier to do from the command line than from inside what I assume is an Eclipse plug-in!?

RRodr.2
Visitor II
March 3, 2021

waiting for some progress...

paul19
Associate III
June 6, 2021

Also looking forward to this.

NZahr.1
Associate
April 19, 2022

Any update for this feature?

Markus GIRDLAND
ST Employee
April 20, 2022

Yep!

The errata for release 1.8.0 states under "Fixed issues":

95519 SWV Start Trace button now remembers its state.

Which means that as long as you are using 1.8.0 or a newer release of STM32CubeIDE it should no longer be necessary to press the button for each debug session.

LaurentL
LaurentLBest answer
ST Employee
April 20, 2022

Hello,

This feature is supported since STM32CubeIde 1.8.0 version.

You have to start it once (with the red button) and it will be automatically started on the next debug sessions.

Rgds,

Laurent

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.
Pavel A.
Pavel A.Author
April 20, 2022

@LaurentL​  @Markus GIRDLAND​  don't laugh at me.... but on the second thought - can automatic start of trace cause trouble?

The problem is that the server must know the target system clock frequency.

Usually the target starts on a different clock (internal vs external .... etc) and only some time later switches to the frequency specified in trace parameters.

Can bad trace data that arrives before the target clock switch confuse the server?

-- pa

Markus GIRDLAND
ST Employee
April 22, 2022

Hello @Pavel A.​ ,

No laugh here, the point is valid. I asked the developer who implemented it and he said that it's possible that some "garbage" data could appear in the SWV views if, for example, you printf before the clock is configured. However, it shouldn't be able to crash, confuse and/or sabotage anything as far as he is aware.

But as always, if you find a use case that proves him wrong then let me know and I'll write a ticket ;)