OpenOCD confusion

Open source ARM Debugger

Moderator: phalanx

Post Reply
Kowalski
Posts: 2
Joined: Fri Nov 03, 2017 11:34 pm

OpenOCD confusion

Post by Kowalski » Fri Nov 03, 2017 11:44 pm

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?

DanV
Posts: 294
Joined: Sat Apr 25, 2015 9:29 am

Re: OpenOCD confusion

Post by DanV » Sat Nov 04, 2017 7:07 am

1) the capability is either available on your particular chip or it's not.

Many of your questions are answered on this site:
https://hackaday.com/2012/09/27/beginne ... debugging/

Kowalski
Posts: 2
Joined: Fri Nov 03, 2017 11:34 pm

Re: OpenOCD confusion

Post by Kowalski » Sun Nov 05, 2017 1:52 am

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?

DanV
Posts: 294
Joined: Sat Apr 25, 2015 9:29 am

Re: OpenOCD confusion

Post by DanV » Sun Nov 05, 2017 8:20 am

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 pm
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?
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 pm
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?
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.

Post Reply