STR9 flasherase problem : couldn't read from FT2232

Hi I want to erase the flash of an STR9. I’m using Amontec JtagKey and Openocd rev278 but I got this problem:

Info:    openocd.c:93 main(): Open On-Chip Debugger 1.0 (2009-03-06-16:03) svn:278
Info:    openocd.c:94 main(): $URL: http://svn.berlios.de/svnroot/repos/openocd/trunk/src/openocd.c $
Error:   ft2232.c:241 ft2232_read(): couldn't read the requested number of bytes from FT2232 device (0 < 81)
Error:   ft2232.c:385 ft2232_send_and_recv(): couldn't read from FT2232

This is my cfg file

#daemon configuration
telnet_port 4444
gdb_port 3333

#interface
interface ft2232
ft2232_device_desc "Amontec JTAGkey A"
ft2232_layout jtagkey
ft2232_vid_pid 0x0403 0xcff8
jtag_speed 6

jtag_nsrst_delay 200
jtag_ntrst_delay 200

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

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

#target configuration
daemon_startup reset

#target <type> <startup mode>
#target arm966e <endianness> <reset mode> <chainpos> <variant>
target arm966e little reset_init 1 arm966e
run_and_halt_time 0 30

working_area 0 0x50000000 16384 nobackup

#flash bank <driver> <base> <size> <chip_width> <bus_width>
flash bank str9x 0x00000000 0x00080000 0 0 0

#Script used for FLASH erasing
target_script 0 reset /home/ale/str9_cfg_openocd/str91x_flasherase.ocd

And this is the ocd file

wait_halt
str9x flash_config 4 2 0 0x80000
flash protect 0 0 10 off
flash erase 0 0 10
reset
shutdown

Anyone can help me?

Thanks!

That’s a very old version, can you try a newer version?

Cheers

Spen

I tried the new version, but there are a lot of change and the config file that I have doesn’t work. Can you advice me a version of openocd that works with my config file?

It’s very important for me.

Thanks.

Just update your config file - you get working configs with openocd that you can use as a template.

Cheers

Spen