Hi,
I want to debug Pandaboard ES with Flyswatter, OpenOCD and GDB.
Debugging from OpenOCD works fine, but I can not debug properly after I
attach GDB.

Here is detailed description. I use:
- Host OS: Ubuntu 12.04 64-bit
- OpenOCD version 0.5.0
- Linaro arm-linux-gnueabi-gdb version 7.4-2012.04

I installed OpenOCD with:
$ sudo apt-get install openocd
Because it does not contain support for Pandaboard ES,
I downloaded ti_pandaboard_es.cfg from
http://elinux.org/Category:OpenOCDand I placed it to
/usr/share/openocd/scripts/board/ directory. Also, I downloaded
omap4460.cfg and put it in
/usr/share/openocd/scripts/target/ directory.

After Pandaboard ES is running, from one terminal I run OpenOCD with:
___________________________________________________________________________________

$ *sudo openocd -f /usr/share/openocd/scripts/interface/flyswatter.cfg -f
/usr/share/openocd/scripts/board/ti_pandaboard_es.cfg*
*Open On-Chip Debugger 0.5.0 (2011-12-03-10:15)
Licensed under GNU GPL v2
For bug reports, read
    http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
RCLK - adaptive
Using dbgbase = 0x80000000
force hard breakpoints
trst_only separate trst_push_pull
Info : RCLK (adaptive clock speed) not supported - fallback to 6000 kHz
Info : JTAG tap: omap4460.jrc tap/device found: 0x2b94e02f (mfg: 0x017,
part: 0xb94e, ver: 0x2)
Info : JTAG tap: omap4460.dap enabled
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms
Info : JTAG tap: omap4460.m30_dap enabled
Polling target failed, GDB will be halted. Polling again in 700ms
Info : JTAG tap: omap4460.m31_dap enabled
Info : omap4460.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : omap4460.m30: hardware has 6 breakpoints, 4 watchpoints
Info : omap4460.m31: hardware has 6 breakpoints, 4 watchpoints
Polling succeeded again*
___________________________________________________________________________________

>From another terminal:
___________________________________________________________________________________

$* telnet localhost 4444*
*Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
Open On-Chip Debugger*
___________________________________________________________________________________

And here I can debug using OpenOCD. After I attach GDB from third terminal
with:
___________________________________________________________________________________

$ *arm-linux-gnueabi-gdb u-boot*
*Reading symbols from
/home/mirela/linux/u-boot/u-boot-linaro-stable-f9e40ea/u-boot...done.*
(gdb) *target remote localhost:3333*
*Remote debugging using localhost:3333
0x00000000 in ?? ()*
(gdb) *monitor reset init*
*JTAG tap: omap4460.jrc tap/device found: 0x2b94e02f (mfg: 0x017, part:
0xb94e, ver: 0x2)
JTAG tap: omap4460.dap enabled
JTAG tap: omap4460.m30_dap enabled
JTAG tap: omap4460.m31_dap enabled
Locking debug access failed on first, but succeeded on second try.
omap4460.cpu: ran after reset and before halt ...
target state: halted
target halted in Thumb state due to debug-request, current mode: Supervisor
cpsr: 0x600001f3 pc: 0x00033798
MMU: disabled, D-Cache: disabled, I-Cache: enabled
timed out while waiting for target halted
TARGET: omap4460.m30 - Not halted

in procedure 'reset'
*
___________________________________________________________________________________

>From GDB I can correctly see register content. But setting a breakpoint
doesn't work.
For example, if I set a breakpoint from GDB:
___________________________________________________________________________________

(gdb) *b *0x80e80000*
*Breakpoint 1 at 0x80e80000: file start.S, line 38.*
___________________________________________________________________________________

In terminal that runs telnet I get:
___________________________________________________________________________________

*JTAG-DP STICKY ERROR
MEM_AP_CSW 0x2800052, MEM_AP_TAR 0x380c0
JTAG-DP STICKY ERROR
MEM_AP_CSW 0x2800052, MEM_AP_TAR 0x380c0
Block read error address 0x380c0*
___________________________________________________________________________________

With
(gdb) *monitor reset *
I can reset target, but breakpoint never hits.

What this error means? Is there something that I'm missing?

Thanks,
Mirela
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to