Comstick not replying

I am trying to connect Openocd to a Hitex Comstick. The command and response is:

openocd-ftd2xx -f comstick.cfg

Open On-Chip Debugger (2008-06-19 19:00) svn: 717

URL: http://svn.berlios.de/svnroot/repos/openocd/trunk

Info: options.c:50 configuration_output_handler(): jtag_speed: 10, 10

Info: options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717

There is no response after this in the Command Prompt. If run under Eclipse, Openocd terminates after 20 seconds and the console replies with:

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

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

The Hitex drivers are showing correctly in the Device Manager. What is missing in the following constick.cfg?

#daemon configuration

telnet_port 4444

gdb_port 3333

#interface

interface ft2232

ft2232_layout comstick

ft2232_vid_pid 0x0640 0x002c

ft2232_device_desc “STR9-comStick A”

ft2232_device_desc “STR9-comStick B”

jtag_speed 10

#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 0x01 0xfe

jtag_device 4 0x1 0xf 0xe

jtag_device 5 0x1 0x1 0x1e

#target configuration

daemon_startup reset

#target

target arm966e little reset_halt 1 arm966e

run_and_halt_time 0 30

working_area 0 0x50000000 0x8000 nobackup

#flash configuration

#flash bank <chip_width> <bus_width> [driver_options …]

flash bank str9x 0x00000000 0x00080000 0 0 0

flash bank str9x 0x00080000 0x00008000 0 0 0

Lloyd

you do not need the line:

ft2232_device_desc “STR9-comStick B”

The A channel is the only one used, also enable a log and post results here.

Cheers

Spen

After wiping the license from the Comstick Ft2232 EEPROM, I gave up on that. I hooked up my custom ap board to the Olimex ARM-USB-OCD. I got a connection to it via the command line, and tried to program it. The program was successful, but then the Str912 locked up and would not halt or reset, even with the Reset_in pin pulled low. The elf loaded was not proven. Notice in the cfg, the code by which I tried to unlock it without success. The openocd v717 was not recognizing the required commands. Next I proceeded to download openocd from the SVN into Eclipse to debug that. But I found no info on how to run the ./bootstrap or ./configure within Eclipse.

#daemon configuration

log_output ol.log

debug_level 3

telnet_port 4444m

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

#jtag scan chain

#format L IRC IRCM IDCODE (Length, IR Capture, IR Capture Mask, IDCODE)

jtag_device 8 0x1 0x01 0xfe

jtag_device 4 0x1 0xf 0xe

jtag_device 5 0x1 0x1 0x1e

#target configuration

daemon_startup reset

#target

#target arm7tdmi

target arm966e little reset_init 1 arm966e

#target arm966e little run_and_halt 1 arm966e

run_and_halt_time 0 30

sleep 100

config script

#flash bank str9xpec 0x00000000 0x00080000 0 0 0

then try unlock

#str9xpec enable_turbo 0

#str9xpec unlock 0

#flash configuration

#flash bank <chip_width> <bus_width> [driver_options …]

flash bank str9x 0x00000000 0x00080000 0 0 0

flash bank str9x 0x00080000 0x00008000 0 0 0

bank 0=512k @0x0, 1=32k @0x80000

str9x flash_config 0 4 2 0 0x80000

working_area 0 0x50000000 0x4000 nobackup

Debug: 7 0 command.c:432 command_run_line(): telnet_port 4444m

Debug: 9 0 command.c:432 command_run_line(): gdb_port 3333

Debug: 11 0 command.c:432 command_run_line(): interface ft2232

Debug: 13 0 command.c:432 command_run_line(): ft2232_device_desc “Olimex OpenOCD JTAG A”

Debug: 15 0 command.c:432 command_run_line(): ft2232_layout “olimex-jtag”

Debug: 17 0 command.c:432 command_run_line(): ft2232_vid_pid 0x15BA 0x0003

Debug: 19 0 command.c:432 command_run_line(): jtag_speed 2

Debug: 20 0 jtag.c:1863 handle_jtag_speed_command(): handle jtag speed

Info: 21 0 options.c:50 configuration_output_handler(): jtag_speed: 2, 2

Debug: 23 0 command.c:432 command_run_line(): reset_config trst_and_srst

Debug: 25 0 command.c:432 command_run_line(): jtag_device 8 0x1 0x01 0xfe

Debug: 27 0 command.c:432 command_run_line(): jtag_device 4 0x1 0xf 0xe

Debug: 29 0 command.c:432 command_run_line(): jtag_device 5 0x1 0x1 0x1e

Debug: 31 0 command.c:432 command_run_line(): daemon_startup reset

Info: 32 0 options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717

Debug: 34 0 command.c:432 command_run_line(): target arm966e little reset_init 1 arm966e

Debug: 35 0 arm966e.c:142 arm966e_target_command(): chain_pos: 1, variant: arm966e

Debug: 37 0 command.c:432 command_run_line(): run_and_halt_time 0 30

Debug: 39 0 command.c:432 command_run_line(): sleep 100

Debug: 41 109 command.c:432 command_run_line(): flash bank str9x 0x00000000 0x00080000 0 0 0

Debug: 43 109 command.c:432 command_run_line(): flash bank str9x 0x00080000 0x00008000 0 0 0

Debug: 45 109 command.c:432 command_run_line(): str9x flash_config 0 4 2 0 0x80000

Debug: 46 109 command.c:387 find_and_run_command(): Command failed with error code -304

Debug: 48 109 command.c:432 command_run_line(): working_area 0 0x50000000 0x4000 nobackup

Debug: 50 109 command.c:432 command_run_line(): init

Debug: 51 109 openocd.c:102 handle_init_command(): target init complete

Debug: 52 109 ft2232.c:1374 ft2232_init_ftd2xx(): ‘ft2232’ interface using FTD2XX with ‘olimex-jtag’ layout (15ba:0003)

Debug: 53 125 ft2232.c:1463 ft2232_init_ftd2xx(): current latency timer: 2

Debug: 54 125 ft2232.c:1810 olimex_jtag_init(): 80 08 1b

Debug: 55 125 ft2232.c:1853 olimex_jtag_init(): 82 09 0f

Debug: 56 125 ft2232.c:253 ft2232_speed(): 86 02 00

Debug: 57 156 openocd.c:109 handle_init_command(): jtag interface init complete

Debug: 58 156 jtag.c:1537 jtag_init_inner(): Init JTAG chain

Debug: 59 156 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)

Debug: 60 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 61 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 62 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 63 156 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)

Debug: 64 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 65 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 66 156 jtag.c:1295 jtag_reset_callback(): -

Info: 67 156 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)

Info: 68 156 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)

Info: 69 156 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)

Debug: 70 156 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)

Debug: 71 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 72 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 73 156 jtag.c:1295 jtag_reset_callback(): -

Debug: 74 156 openocd.c:116 handle_init_command(): jtag init complete

Debug: 75 156 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000

Debug: 76 156 openocd.c:119 handle_init_command(): jtag examine complete

Debug: 77 156 openocd.c:126 handle_init_command(): flash init complete

Debug: 78 156 openocd.c:130 handle_init_command(): NAND init complete

Debug: 79 156 openocd.c:134 handle_init_command(): pld init complete

Debug: 80 219 gdb_server.c:2036 gdb_init(): gdb service for target arm966e at port 3333

Debug: 82 219 command.c:432 command_run_line(): reset

Debug: 83 219 target.c:1851 handle_reset_command(): -

Debug: 84 219 ft2232.c:253 ft2232_speed(): 86 02 00

Debug: 85 219 jtag.c:1581 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / TLR

Debug: 86 219 jtag.c:996 jtag_add_reset(): SRST line released

Debug: 87 219 jtag.c:1015 jtag_add_reset(): TRST line asserted

Debug: 88 219 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)

Debug: 89 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 90 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 91 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 92 219 jtag.c:992 jtag_add_reset(): SRST line asserted

Debug: 93 219 jtag.c:1015 jtag_add_reset(): TRST line asserted

Debug: 94 219 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)

Debug: 95 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 96 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 97 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 98 219 jtag.c:992 jtag_add_reset(): SRST line asserted

Debug: 99 219 jtag.c:996 jtag_add_reset(): SRST line released

Debug: 100 219 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 0, high_output: 0x08, high_direction: 0x0f

Debug: 101 219 ft2232.c:1037 olimex_jtag_reset(): trst: 1, srst: 1, high_output: 0x0a, high_direction: 0x0f

Debug: 102 219 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x0b, high_direction: 0x0f

Debug: 103 219 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x09, high_direction: 0x0f

Debug: 104 219 jtag.c:1537 jtag_init_inner(): Init JTAG chain

Debug: 105 219 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)

Debug: 106 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 107 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 108 219 jtag.c:1295 jtag_reset_callback(): -

Info: 109 219 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x04570041 (Manufacturer: 0x020, Part: 0x4570, Version: 0x0)

Info: 110 219 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x25966041 (Manufacturer: 0x020, Part: 0x5966, Version: 0x2)

Info: 111 219 jtag.c:1389 jtag_examine_chain(): JTAG device found: 0x2457f041 (Manufacturer: 0x020, Part: 0x457f, Version: 0x2)

Debug: 112 219 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST)

Debug: 113 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 114 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 115 219 jtag.c:1295 jtag_reset_callback(): -

Debug: 116 219 embeddedice.c:397 embeddedice_write_reg(): 0: 0x00000000

Debug: 117 219 arm7_9_common.c:767 arm7_9_assert_reset(): target->state: unknown

Debug: 118 219 embeddedice.c:397 embeddedice_write_reg(): 2: 0x00000001

Debug: 119 219 jtag.c:992 jtag_add_reset(): SRST line asserted

Debug: 120 219 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 1, high_output: 0x03, high_direction: 0x0f

Debug: 121 297 arm7_9_common.c:960 arm7_9_halt(): target->state: reset

Debug: 122 297 arm7_9_common.c:820 arm7_9_deassert_reset(): target->state: reset

Debug: 123 297 jtag.c:996 jtag_add_reset(): SRST line released

Debug: 124 297 ft2232.c:1037 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f

Debug: 125 297 target.c:411 target_process_reset(): Waiting for halted stated as approperiate

Debug: 126 297 target.c:425 target_process_reset(): Polling target

Debug: 128 797 target.c:425 target_process_reset(): Polling target

Debug: 130 1297 target.c:425 target_process_reset(): Polling target

Debug: 132 1797 target.c:425 target_process_reset(): Polling target

Debug: 134 2297 target.c:425 target_process_reset(): Polling target

Debug: 136 2797 target.c:425 target_process_reset(): Polling target

Debug: 138 3297 target.c:425 target_process_reset(): Polling target

Debug: 140 3797 target.c:425 target_process_reset(): Polling target

Debug: 142 4297 target.c:425 target_process_reset(): Polling target

Debug: 144 4797 target.c:425 target_process_reset(): Polling target

Debug: 146 5297 target.c:425 target_process_reset(): Polling target

User: 147 5297 target.c:436 target_process_reset(): Timed out waiting for halt after reset

Debug: 148 5297 ft2232.c:253 ft2232_speed(): 86 02 00

And from the command prompt:

c:\OpenOCD>sh ./bootstrap

./bootstrap /c/GnuWin32/bin/aclocal: No such file or directory

even though the path includes the location of aclocal and m4.exe

…;c:\GnuWin32\bin;…