OpenOCD support the beagleboard?

Looking at the OpenOCD mailing list, I don't see a single line about
the beaglebone or AM355x. Neither can I see a single commit to the
repository for adding beaglebone support.

So my questions is: is anybody actively working on this?

What happens if none of the OpenOCD members care enough to do the
work? Will I be stuck with a fairly affordable and open source ...
paperweight?

sincerely
MM

What I have heard beaglebone could work with OpenOCD's interface/
xds100v2.cf.
OpenOCD seems to have target/ti_dm355.cfg so it seems some work is
already
done, to get OpenOCD work with beaglebone. I am going to try when I
get
my hands on beaglebone (Waiting order from Tigal).
Maybe some one could confirm, if one is able to debug beaglebone's SoC
using OpenOCD?

Petri

I think you are talking about “am33x” or “am335x” as this is the CPU on the BeagleBone. So I doubt that “ti_dm355.cfg” will work unmodified.

But xds100v2.cfg does work - after uncommenting "#ft2232_device_desc “Texas Instruments Inc.XDS100 Ver 2.0"” - the desc is different on the BeagleBone.I hacked away starting with “amdm37x.cfg”. However, I get the following problem: “Warn : Invalid ACK 0x6 in JTAG-DP transaction
Polling target failed, GDB will be halted. Polling again in 100ms
Polling target failed, GDB will be halted. Polling again in 300ms”

I will try using the X-Loader tomorrow that was provided with the BeagleBone, to see if it helps, but I’m not sure if the pinout are setup for JTAG in it.

Do you know where the TI JTAG / DAP in the am33x are documented?

/David

Did you find TAP ID's somewhere?
I found following TAP ID for AM335x 0x4b6b902f from
sitara_device_support_1.0.3 package.
Could you please share your configuration you have done so far, so I
can try with
my 'bone when it arrives.

Petri

Using auto detection I get another ID - but since I'm completely new to OpenOCD I cannot really interpret what this means..... :confused:

If you know OpenOCD already, this might be easy to solve..?
Did you receive your BeagleBone yet?

/David

Using auto-detection I get:

Any more news on this? Would you care to share your current config
file so we can at least have something to play with?

Also, TI Code Composer Studio and IAR Embedded Workbench already
support this device, so maybe we could figure things out by peeking
into their configuration files??

IAR files:
http://pastebin.com/i9NS2jVU
http://pastebin.com/YGrvLmPq

CSSv5:
http://pastebin.com/HqBpnEuy

Hope this helps someone to get openocd running on the bone soon

M.

I have submitted ti_beaglebone.cfg into the openocd project. Grab the latest git revision and give it a whirl.

Neil, thank you for looking into this.

I tried the Feb 27 scripts on my board and (after uncommenting
ft2232_device_desc to get it to run) this is what I got:

Open On-Chip Debugger 0.5.0 (2011-12-05-12:54)
Licensed under GNU GPL v2
For bug reports, read
         http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
16000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : device: 6 "2232H"
Info : deviceID: 67348176
Info : SerialNumber: A
Info : Description: BeagleBone A
Info : max TCK change to: 30000 kHz
Info : clock speed 15000 kHz
Info : JTAG tap: am335x.jrc tap/device found: 0x0b94402f (mfg: 0x017,
part: 0xb944, ver: 0x0)
Info : JTAG tap: am335x.dap enabled
Info : am335x.cpu: hardware has 6 breakpoints, 2 watchpoints
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001140
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x80001150
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x800011c0
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x80000042, MEM_AP_TAR 0x800011c0

I have no idea what happens here.

Not exactly your setup but…

sticky errors

Hey guys, I got my BBone up and working with OpenOCD. Haven’t stress tested it a lot, but it appears to halt, step, etc. I documented my steps at the following. Hope it helps.
http://www.mattlmassey.com/2012/04/26/using-openocd-with-the-beaglebone/

Awesome! Thanks!

One note, you ran into an issue where the FTDI chip reports itself with
different vendor:product values on the A5 versus what openocd has in
its scripts. I can confirm that an A3 Bone does show up with the
USB vendor:product values of 0403:a6d0, my A3 Bone shows (the ':' at
the end of the line is important for lsusb):

$ sudo lsusb -d 0403:
Bus 003 Device 012: ID 0403:a6d0 Future Technology Devices International, Ltd

-Andrew

Excellent work. You should add your work to elinux.org? I've been
working to build out the OpenOCD pages. See:

http://elinux.org/OpenOCD
http://elinux.org/Category:OpenOCD

Hi Matt,

Another page you may find useful given the JTAG Sticky Errors you're seeing:

http://elinux.org/OpenOCD_Troubleshooting:_JTAG_Sticky_Error

When I add -c init -c 'reset init' to my OpenOCD startup command I see:

Open On-Chip Debugger 0.6.0-dev-00535-g8c38682 (2012-04-24-10:54)
Licensed under GNU GPL v2
For bug reports, read
  http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
16000 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : max TCK change to: 30000 kHz
Info : clock speed 15000 kHz
Info : JTAG tap: am335x.jrc tap/device found: 0x0b94402f (mfg: 0x017,
part: 0xb944, ver: 0x0)
Info : JTAG tap: am335x.dap enabled
Info : am335x.cpu: hardware has 6 breakpoints, 2 watchpoints
Info : JTAG tap: am335x.jrc tap/device found: 0x0b94402f (mfg: 0x017,
part: 0xb944, ver: 0x0)
Info : JTAG tap: am335x.dap enabled
Locking debug access failed on first, but succeeded on second try.
Warn : am335x.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: 0x20000193 pc: 0x0002086c
MMU: disabled, D-Cache: disabled, I-Cache: disabled

wmat,
Thanks for the feedback. Do you suggest that I add my content directly to eLinux, or just reference my page?

Also, with the reset init solution on the JTAG Sticky Error, does it prevent having to unplug the BBone between sessions of OpenOCD?

wmat,
Thanks for the feedback. Do you suggest that I add my content directly to
eLinux, or just reference my page?

I'd suggest both. There are current examples of board specific pages
already, such as:

http://elinux.org/Running_OpenOCD_on_Linux_with_the_Beagleboard

Also, with the reset init solution on the JTAG Sticky Error, does it prevent
having to unplug the BBone between sessions of OpenOCD?

I'm not sure, as I haven't tried it yet.. Feel free to try it out and
let me know though.

New page was added to http://elinux.org/Running_OpenOCD_on_Linux_with_the_Beaglebone. This should cover the same topics on my website. Feel free to edit