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!!

http://www.mattlmassey.com/2012/04/26/using-openocd-with-the-beaglebone/
http://elinux.org/Running_OpenOCD_on_Linux_with_the_Beaglebone

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>>

1st)

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

arm-argo-linux-gnueabi-gdb

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
iii.target remote localhost:3333
iv.b main
v.continue

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 192.168.134.144:12345 hello

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

and on host I changed to

target remote 192.168.1.145:12345 hello

here 192.168.1.145 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!!

thanks,
aniket

Hi,

Hi robert,

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

Actually, I referres this link 1st up>>
http://openocd.sourceforge.net/doc/html/GDB-and-OpenOCD.html#GDB-and-OpenOCD

it explains>>