Author Topic: ST/GD-link question  (Read 878 times)

0 Members and 1 Guest are viewing this topic.

Offline simonlasnier

  • Frequent Contributor
  • **
  • Posts: 359
  • Country: dk
ST/GD-link question
« on: September 18, 2021, 08:42:00 am »
Hi :)

Does anybody know if there is any difference between the ST-Link of STM and the GD-Link of GigaDevice?
Do you think I can use my ST-Link to program a GD32e230x for example?

Thank you
Simon
« Last Edit: September 30, 2021, 06:19:50 am by simonlasnier »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 3012
  • Country: ca
Re: kB is 1... no just kidding - ST/GD-link question
« Reply #1 on: September 21, 2021, 09:12:28 pm »
I haven't heard any issues with using normal stlink. Should be able to program it OK.
The one limitation might be if their software does not support stlink programmer, but that would be a surprise, and other programming software is available.
 
The following users thanked this post: simonlasnier

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 1820
  • Country: nl
ST/GD-link question
« Reply #2 on: September 21, 2021, 11:11:38 pm »
Which one?
https://www.blaatschaap.be/debuggers/st-link/

I'm also sort of interested in the black magic probe, but have not used it and do not know if it supports the GD devices.

And what's this kB nonsense?
 

Offline bson

  • Supporter
  • ****
  • Posts: 2054
  • Country: us
Re: kB is 1... no just kidding - ST/GD-link question
« Reply #3 on: September 22, 2021, 05:35:31 am »
There's nothing processor specific about the programmer.  It's more about how well the programmer is supported by your toolchain.

openocd for example supports all versions of stlink (v1, v2, v3) but not gd-link directly out of the box.
 
The following users thanked this post: simonlasnier

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 3012
  • Country: ca
Re: ST/GD-link question
« Reply #4 on: September 22, 2021, 08:55:07 pm »
I'm also sort of interested in the black magic probe, but have not used it and do not know if it supports the GD devices.

Get a generic stlink if you haven't already, doesn't really matter which one. Stlink v3 mini is also available from digikey for $10.
You can get a bluepill PCB and convert it into blackmagic probe.

The support list is here: https://github.com/blacksphere/blackmagic/wiki/Frequently-Asked-Questions
So any GD32 that is a clone of a ST part would work, but, any custom GD32 part I don't think it would work unless you wrote the driver for it yourself?
 

Offline bson

  • Supporter
  • ****
  • Posts: 2054
  • Country: us
Re: kB is 1... no just kidding - ST/GD-link question
« Reply #5 on: September 23, 2021, 09:44:49 pm »
As long as your tool knows how to use the programmer, it can talk to the processor.  But that's not enough, the tool also needs to know things about the processor, such as how to flash it, halt it, configure the clock, and so on.  Most use the ARM macrocells, but there are variations on this - such as how many breakpoints or watchpoints there are.  It also matters for example whether a processor can be debugged while in sleep mode.  Given the complexity of these SoC MCUs you're bound to find edge cases where they behave a little differently; for example I tried building an STM32F103 board I made with a GD32F103 - and couldn't even get the processor to respond over SWD.  It's not unsurprising if something like this won't work out of the box; the changes needed may be trivial, and could perhaps be made to work on either, but it's a bit of a leap to assume it'll just work.
 
The following users thanked this post: simonlasnier

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 3012
  • Country: ca
Re: kB is 1... no just kidding - ST/GD-link question
« Reply #6 on: September 24, 2021, 09:32:44 pm »
I can't see why your GD32 would not respond over SWD. That sounds more like a physical issue.
Although there was a case where I needed to pull the reset line low for it to program, do you have reset connected to the programmer?
 

Offline bson

  • Supporter
  • ****
  • Posts: 2054
  • Country: us
Re: kB is 1... no just kidding - ST/GD-link question
« Reply #7 on: September 26, 2021, 01:55:55 am »
I do have reset connected.  There's also a hold on it (10k, 100nF) because it's used to reset other components.  (The MCU has an internal hold.)  It's not that I couldn't get it to work - I'm sure I could.  It just didn't work as-is.
 
The following users thanked this post: thm_w

Offline simonlasnier

  • Frequent Contributor
  • **
  • Posts: 359
  • Country: dk
Re: ST/GD-link question
« Reply #8 on: September 30, 2021, 06:25:32 am »
Wow thanks everybody for all the replies! I forgot to check that thread  ;D

Well that's great to know, as I understood SWD is not an ST standard but an ARM one, and the ST-Link uses SWD so yea that was also my impression that it would work the same with GD32, STM32, or actually any other ARM processor that implements SWD? :)

And as for the software I will be using Keil ARM which supports STLink.

I will try to update here of my progress once I have the board :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf