Author Topic: Quick hack to get SWO on ST-Link clones  (Read 24622 times)

0 Members and 1 Guest are viewing this topic.

Offline lujjiTopic starter

  • Contributor
  • Posts: 29
  • Country: 00
Quick hack to get SWO on ST-Link clones
« on: September 26, 2016, 07:33:28 pm »
I recently bought a cheap ST-Link v2 knockoff. Unfortunately, these things don't have an SWO pin so you can't use trace. ST-Link firmware uses pin 31 for SWO, so all you have to do is scrape off some solder mask and solder a bodge-wire to the connector. If you need more details I documented everything on github.



P.S.: I wouldn't recommend buying these dongles. A Nucleo board (10$) will get you a much more useful programmer with UART on board.
 
The following users thanked this post: Mechatrommer, hans, eliocor, Rasz, thm_w, edavid, liteyear

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1976
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #1 on: September 26, 2016, 08:02:12 pm »
Thanx for that info  :-+ :-+

Any url's to a $10 Nucleo (prefer amazon or *bay)

/Bingo
 

Offline lujjiTopic starter

  • Contributor
  • Posts: 29
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #2 on: September 26, 2016, 08:15:10 pm »
I haven't seen Nucleo boards on ebay for a reasonable price. There are plenty on digikey though. I suggest getting one that has ST-Link v2-1 (like this one). There should be RX/TX pins near SWD connector.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1976
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #3 on: September 26, 2016, 08:28:46 pm »
Thnx

But S&H would far exceed the *bay prices.

Bingo.

Ohh one of those resistors on the arm-mcu decides if it's a v1 or v2 st-link , maybe you could fool it to be a v2.1

/Bingo
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
« Last Edit: September 26, 2016, 08:52:46 pm by stj »
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1976
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #5 on: September 26, 2016, 08:56:37 pm »
h
if your really in Denmark then maybe here:

I am in Dk ,and those prices excl VAT & Postage.

Again *bay wins , even though those UK guyzz selling them are prob. buying them @ RS or Farnell and reselling on *bay

/Bingo
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
Re: Quick hack to get SWO on ST-Link clones
« Reply #6 on: September 26, 2016, 09:05:56 pm »
well if you ordered one,
here is the latest firmware update.  :-+
 
The following users thanked this post: Mechatrommer, eliocor, bingo600

Offline lujjiTopic starter

  • Contributor
  • Posts: 29
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #7 on: September 26, 2016, 09:08:58 pm »
Ohh one of those resistors on the arm-mcu decides if it's a v1 or v2 st-link , maybe you could fool it to be a v2.1
You mean board ID resistors? That's a good idea, unfortunately both v2 and v2-1 schematics have the same ID resistors. Out of curiosity I just tried soldering unpopulated 10k resistor on my nucleo with st-link v2-1 and it seems to have no effect.
The problem with Chinese dongles is that they copy the standalone ST-Link programmer (which supports both STM8 and STM32). But standalone programmer can't be converted into J-Link. The ones on Discovery/Nucleo boards can ;)
« Last Edit: September 26, 2016, 09:20:27 pm by lujji »
 

Offline chickenHeadKnob

  • Super Contributor
  • ***
  • Posts: 1054
  • Country: ca
Re: Quick hack to get SWO on ST-Link clones
« Reply #8 on: September 27, 2016, 03:34:38 pm »
well if you ordered one,
here is the latest firmware update.  :-+

How are you finding the stability of 2.28.16 ?  I just read on Carmine Noviello's website that 2.26.16 has bricked some peoples st_links. His blog entry is confusing and probably has a typo since he writes 2.26.15 and 2.26.16

Link: http://www.carminenoviello.com/2016/02/26/restore-st-link-interface-bad-update-2-26-15-firmware/
 

Offline OZ1LQB

  • Regular Contributor
  • *
  • Posts: 51
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #9 on: September 27, 2016, 04:17:28 pm »
hi to all here.
bingo600 have you seen these
http://www.ebay.de/itm/Discovery-kit-for-STM32L0-series-with-STM32L053C8-MCU-1-Stuck-/311636279027?hash=item488ef83ef3
only 5euro and a bit much shipping(7.20 euro for one and 10euro for 10-15pcs)
BUT if you buy 10 then it's only going to cost you 60 euro(460 Danish kroner) when you get it..
and you have to remember when you use STM32F0 and STM32L0 then the full kiel IDE is free(for the F0 & L0)
Claus
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1976
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #10 on: September 27, 2016, 05:01:29 pm »
hi to all here.
bingo600 have you seen these
http://www.ebay.de/itm/Discovery-kit-for-STM32L0-series-with-STM32L053C8-MCU-1-Stuck-/311636279027?hash=item488ef83ef3
only 5euro and a bit much shipping(7.20 euro for one and 10euro for 10-15pcs)
BUT if you buy 10 then it's only going to cost you 60 euro(460 Danish kroner) when you get it..
and you have to remember when you use STM32F0 and STM32L0 then the full kiel IDE is free(for the F0 & L0)
Claus

Thanx Claus
I'll have a look

/Bingo
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
Re: Quick hack to get SWO on ST-Link clones
« Reply #11 on: September 27, 2016, 05:24:34 pm »
well if you ordered one,
here is the latest firmware update.  :-+

How are you finding the stability of 2.28.16 ?  I just read on Carmine Noviello's website that 2.26.16 has bricked some peoples st_links. His blog entry is confusing and probably has a typo since he writes 2.26.15 and 2.26.16

Link: http://www.carminenoviello.com/2016/02/26/restore-st-link-interface-bad-update-2-26-15-firmware/

i'v not used it yet, only got it a couple of days ago.
that said, i only use the drag&drop firmware flasher function anyway at the moment.

i hope i dont have to reflash 2.27.15.
 

Offline lujjiTopic starter

  • Contributor
  • Posts: 29
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #12 on: September 27, 2016, 08:36:59 pm »
How are you finding the stability of 2.28.16 ?
I had no issues at all. I don't think you can 'brick' the programmer by updating firmware. I also tried downgrading firmware about a week ago (entirely out of curiosity) and it worked just fine.
 

Offline lujjiTopic starter

  • Contributor
  • Posts: 29
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #13 on: September 29, 2016, 05:44:40 pm »
Look what I've got.
P.S: no soldering required)
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2153
  • Country: gb
Re: Quick hack to get SWO on ST-Link clones
« Reply #14 on: September 29, 2016, 06:04:55 pm »
is it a clone of v2, or v2-1??
and how much did it cost - compared to a nucleo-64 board?
 

Offline lujjiTopic starter

  • Contributor
  • Posts: 29
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #15 on: September 29, 2016, 06:34:24 pm »
is it a clone of v2, or v2-1??
and how much did it cost - compared to a nucleo-64 board?
It's a v2 clone, about 3$ shipped.
 

Offline thmjpr

  • Regular Contributor
  • *
  • Posts: 175
  • Country: ca
Re: Quick hack to get SWO on ST-Link clones
« Reply #16 on: October 01, 2016, 04:20:58 pm »
It's a v2 clone, about 3$ shipped.
Instructions please?
I get error "Identifying ST-LINK variant...ERROR: Unsupported ST-LINK hardware variant" if I try to program.
 

Offline lujjiTopic starter

  • Contributor
  • Posts: 29
  • Country: 00
Re: Quick hack to get SWO on ST-Link clones
« Reply #17 on: October 01, 2016, 08:42:23 pm »
Sorry, I don't have any instructions. But I found a strange sequence of absolutely meaningless random bytes on the internet and I have no idea what it means. Perhaps you might figure it out..
 
The following users thanked this post: thmjpr, Rasz

Offline robca

  • Frequent Contributor
  • **
  • Posts: 257
Re: Quick hack to get SWO on ST-Link clones
« Reply #18 on: December 06, 2019, 07:03:13 pm »
It looks like the original hastebin link is not working anymore, so providing new random bytes https://hastebin.com/raw/edemodacaj
 
The following users thanked this post: thm_w

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1976
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #19 on: December 06, 2019, 08:45:37 pm »
It looks like the original hastebin link is not working anymore, so providing new random bytes https://hastebin.com/raw/edemodacaj

An explanation would be nice , instead of just cryptic hexcodes.  :-//

/Bingo
 

Online langwadt

  • Super Contributor
  • ***
  • Posts: 4391
  • Country: dk
Re: Quick hack to get SWO on ST-Link clones
« Reply #20 on: December 06, 2019, 08:59:17 pm »
It looks like the original hastebin link is not working anymore, so providing new random bytes https://hastebin.com/raw/edemodacaj

An explanation would be nice , instead of just cryptic hexcodes.  :-//

/Bingo

https://weekly-geekly.github.io/articles/442290/index.html
 
The following users thanked this post: bingo600

Offline robca

  • Frequent Contributor
  • **
  • Posts: 257
Re: Quick hack to get SWO on ST-Link clones
« Reply #21 on: December 07, 2019, 12:38:12 am »
It looks like the original hastebin link is not working anymore, so providing new random bytes https://hastebin.com/raw/edemodacaj

An explanation would be nice , instead of just cryptic hexcodes.  :-//

/Bingo

https://weekly-geekly.github.io/articles/442290/index.html
Actually, no, your link is not relevant to the new link I posted

The link you provide is about making an ST Link V2-1 out of a Chinese 2.0 clone (incidentally, that is better explained here https://www.eevblog.com/forum/microcontrollers/dumping-and-reverse-engineering-st-link-v22-1-firmware/, and there is new information compared to the github link you provide, which is by now not working anymore)

The "strange sequence of absolutely meaningless random bytes on the internet" in the link are in reference to the STLink used as a different type of SWD device

I'm simply providing the same information as it was in the original post. There is a reason why it's left as cryptic as it is, before and now...
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Quick hack to get SWO on ST-Link clones
« Reply #22 on: December 07, 2019, 12:48:02 am »
st-link is slow compared to Jlink.  You can get a Jlink EDU mini for around $20-$30, the only drawback is it uses 1.27mm pitch pin header, but some Cortex-M boards comes with 1.27mm headers.
 

Offline robca

  • Frequent Contributor
  • **
  • Posts: 257
Re: Quick hack to get SWO on ST-Link clones
« Reply #23 on: December 07, 2019, 12:53:12 am »
Or you can use the below to make a Nucleo STLink into a JLink, with specific licensing restrictions.

https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/

Jlink has a ton of advantages compared to STLink (in particular I like RTT for debugging information, much faster than semihosting using a virtual serial port, or SWO printing, which requires an additional SWO wire), but has a much more restrictive licensing
 
The following users thanked this post: ebclr



Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf