arm-usb-ocd, sam7-ex256 problems getting started [solved]

Hi all,

i have the following setup:

linux, debian, testing

arm-usb-ocd

sam7-ex256

openocd fresh compiled Revision: 101

i tried to figure out which .cfg to use and ended up with:

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
#ft2232_device_desc "USB <-> JTAG Adapter"
#ft2232_layout jtagkey
#ft2232_vid_pid 0x0403 0xcff8
ft2232_device_desc "Olimex OpenOCD JTAG A"
ft2232_layout "olimex-jtag"
ft2232_vid_pid 0x15BA 0x0003 

jtag_nsrst_delay 200
jtag_ntrst_delay 200

jtag_speed 0

##use combined on interfaces or targets that can't set TRST/SRST separately
#reset_config trst_and_srst srst_pulls_trst

#use combined on interfaces or targets that can't set TRST/SRST separately
reset_config srst_only srst_pulls_trst 


#jtag scan chain
#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)
jtag_device 4 0x1 0xf 0xe

#target configuration
daemon_startup reset

#target <type> <startup mode>
#target arm7tdmi <reset mode> <chainpos> <endianness> <variant>
target arm7tdmi little run_and_init 0 arm7tdmi_r4
#target_script 0 reset oocd_flash_sam7.script

run_and_halt_time 0 30
working_area 0 0x00200000 0x4000 nobackup
flash bank at91sam7 0 0 0 0 0

i read the docu on berlios, and in the svn dir, but did not find e.g. a description mentioning the olimex-jtag layout. these setting come from forum posts. (is there somewhere a newer docmentation covering these aspect?) therefore i have no clue if the settings are correct.

what about the ft2232_vid_pid 0x15BA 0x0003? is the pid target specific (at91sam7x256) or does it refer to the arm-usb-ocd?

what’s the difference between arm7tdmi_r4 and the arm7tdmi-s_r4? which one to use in my case?

what about the working_area and

flash bank sections?

openocd -d -f alex.cfg gives:

Info: openocd.c:82 main(): Open On-Chip Debugger (2006-09-07 20:00 CEST)

Debug: jtag.c:1211 jtag_init():

Debug: ft2232.c:941 ft2232_init(): ‘ft2232’ interface using FTD2XX with ‘olimex-jtag’ layout

Debug: ft2232.c:1010 ft2232_init(): current latency timer: 2

Debug: ft2232.c:1253 olimex_jtag_init(): 80 08 1b

Debug: ft2232.c:1296 olimex_jtag_init(): 82 09 0f

Debug: ft2232.c:224 ft2232_speed(): 86 00 00

Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1097 jtag_reset_callback():

Debug: jtag.c:247 jtag_call_event_callbacks(): jtag event: 1

Debug: jtag.c:1097 jtag_reset_callback():

Error: jtag.c:1150 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x00

any help / examples etc. would be appreciated

alex

one mor:

what about the jumper tst, jtagsel and erase? how to configure them, what they do exactly?

alex

Hello Alex,

the OpenOCD documentation can be found in the Wiki at Berlios:

http://openfacts.berlios.de/index-en.ph … p_Debugger

(Seems to be down at the moment, but usually works again real soon)

I’ve just added a list of valid ft2232_layout options to the configuration page.

The ft2232_vid_pid is the VID/PID of the FT2232 device you’re using. Setting this value is necessary only on Linux.

Currently, there’s no difference between arm7tdmi_r4 and arm7tdmi-s_r4. The AT91SAM7’s are arm7tdmi_r4.

working_area and the flash bank settings are explained at the configuration page.

The “IR mismatch” error means that there was a problem with the JTAG communication. You could try increasing the jtag_speed value (a divisor, thus lowering the frequency). I’ll try with my SAM7-EX board tomorrow to see what jumper settings I have.

Regards,

Dominic

Hi dominic,

if have been reading the docu at

http://openfacts.berlios.de/index-en.ph … p_Debugger

I’ve just added a list of valid ft2232_layout options to the configuration page.

I'll check the new content when the site is up again, thx.

The ft2232_vid_pid is the VID/PID of the FT2232 device you’re using. Setting this value is necessary only on Linux.

for a arm/jtag newbie like me, the configuration text is somewhat less informative. what i mean is, that if you do not have a clue, you can hardly understand. as example: i understood that i should provide the vid and pid, but where to get it? i checked the source code but could not find what to provide for my setup.

you do a great job and should concentrate on developement… perhaps the users (like me) could contribute some parts to the documentation etc. to make it easier for beginners?

The “IR mismatch” error means that there was a problem with the JTAG communication. You could try increasing the jtag_speed value (a divisor, thus lowering the frequency).

hmm. i used 3, 2 and 0 with the same result...

I’ll try with my SAM7-EX board tomorrow to see what jumper settings I have.

this would be nice, thank you

alex

hi,

I’m bringing up this task again, as it got solved. I document my setup and the solution at

http://www2.pt.tu-clausthal.de/~alexp/arm/index.html

[note: the forum dislikes the tilde. therefore i used a \ in front. be sure to delete it in the browser]

(still growing). Perhaps, some other SAM7-EX owners could contribute to the ‘open questions’ (part of it could go to berlios, as dominic likes).

Alex