Author Topic: ST's gdb server, probe-rs, JLink, BlackMagic differences between them?  (Read 4795 times)

0 Members and 1 Guest are viewing this topic.

Online peter-h

  • Super Contributor
  • ***
  • Posts: 4523
  • Country: gb
  • Doing electronics since the 1960s...
Re: ST's gdb server, probe-rs, JLink, BlackMagic differences between them?
« Reply #50 on: January 29, 2025, 02:57:34 pm »
Quote
but I've seen enough open source projects to understand that details do matter and that there's enough badly documented or completely undocumented "magic" in building them to make this a major PITA.

Pretty much sums up the open source scene :)
https://www.eevblog.com/forum/programming/a-rant-about-lack-of-support-on-open-source-software-or-anything-else-actually/

Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline bson

  • Supporter
  • ****
  • Posts: 2519
  • Country: us
Re: ST's gdb server, probe-rs, JLink, BlackMagic differences between them?
« Reply #51 on: January 31, 2025, 10:20:28 pm »
I've tried several different builds. I don't think many people use features like the set command.
Yes we do.  Every time we change a value from the debugger we use it.

The problem isn't the set command, it's that your build of gdb doesn't recognize your code as being C, so doesn't parse C expressions.  Remember that gdb supports many languages and auto detects it by default from the source file.  If just looking at some binary without debug info it might not have a clue.  You can explicitly set the language with 'set language'. See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Languages.html#Languages

Of course, there can also be a build dependency problem.
« Last Edit: January 31, 2025, 10:21:59 pm by bson »
 
The following users thanked this post: incf

Offline incfTopic starter

  • Regular Contributor
  • *
  • Posts: 174
  • Country: us
  • ASCII > UTF8
Re: ST's gdb server, probe-rs, JLink, BlackMagic differences between them?
« Reply #52 on: January 31, 2025, 11:02:30 pm »
I've tried several different builds. I don't think many people use features like the set command.
Yes we do.  Every time we change a value from the debugger we use it.

The problem isn't the set command, it's that your build of gdb doesn't recognize your code as being C, so doesn't parse C expressions.  Remember that gdb supports many languages and auto detects it by default from the source file.  If just looking at some binary without debug info it might not have a clue.  You can explicitly set the language with 'set language'. See https://sourceware.org/gdb/current/onlinedocs/gdb.html/Languages.html#Languages

Of course, there can also be a build dependency problem.

I'm ecstatic, this is the solution to 30+% of my problem(s).

It was not auto-detecting that it was debugging a C program.

For reference to the future reader the "show language" command will show the currently autodetected language
"set language c" is required to avoid "unexpected token" errors for set commands.

Not sure what the syntax for setting would be if the language was something else like "asm"

Side tangent: this link has the syntax for casting in Rust https://stackoverflow.com/questions/55457338/gdb-cast-depends-on-the-language-compiled for those suitably inclined.

« Last Edit: January 31, 2025, 11:23:37 pm by incf »
 

Offline kevinpt

  • Contributor
  • Posts: 14
Re: ST's gdb server, probe-rs, JLink, BlackMagic differences between them?
« Reply #53 on: February 04, 2025, 09:20:06 pm »
What does the BMP probe do that a STLINK does not? I had a look at their website but can't see clear advantages.

BMP supports many other devices from other vendors. Hardware is a bit cheaper.
If its just STM32 you are looking at, I don't think there is a major difference.

Hardware wise, the BMP has bus transceivers providing some isolation of the probe and allowing 1.5V - 5V IO (wider span than STLinks support). Software wise, the BMP firmware can speak JTAG as well as ARM SW-DP.

You get the benefit of fewer hassles with direct GDB access. OpenOCD, for instance, has a misfeature where it leaves the processor in debug mode after you program an image and detach. If you have any code detecting an attached debug probe it will not behave as expected. The BMP firmware handles this correctly.
 

Offline mwb1100

  • Frequent Contributor
  • **
  • Posts: 687
  • Country: us
Re: ST's gdb server, probe-rs, JLink, BlackMagic differences between them?
« Reply #54 on: February 05, 2025, 12:10:19 am »
Software wise, the BMP firmware can speak JTAG as well as ARM SW-DP.

Just a nitpick: ST-LINK also supports JTAG.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf