stlink icon indicating copy to clipboard operation
stlink copied to clipboard

[feature] st-util with SWO support possible?

Open mhanuel26 opened this issue 7 years ago • 9 comments

  • [x] Stlink/v2-onboard
  • [x] Linux
  • [x] st-util
  • [x] STM32F769 Discovery

I was wondering if it's possible to have SWO output from target. It will be great to have sort of printf window for debug messages. The closest minimalist solution I have found is explained here, but depends on STM32 ST-Link Utility or Keil uVision for it.

Please let me know your thoughts,

mhanuel26 avatar Jul 11 '17 04:07 mhanuel26

Its possible, but not implemented. OpenOCD has support for this to write ITM port 0 or 1 to a file.

xor-gate avatar Jul 11 '17 16:07 xor-gate

Hello, Do you plan to implement swo?

shizacat avatar Jan 30 '18 20:01 shizacat

+1 on SWO feature

romansavrulin avatar Mar 25 '18 00:03 romansavrulin

also +1 on SWO feature

langhaarschneider avatar Apr 08 '20 07:04 langhaarschneider

Hi @mhanuel26, @shizacat, @langhaarschneider, The stlink project now contains a st-trace utility program that will read SWO output from a target. (Run "st-trace --help" for more details.) Does this meet your needs? If not, can you explain how you would like this to work?

simplerobot avatar Jun 18 '21 05:06 simplerobot

@simplerobot Viewing the SWO output while debugging would be a nice touch. Currently only the semihosting is supported: https://github.com/stlink-org/stlink/blob/01418b5666c72ce802ea5af88b62dc9aa06c8c3e/src/st-util/gdb-server.c#L1423-L1481

Ant-ON avatar Jun 18 '21 05:06 Ant-ON

I really need this feature. I see it is added to the list of release v1.7.1. When can I expect the release of v1.7.1?

ChrisIdema avatar Jul 06 '22 13:07 ChrisIdema

Currently no date or time frame is planned for any new release. This is because development is currently mostly on hold within this project, see also: https://github.com/stlink-org/stlink/discussions/1223

Nightwalker-87 avatar Jul 06 '22 17:07 Nightwalker-87

I'd consider this a useful feature as well. Who can help out on this topic? Does anybody have an idea how to implement this?

Nightwalker-87 avatar Aug 27 '22 09:08 Nightwalker-87

What is the status of SWO working with STLink (st-util) such that Cortex-Debug and uScope (RTT viewer, https://github.com/DEMCON/uscope) can use it ?

If it now does work, does one need to reflash the STLink device to make SWO work or just update st-util ?

If it doesn't work, what can I do to help the situation ?

linuxguy123 avatar Mar 12 '24 16:03 linuxguy123

Hi @mhanuel26, @shizacat, @langhaarschneider, The stlink project now contains a st-trace utility program that will read SWO output from a target. (Run "st-trace --help" for more details.) Does this meet your needs? If not, can you explain how you would like this to work?

Speaking as a VSCode user, how would I configure VSCode to work with st-trace ? Let's assume I want to use uScope (https://github.com/DEMCON/uscope) as my rtt viewer.

linuxguy123 avatar Mar 12 '24 16:03 linuxguy123

@linuxguy123 There have been no action or any efforts on this topic since the last response of @Ant-ON. I personally can't contribute to this topic, sorry.

Nightwalker-87 avatar Mar 12 '24 20:03 Nightwalker-87