Page 1 of 1

Is there a way to use GDB with BDM?

Posted: Sun Aug 22, 2021 1:16 am
by NSFW
The GNU M68K toolchain includes the GDB debugger.
BDM is, in general, for connecting debuggers to hardware.
So, what would it take to get GDB to debug code in P01/P59 PCMs via BDM?

I ask because just stumbled on this how-to for using Eclipse for cross-dev / cross-debug with a $2000ish BDM tool:
http://download.ronetix.info/toolchains ... _guide.pdf

...and this list of GDB targets:
https://ftp.gnu.org/old-gnu/Manuals/gdb ... b_161.html

...and this GDB+BDM page:
https://cmp.felk.cvut.cz/~pisa/m683xx/bdm_driver.html

...and that got me wondering if there might be a way to use the same Eclipse + CDT + GNU-M68K setup with inexpensive BDM devices like the one from usbjtag.com.

I don't know much about GDB or BDM or embedded development in general to know how to put the pieces together, but it seems like there might be a way. Or, if not with usbjtag's hardware then perhaps with another BDM device (hopefully one that costs a lot less than Ronetix).

My aim here is to be able to write C, compile it, patch a .bin with the compiled code, and step through it with source-level debugging on a P01 or P59. The PCM doesn't need to be connected to an engine, I just want to be able to step through my code.

Eclipse can do the write/compile part. I can solve the bin patching part. But the GDB<->BDM part is a mystery to me.

Re: Is there a way to use GDB with BDM?

Posted: Sun Aug 22, 2021 1:21 am
by NSFW
Almost forgot... there's also an M68K emulator here:
Github: https://github.com/cnvogelg/bare68k
Docs: https://bare68k.readthedocs.io/en/latest/
Connecting that to GDB would be just as good, perhaps even better.