ARM-USB-OCD

i’m getting a consistent problem while establishing the connection link with the Olimex’s ARM-USB-OCD Device. if anyone faced the same problem and solved , please reply soon!! i’m badly stucked!!

i’m getting an error while clicking on to openocd utility as

Info:openocd.c:82 main():Open On-Chip Debugger(2006-10-12 18:00 CEST)

Error: ft2232.c:225 ft2232_read(): couldn’t read the requested no. of bytes from FT2232 device(0<2)

Error: ft2232.c:365 ft2232_send_and_recv(): couldn’t from FT2232

Hi,

try using a self-powered USB hub. You should also make sure that the drivers have been correctly installed, and that you’re using the latest version of OpenOCD available.

Regards,

Dominic

hi, Dominic , thanks for ur reply…

i tried it again using self powered USB hub, but i’m still getting the same error!! can there be any other possibility of error may be ralated to configuration file or anything else??

hi, again

further i’d cautiously verified the driver’s installation and i’m sure about using the very latest version of OpenOCD

regards,

mayur

Hello mayur,

do you have some more information?

Which OS do you used?

How does your config file look?

If you start openocd with -h parameter, what is displayed?

Regards,

Michael

Hello Michael,

i’m using Windows XP OS. and i’m working on latest version on Olimex Package which uses Eclipse IDE as a compilation platform. the confg. file is lpc2xxx_armusbocd.cfg. and i’m also using a self powered usb hub as suggested by Dominic earlier.

please reply soon for any more details u want ! thanks,

regards,

Mayur

Hello Mayur,

which version of OpenOCD you use?

Info:openocd.c:82 main():Open On-Chip Debugger(2006-10-12 18:00 CEST)

This could be the r115, is this correct?

and i’m working on latest version on Olimex Package

What is the latest Olimex Package?

What is your target?

Regards,

Michael

Hi Michael,

offcourse i’m using r115 version of openocd.

i had installed the pre-assembled package (OLIMEX-GCCFD-190207.exe) came up in the CD provided with Olimex ARM-USB-OCD JTAG connector.

my Target is arm7tdmi

and my .cfg file is as follows


#daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface ft2232

ft2232_device_desc “Olimex OpenOCD JTAG A”

ft2232_layout “olimex-jtag”

ft2232_vid_pid 0x15BA 0x0003

jtag_speed 2

#use combined on interfaces or targets that can’t set TRST/SRST separately

reset_config trst_and_srst 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

#target arm7tdmi

target arm7tdmi little run_and_halt 0 arm7tdmi-s_r4

run_and_halt_time 0 30

working_area 0 0x40000000 0x40000 nobackup

#flash configuration

flash bank lpc2000 0x0 0x40000 0 0 lpc2000_v1 0 14765 calc_checksum

flash bank cfi 0x80000000 0x400000 2 2 0

For more information about the configuration files, take a look at:

http://openfacts.berlios.de/index-en.ph … p+Debugger


please let me know if else details u want…

Thanks, 'n

Regards,

Mayur

Hello mayur,

more input, please.

It is very dufficult to help, to request each information.

Which CPU, from your cfg file it could be a LPC???. which one.

Is it a self made board, or have you bougth it, which board?

Have you set the DEBUG jumper at the LPC device?

mifi

hi mifi,

well… i’m working it on the lpc 2138 ARM learning kit. though it’s an in-house built board, it’s the standard product of our company . so there might not be any problem from board side . i had checked the jumper and other settings too. i suppose … the problem would be only in communication link between USB port and arm- usb-ocd device. because even if i take out the JTAG connector from the board , the openocd displays the same error msg. what may be the cause??

any more input u want?? pleae let me know…

thanks for reply…

Regards,

Mayur

Hi mayur,

have you only the ARM-USB-OCD from Olimex, or

can you test it with an other one?

Perhaps with a parport jtag hardware?

Is this your first try with your in-house build board?

Does it work with other JTAG devices?

Have you try to lower the jtag speed?

jtag_speed 10

Regards,

mifi

hi again,

yeah… it’s the only device i’m having at the moment but i’ can arrange other too. and yes it’s the very first try on our board. i had also tried it at even lower speed. further i tried to make every possible and vallid correction in .cfg file but still getting the same thing.

regards,

mayur

Another idea,

can you try to use OpenOCD r131?

If I start OpenCOD without any target, I got the following info:

Info: openocd.c:84 main(): Open On-Chip Debugger (2007-01-31 12:00 CET)

Error: jtag.c:1224 jtag_examine_chain(): number of discovered devices in JTAG

chain (330) doesn’t match configuration (1)

Have you connect the power to the JTAG connector?

This must be an very easy bug :evil:

mifi

well, using r131 might be a nice option to to find out cause … but i’m having the set up files of r115 only which are provided with the arm-usb-ocd pack (CD). but if u could give me the source from where i can get it… i can go for it.

there is no distinct power connected to the JTAG connector as it already embedded in the board itself

regards,

mayur

This is definitely not a config file issue, and I don’t think it’s a software problem either - the FT2232 /must/ answer to this request - if it doesn’t, the chip stopped working.

Laurent Gauch from Amontec once talked about ground loops with regard to a similar problem - could you verify that this doesn’t affect you?

Regards,

Dominic

yeah… surely i can verify it! but unfortunately i’m not at my workplace right now. i’ll see u soon after verification…

thanks for showing me the way further…

regards,

mayur

mayur,

can you tell me more about the arm-usb-ocd pack (CD)?

Which compiler is used:

  • GNUARM

  • WinARM

  • ???

:?:

Regards,

Michael

Hi Mayur,

Please refrain from posting the same thread in multiple locations. It clutters up the forum and makes it more difficult to follow for everybody that is trying to help or learn from your problem by spreading the information over a larger area.

Thanks,

-Bill

hello, mifi

i’m using the GNUARM compiler and Eclipse IDE on win-XP OS.

there is no problem regarding the ground loop. ( as suggested to be ensured by Dominic)

like what u said, i reinstalled the openocd-r131 drivers. and this time when i tried again , i got the msg. as

Info: openocd.c:84 main(): Open On-Chip Debugger (2007-01-31 12:00 CET)

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

.

and when i replaced the line in my .cfg file…

<< ft2232_device_desc "Olimex OpenOCD JTAG A" >>	by 
<< ft2232_device_desc "Olimex OpenOCD JTAG B" >>

again i got openocd running for few seconds and displayed…

Info: openocd.c:84 main(): Open On-Chip Debugger (2007-01-31 12:00 CET)

Error: ft2232.c:229 ft2232_read(): couldn’t read the requested number of bytes from FT2232 device (0 < 81)

Error: ft2232.c:369 ft2232_send_and_recv(): couldn’t read from FT2232

and when i replaced the same line of device_desc again by

<< ft2232_device_desc "Olimex OpenOCD JTAG " >>

i got the msg. as

Info: openocd.c:84 main(): Open On-Chip Debugger (2007-01-31 12:00 CET)

Error: ft2232.c:1310 ft2232_init(): unable to open ftdi device: 2

Error: ft2232.c:1325 ft2232_init(): ListDevices: 2

Error: ft2232.c:1327 ft2232_init(): 0: Olimex OpenOCD JTAG A

Error: ft2232.c:1327 ft2232_init(): 1: Olimex OpenOCD JTAG B

Question1: what may be the root cause of the matter??

Question2: what is “JTAG A” and “JTAG B” ??

Things are getting in same way even when I disconnect the target board from the device.

(i got the same error line for parport wiggler also)

please let me know if any more detailed input u want!

i’m desperately trying to make it work !!

Thanks,'n

Regards,

Mayur

It would have helped if you told us about that earlier. You have to use the “A” variant - that’s FTD2XX’ (the FTDI driver) way of selecting the first channel (the one used for JTAG). “B” is the second channel, connected to the serial port.

The root cause of your problem is:

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

You should do just that, i.e. verify connection etc.

Regards,

Dominic