gdb with openocd on beaglebone for debugging a program

Hi all,
Need some help regarding how to use gdb with open ocd for remote debugging a program on beaglebone.

Firstly I followed these link to get started with open ocd!!

And it seems to be worked to get
connect with beaglebone using gdb through open ocd. even able to get connected using telnet!!

following are the steps I’m following>>


sudo openocd -f board/ti_beaglebone.cfg -c init -c “reset init”

2nd) I can connect to the beaglebone by telnet as

sudo telnet localhost 4444

when I get connected I can halt, resume the cpu and I can see the effect of it on board!!

3rd)I can connect to the beaglebone by gdb as


4th)On the other side on target beaglebone I’m setting the gdbserver to debug the hello word program as

gdbserver /dev/ttyO0 hello

as I’m not using the ethernet connection for it.

5th)on host side I’m doing this>

i.arm-argo-linux-gnueabi-gdb hello
ii.set sysroot /path/to/copy/of/rootfs remote localhost:3333
iv.b main

and when I say
continue it says this>>
on host side>>

hi all,

I just did one change here,

now I’m using the gdb in cross compiler tool chain!!!

and using the ethernet connection to board for the remote debug!!

on target I changed to>>

gdbserver hello

here is the ip add of host and 12345 is the unique port number

and on host I changed to

target remote hello

here is ip add of target and 12345 is same port no used on target for communication

and hello is app program!!!

and finally I’m able to do remote debug a prog on beaglebone using gdb/gdbserver with openocd!!



Hi robert,

thanks for the reply.
well, yes it’s working without openocd!!

Actually, I referres this link 1st up>>

it explains>>