SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By Kowalski
#196860
Hi,
This is my first question here. I am trying to learn OpenOCD. And sorry for asking a dump questions.
My Questions are:
1) OCD = On Chip Debugger => How is it OnCHIP ?? isn't Onchip is something which exists right there on Silicon?
2) Debugger = How is it a debugger. i means its job is just to interpret Interface (jtag, swi, icdi etc) signals and to connect with it? and even if it is a debugger, why then we need GDB with OpenOCD to debug code?
3) Hows is it different from let say JTAG device driver? i mean JTAG driver also enables you to communicate with external connected device chip?
By Kowalski
#196867
Thanks for your reply. The link indeed presents pretty much good info but still i have the same confusion. Can you please answer in bulleted form one per question. I am still confused why GDB is required, can't we just send commands directly to openOCD?
User avatar
By DanV
#196868
Kowalski wrote: Fri Nov 03, 2017 11:44 pm 1) OCD = On Chip Debugger => How is it OnCHIP ?? isn't Onchip is something which exists right there on Silicon?
It's the on-chip capability that's on the silicon - On Chip Debugging.
Kowalski wrote: Fri Nov 03, 2017 11:44 pm2) Debugger = How is it a debugger. i means its job is just to interpret Interface (jtag, swi, icdi etc) signals and to connect with it? and even if it is a debugger, why then we need GDB with OpenOCD to debug code?
from the link:
In order to do this type of debugging you need three things: a program that controls the chip’s debugging mode (OPENOCD), a way to interface with it (GDB), and a program which has been compiled with debugging information (use -g option to include debugging information).
Kowalski wrote: Fri Nov 03, 2017 11:44 pm3) Hows is it different from let say JTAG device driver? i mean JTAG driver also enables you to communicate with external connected device chip?
I don't know - I believe JTAG is a hardware interface.

This whole question is like asking why you need a pre-processor, a compiler, and a linker to build a program. You kind of need this stuff to do a proper job.