ARM-USB-OCD and AT91SAM9260

I’m trying – unsuccessfully – to get OpenOCD to work with the Atmel AT91SAM9260-EK evaluation board. I’ve hacked together a configuration file, but I suspect that it is wrong; I get a bunch of error messages from OpenOCD, and then it (sometimes, but not always) quits.

I’m using the Windows version of OpenOCD, snapshot r141 + giveio.

The configuration file is:

telnet_port 4444

gdb_port 3333

interface ft2232

ft2232_device_desc “Olimex OpenOCD JTAG A”

ft2232_layout “olimex-jtag”

ft2232_vid_pid 0x15BA 0x0003

jtag_speed 0

jtag_nsrst_delay 200

jtag_ntrst_delay 200

reset_config trst_and_srst

jtag_device 4 0x1 0xf 0xe

daemon_startup reset

target arm926ejs little run_and_halt 0 arm926ejs

run_and_halt_time 0 30

When I run OpenOCD, I get the following output:

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x00 check_value: 0x01 check_mask: 0x0f

Warning: arm7_9_common.c:877 arm7_9_halt(): target was already halted

Info: server.c:67 add_connection(): accepted ‘gdb’ connection from 0

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Error: arm926ejs.c:307 arm926ejs_examine_debug_reason(): BUG: unknown debug reason: 0xf

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: arm7_9_common.c:877 arm7_9_halt(): target was already halted

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x00 check_value: 0x01 check_mask: 0x0f

Error: arm926ejs.c:307 arm926ejs_examine_debug_reason(): BUG: unknown debug reason: 0xf

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Warning: jtag.c:1068 jtag_read_buffer(): value captured during scan didn’t pass the requested check: captured: 0x0f check_value: 0x01 check_mask: 0x0f

Info: server.c:367 server_loop(): dropped ‘gdb’ connection

To do this, I ran GDB:

GNU gdb 6.5.0.20060626-cvs

Copyright (C) 2006 Free Software Foundation, Inc.

GDB is free software, covered by the GNU General Public License, and you are

welcome to change it and/or distribute copies of it under certain conditions.

Type “show copying” to see the conditions.

There is absolutely no warranty for GDB. Type “show warranty” for details.

This GDB was configured as “–host=i686-pc-cygwin --target=arm-elf”…

(gdb) target remote localhost:3333

Remote debugging using localhost:3333

0x00101040 in ?? ()

(gdb) hb *0x0

Hardware assisted breakpoint 1 at 0x0

(gdb) moni reset

(gdb) c

Continuing.

Program received signal SIGINT, Interrupt.0xffffffec in ?? ()

(gdb) info reg

r0 0xffffffff -1

r1 0xffffffff -1

r2 0xffffffff -1

r3 0xffffffff -1

r4 0xffffffff -1

r5 0xffffffff -1

r6 0xffffffff -1

r7 0xffffffff -1

r8 0xffffffff -1

r9 0xffffffff -1

r10 0xffffffff -1

r11 0xffffffff -1

r12 0xffffffff -1

sp 0xffffffff -1

lr 0xffffffff -1

pc 0xffffffed -19

fps 0x0 0

cpsr 0xffffffff -1

At this point, if I re-run OpenOCD, it fails with:

Error: jtag.c:1182 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc.

I need to power-cycle the board at this point to get it to re-connect.

Any help would be appreciated.

Try setting your jtag_speed higher. I know openocd works with the chip in question [got it on a board here working fine], but I’ve never tried it with the official EK board.

Cheers,

–David Carne

Is there any chance you could post your configuration file? If I can get it to work, we can add it to the big list of configuration scripts.

Thanks.

– Luke