OpenOCD support the beagleboard?

837 views
Skip to first unread message

Marek Omama

unread,
Jan 18, 2012, 5:46:33 PM1/18/12
to Beagle Board


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

Petri Laakso

unread,
Jan 19, 2012, 3:29:09 AM1/19/12
to Beagle Board
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

da...@marqvar.dk

unread,
Jan 19, 2012, 1:43:48 PM1/19/12
to beagl...@googlegroups.com
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

Petri Laakso

unread,
Jan 25, 2012, 1:21:46 PM1/25/12
to Beagle Board


On Jan 19, 8:43 pm, da...@marqvar.dk wrote:
> I hacked away starting with "amdm37x.cfg"

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

da...@marqvar.dk

unread,
Jan 30, 2012, 11:52:13 AM1/30/12
to beagl...@googlegroups.com
Using auto detection I get another ID - but since I'm completely new to OpenOCD I cannot really interpret what this means..... :/

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

/David

Using auto-detection I get:
---------------------------
sudo openocd -f beaglebone.cfg
Open On-Chip Debugger 0.5.0 (2011-08-26-10:36)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
trst_only separate trst_push_pull
10 kHz
am33x_dbginit
Info : max TCK change to: 30000 kHz
Info : clock speed 10 kHz
Warn : There are no enabled taps. AUTO PROBING MIGHT NOT WORK!!
Warn : AUTO auto0.tap - use "jtag newtap auto0 tap -expected-id 0x0b94402f ..."
Warn : AUTO auto0.tap - use "... -irlen 6"
Warn : gdb services need one or more targets defined


Using my _hacked_ config file I get:
------------------------------------
sudo openocd -f beaglebone.cfg
Open On-Chip Debugger 0.5.0 (2011-08-26-10:36)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.berlios.de/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
trst_only separate trst_push_pull
10 kHz
am33x_dbginit
Info : max TCK change to: 30000 kHz
Info : clock speed 10 kHz
Info : JTAG tap: am33x.jrc tap/device found: 0x0b94402f (mfg: 0x017, part: 0xb944, ver: 0x0)
Info : JTAG tap: am33x.dap enabled


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

Polling target failed, GDB will be halted. Polling again in 700ms
Polling target failed, GDB will be halted. Polling again in 1500ms
Polling target failed, GDB will be halted. Polling again in 3100ms
Polling target failed, GDB will be halted. Polling again in 6300ms
Polling target failed, GDB will be halted. Polling again in 6300ms

Marek Omama

unread,
Feb 16, 2012, 3:30:58 AM2/16/12
to Beagle Board

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.

On 30 Jan, 17:52, da...@marqvar.dk wrote:
> Using auto detection I get another ID - but since I'm completely new toOpenOCDI cannot really interpret what this means..... :/
>
> If you knowOpenOCDalready, this might be easy to solve..?

neil...@gmail.com

unread,
Mar 2, 2012, 12:50:47 AM3/2/12
to beagl...@googlegroups.com
I have submitted ti_beaglebone.cfg into the openocd project.  Grab the latest git revision and give it a whirl.

Marek Omama

unread,
Mar 20, 2012, 5:49:40 PM3/20/12
to Beagle Board

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.

TonyD

unread,
Mar 20, 2012, 6:58:33 PM3/20/12
to beagl...@googlegroups.com
Not exactly your setup but...

Smatt

unread,
May 7, 2012, 12:28:43 AM5/7/12
to beagl...@googlegroups.com
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.

Andrew Bradford

unread,
May 7, 2012, 8:03:49 AM5/7/12
to beagl...@googlegroups.com, Smatt
On Sun, 6 May 2012 21:28:43 -0700 (PDT)
Smatt <mattl...@gmail.com> wrote:

> 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

Bill Traynor

unread,
May 7, 2012, 9:02:50 AM5/7/12
to beagl...@googlegroups.com
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
> -- To join: http://beagleboard.org/discuss
> To unsubscribe from this group, send email to:
> beagleboard...@googlegroups.com
> Frequently asked questions: http://beagleboard.org/faq

Bill Traynor

unread,
May 7, 2012, 9:41:38 AM5/7/12
to beagl...@googlegroups.com
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

Smatt

unread,
May 7, 2012, 1:35:26 PM5/7/12
to beagl...@googlegroups.com
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?

Bill Traynor

unread,
May 7, 2012, 1:51:28 PM5/7/12
to beagl...@googlegroups.com
On Mon, May 7, 2012 at 1:35 PM, Smatt <mattl...@gmail.com> wrote:
> 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.

Smatt

unread,
May 9, 2012, 12:24:03 AM5/9/12
to beagl...@googlegroups.com
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


On Wednesday, January 18, 2012 2:46:33 PM UTC-8, Marek Omama wrote:
Reply all
Reply to author
Forward
0 new messages