BB, Flyswatter, OpenOCD

I have:

BeagleBoard xM Rev C
Flyswatter Rev B
OpenOCD 0.5.0

The BeagleBoard works well. I don't know about the other stuff. I get
this output from openocd, using the ti_beagleboard_xm.cfg, and
flyswatter.cfg files:

Open On-Chip Debugger 0.5.0 (2011-12-01-19:13)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
10 kHz
Warn : dm37x.dsp: huge IR length 38
trst_only separate trst_push_pull
Info : clock speed 10 kHz
Info : JTAG tap: dm37x.jrc tap/device found: 0x2b89102f (mfg: 0x017,
part: 0xb891, ver: 0x2)
Warn : JTAG tap: dm37x.jrc UNEXPECTED: 0x2b89102f (mfg: 0x017,
part: 0xb891, ver: 0x2)
Error: JTAG tap: dm37x.jrc expected 1 of 2: 0x1b89102f (mfg: 0x017,
part: 0xb891, ver: 0x1)
Error: JTAG tap: dm37x.jrc expected 2 of 2: 0x0b89102f (mfg: 0x017,
part: 0xb891, ver: 0x0)
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors

In another window I can then "telnet localhost 4444", get an ocd prompt,
and enter commands but nothing much happens. For instance, "reset halt"
toggles between red leds 2 and 3. I get output that looks very similar
to the above but adding things like:

Error: target not examined yet
Runtime Error: /usr/local/share/openocd/scripts/target/amdm37x.cfg:194:
in procedure 'amdm37x_dbginit'
in procedure 'cortex_a8' called at file
"/usr/local/share/openocd/scripts/target/amdm37x.cfg", line 194

I'm not sure what I'm looking at or what the error messages are saying.

Any advice?
Thanks,
Jon

Hi Jon,

I don't know if you have a Flyswatter 2 or not. I have the same setup as you, except
mine is a Flyswatter 2 (I'm not sure what a Flyswatter rev B is). For my setup, and
possibly yours, there is excellent info here:
  http://www.tincantools.com/wiki/Flyswatter2_Beagleboard_XM_How_To

If you don't have a Flyswatter 2, they are only $89 and I can tell you they work
with the Beagleboard XM as described in the wiki above. Might be worth the investment.

Chuck

Thanks for the reply. Knowing that someone made it work inspired me to
go through the setup process again. My problem was a general inability
to follow directions. (I know, pretty surprising, eh?) I didn't
correctly patch the cfg files before compiling openocd. Things are much
better now. So it's off to learn a bit of ocd ...

Hi all,

Has anyone successfully done Linux kernel level debugging on a Beagleboard XM
(I have rev. C) using OpenOCD and a FlySwatter 2 JTAG unit?

I have it all set up, and OpenOCD connects to the target, but it appears to be
wiping out the target's running context. That is, the target was running
Linux, and I'm trying to bring up OpenOCD and be able to set breakpoints
and resume the kernel. But when I bring up OpenOCD the target context viewable
via the telnet connection on port 4444 is not very meaningful. Resume does nothing,
and the PC/regs don't look right. Memory dumps appear to only work at physical
addresses.

Looking for anyone who has successfully done kernel/module debugging, MMU-aware,
using OpenOCD through FlySwatter 2. The FlySwatter 2 is from Tin Can Tools,
and they have a good wiki showing how to set things up, but it does not indicate
if the unit is MMU-aware, or if kernel-level debug is achievable.

I'm using OpenOCD 0.5.0, libftdi 0.19, and the Tin Can Tools patch for OpenOCD to
support the FlySwatter devices.

Thanks in advance,
Chuck

Hi all,

I've a similar problem.

On an Ubuntu machine, sudo openocd -f tcl/interface/flyswatter2.cfg -f
tcl/board/ti_beagleboard_xm.cfg -c init -c "reset init"

gives me:

Info : only one transport option; autoselect 'jtag'
15000 kHz
10 kHz
Warn : dm37x.dsp: huge IR length 38
trst_only separate trst_push_pull
Info : max TCK change to: 30000 kHz
Info : clock speed 10 kHz
Info : JTAG tap: dm37x.jrc tap/device found: 0x2b89102f (mfg: 0x017,
part: 0xb891, ver: 0x2)
Info : JTAG tap: dm37x.dap enabled
Info : dm37x.cpu: hardware has 6 breakpoints, 2 watchpoints
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x540111c0
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x540111c0
10 kHz
Info : JTAG tap: dm37x.jrc tap/device found: 0x2b89102f (mfg: 0x017,
part: 0xb891, ver: 0x2)
Info : JTAG tap: dm37x.dap enabled
Locking debug access failed on first, but succeeded on second try.
1000 kHz
Warn : dm37x.cpu: ran after reset and before halt ...
Info : number of cache level 2
Error: cache l2 present :not supported
Error: mpdir not in multiprocessor format
target state: halted
target halted in ARM state due to debug-request, current mode:
Supervisor
cpsr: 0x800001d3 pc: 0x402009bc
MMU: disabled, D-Cache: disabled, I-Cache: enabled

But "resume" command from "telnet localhost 4444" doesn't resume the
kernel; nothing appears on the serial console. Eventually the two
green leds stop blinking and stay on.

I'm using beagleboard xm with flyswatter2.

interface ft2232
ft2232_device_desc "Flyswatter2"
ft2232_layout "flyswatter2"
ft2232_vid_pid 0x0403 0x6010
adapter_khz 15000

Any help would be highly apreciated. Thanks!

-Ashish

Hi all,

I've a similar problem.

On an Ubuntu machine, sudo openocd -f tcl/interface/flyswatter2.cfg -f
tcl/board/ti_beagleboard_xm.cfg -c init -c "reset init"

gives me:

Info : only one transport option; autoselect 'jtag'
15000 kHz
10 kHz
Warn : dm37x.dsp: huge IR length 38
trst_only separate trst_push_pull
Info : max TCK change to: 30000 kHz
Info : clock speed 10 kHz
Info : JTAG tap: dm37x.jrc tap/device found: 0x2b89102f (mfg: 0x017,
part: 0xb891, ver: 0x2)
Info : JTAG tap: dm37x.dap enabled
Info : dm37x.cpu: hardware has 6 breakpoints, 2 watchpoints
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x54011150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x540111c0
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x540111c0
10 kHz
Info : JTAG tap: dm37x.jrc tap/device found: 0x2b89102f (mfg: 0x017,
part: 0xb891, ver: 0x2)
Info : JTAG tap: dm37x.dap enabled
Locking debug access failed on first, but succeeded on second try.
1000 kHz
Warn : dm37x.cpu: ran after reset and before halt ...
Info : number of cache level 2
Error: cache l2 present :not supported
Error: mpdir not in multiprocessor format
target state: halted
target halted in ARM state due to debug-request, current mode:
Supervisor
cpsr: 0x800001d3 pc: 0x402009bc
MMU: disabled, D-Cache: disabled, I-Cache: enabled

But "resume" command from "telnet localhost 4444" doesn't resume the
kernel; nothing appears on the serial console. Eventually the two
green leds stop blinking and stay on.

I'm using beagleboard xm with flyswatter2.

interface ft2232
ft2232_device_desc "Flyswatter2"
ft2232_layout "flyswatter2"
ft2232_vid_pid 0x0403 0x6010
adapter_khz 15000

Any help would be highly apreciated. Thanks!

-Ashish

Hello,

I have this exact same problem. Did you ever get this to work?

I could not get openocd working with the bb config file, here’s the invocation that worked:

sudo ./openocd -f interface/flyswatter2.cfg -f target/omap3530_norclk.cfg -c “init” -c “reset init”

Note I was NOT doing kernel level debug. Have you tried running the debug session out of Eclipse?

Tony

Hi all,

I am a newbee to debugging,i have a hardware USB JTAG Debugger provided NGX Technologies which has 20 pin standard JTAG Header.
But BB-XM has only 14 pins,so i used a pin-pin connection between BB-XM and Hardware Debugger using Jumper wires between.

1.I have unused EMU0 and EMU1.
2.I have connected TDI of BB-xm to Debugger TDO and vice versa.

i started openocd by changing the tcl/target/amdm37x.cfg cortex-a to cortex-a8 @144

when i run the command on command prompt : openocd -f tcl/interface/ngxtech.cfg -f tcl/board/ti_beagleboard_xm.
cfg -f tcl/target/amdm37x.cfg -c init -c “reset init”
it displays the fallowing log on the console
Open On-Chip Debugger 0.7.0 (2014-01-23-19:22)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect ‘jtag’
adapter speed: 10 kHz
Warn : dm37x.dsp: huge IR length 38
trst_only separate trst_push_pull
adapter speed: 10 kHz
Warn : dm37x.dsp: huge IR length 38
Runtime Error: embedded:startup.tcl:20: Command/target: dm37x.cpu Exists
in procedure ‘script’
at file “embedded:startup.tcl”, line 58
in procedure ‘target’ called at file “tcl/target/amdm37x.cfg”, line 144
in procedure ‘ocd_bouncer’
at file “embedded:startup.tcl”, line 20

am unable to step further,please help me out in this regard.
for your information:
http://shop.ngxtechnologies.com/download/Schematics/JTAG/NGX_ARM_USB_JTAG.pdf