Hi everyone, Happy new year. I an new in ARM controllers, starting with comStick from Hitex. I want to use Eclipse for development. My PC is running XP with driver "STR9_comStick_usb.sys" for USB_Serial_JTAG from Hitex. The comStick is tested with hitop, the Flash is programmed and is running a programme, blinking the LED. In the eclipse environment, I just want to start running the flashed programme, so I run the following script with OpenOCD: { #log_output cs.log debug_level 3 #daemon configuration telnet_port 4444 gdb_port 3333 interface ft2232 ft2232_device_desc "STR9-comStick A" ft2232_layout comstick #ft2232_layout usbjtag ft2232_vid_pid 0x0640 0x002C jtag_speed 3 #jtag_speed 1 jtag_nsrst_delay 100 jtag_ntrst_delay 100 #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 run_and_init 1 arm966e run_and_halt_time 0 50 working_area 0 0x50000000 32768 nobackup #flash bank <driver> <base> <size> <chip_width> <bus_width> flash bank str9x 0x00000000 0x00080000 0 0 0 flash bank str9x 0x00080000 0x00008000 0 0 0 #Script used for FLASH programming target_script 0 reset str91x_reset.script } ------------------------------------------------------ I get the following debug log: { Open On-Chip Debugger (2008-06-19 19:00) svn: 717 URL: http://svn.berlios.de/svnroot/repos/openocd/trunk Debug: 6 0 command.c:432 command_run_line(): telnet_port 4444 Debug: 8 0 command.c:432 command_run_line(): gdb_port 3333 Debug: 10 0 command.c:432 command_run_line(): interface ft2232 Debug: 12 0 command.c:432 command_run_line(): ft2232_device_desc "STR9-comStick A" Debug: 14 10 command.c:432 command_run_line(): ft2232_layout comstick Debug: 16 10 command.c:432 command_run_line(): ft2232_vid_pid 0x0640 0x002C Debug: 18 390 command.c:432 command_run_line(): jtag_speed 60 Debug: 19 390 jtag.c:1863 handle_jtag_speed_command(): handle jtag speed Info: 20 390 options.c:50 configuration_output_handler(): jtag_speed: 60, 60 Debug: 22 390 command.c:432 command_run_line(): jtag_nsrst_delay 100 Debug: 24 390 command.c:432 command_run_line(): jtag_ntrst_delay 100 Debug: 26 390 command.c:432 command_run_line(): reset_config trst_and_srst Debug: 28 390 command.c:432 command_run_line(): jtag_device 8 0x1 0x1 0xfe Debug: 30 390 command.c:432 command_run_line(): jtag_device 4 0x1 0xf 0xe Debug: 32 390 command.c:432 command_run_line(): jtag_device 5 0x1 0x1 0x1e Debug: 34 390 command.c:432 command_run_line(): daemon_startup reset Info: 35 390 options.c:50 configuration_output_handler(): Open On-Chip Debugger (2008-06-19 19:00) svn: 717 Debug: 37 390 command.c:432 command_run_line(): target arm966e little run_and_init 1 arm966e Debug: 38 390 arm966e.c:142 arm966e_target_command(): chain_pos: 1, variant: arm966e Debug: 40 390 command.c:432 command_run_line(): run_and_halt_time 0 50 Debug: 42 390 command.c:432 command_run_line(): working_area 0 0x50000000 32768 nobackup Debug: 44 390 command.c:432 command_run_line(): flash bank str9x 0x00000000 0x00080000 0 0 0 Debug: 46 390 command.c:432 command_run_line(): flash bank str9x 0x00080000 0x00008000 0 0 0 Debug: 48 390 command.c:432 command_run_line(): target_script 0 reset str91x_reset.script Debug: 50 390 command.c:432 command_run_line(): init Debug: 51 400 openocd.c:102 handle_init_command(): target init complete Debug: 52 400 ft2232.c:1374 ft2232_init_ftd2xx(): 'ft2232' interface using FTD2XX with 'comstick' layout (0640:002c) Debug: 53 520 ft2232.c:1463 ft2232_init_ftd2xx(): current latency timer: 2 Debug: 54 520 ft2232.c:1962 comstick_init(): 80 08 0b Debug: 55 520 ft2232.c:1982 comstick_init(): 82 03 03 Debug: 56 520 ft2232.c:253 ft2232_speed(): 86 3c 00 Debug: 57 560 openocd.c:109 handle_init_command(): jtag interface init complete Debug: 58 560 jtag.c:1537 jtag_init_inner(): Init JTAG chain Debug: 59 560 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 60 560 jtag.c:1295 jtag_reset_callback(): - Debug: 61 560 jtag.c:1295 jtag_reset_callback(): - Debug: 62 560 jtag.c:1295 jtag_reset_callback(): - Debug: 63 560 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 64 560 jtag.c:1295 jtag_reset_callback(): - Debug: 65 560 jtag.c:1295 jtag_reset_callback(): - Debug: 66 560 jtag.c:1295 jtag_reset_callback(): - Error: 67 580 jtag.c:1351 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc. Error: 68 580 jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway... Debug: 69 580 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 70 580 jtag.c:1295 jtag_reset_callback(): - Debug: 71 580 jtag.c:1295 jtag_reset_callback(): - Debug: 72 580 jtag.c:1295 jtag_reset_callback(): - Error: 73 580 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 74 591 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 75 591 jtag.c:1295 jtag_reset_callback(): - Debug: 76 591 jtag.c:1295 jtag_reset_callback(): - Debug: 77 591 jtag.c:1295 jtag_reset_callback(): - Error: 78 591 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 79 601 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 80 601 jtag.c:1295 jtag_reset_callback(): - Debug: 81 601 jtag.c:1295 jtag_reset_callback(): - Debug: 82 601 jtag.c:1295 jtag_reset_callback(): - Error: 83 601 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 84 611 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 85 611 jtag.c:1295 jtag_reset_callback(): - Debug: 86 611 jtag.c:1295 jtag_reset_callback(): - Debug: 87 611 jtag.c:1295 jtag_reset_callback(): - Error: 88 611 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 89 621 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 90 621 jtag.c:1295 jtag_reset_callback(): - Debug: 91 621 jtag.c:1295 jtag_reset_callback(): - Debug: 92 621 jtag.c:1295 jtag_reset_callback(): - Error: 93 621 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 94 651 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 95 651 jtag.c:1295 jtag_reset_callback(): - Debug: 96 651 jtag.c:1295 jtag_reset_callback(): - Debug: 97 651 jtag.c:1295 jtag_reset_callback(): - Error: 98 661 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Error: 99 661 jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit Debug: 100 661 jtag.c:1581 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / TLR Debug: 101 661 jtag.c:996 jtag_add_reset(): SRST line released Debug: 102 661 jtag.c:1015 jtag_add_reset(): TRST line asserted Debug: 103 661 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 104 661 jtag.c:1295 jtag_reset_callback(): - Debug: 105 661 jtag.c:1295 jtag_reset_callback(): - Debug: 106 661 jtag.c:1295 jtag_reset_callback(): - Debug: 107 661 jtag.c:992 jtag_add_reset(): SRST line asserted Debug: 108 661 jtag.c:1015 jtag_add_reset(): TRST line asserted Debug: 109 661 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 110 661 jtag.c:1295 jtag_reset_callback(): - Debug: 111 661 jtag.c:1295 jtag_reset_callback(): - Debug: 112 661 jtag.c:1295 jtag_reset_callback(): - Debug: 113 661 jtag.c:992 jtag_add_reset(): SRST line asserted Debug: 114 661 jtag.c:996 jtag_add_reset(): SRST line released Debug: 115 661 ft2232.c:1111 comstick_reset(): trst: 1, srst: 0, high_output: 0x02, high_direction: 0x03 Debug: 116 771 ft2232.c:1111 comstick_reset(): trst: 1, srst: 1, high_output: 0x00, high_direction: 0x03 Debug: 117 771 ft2232.c:1111 comstick_reset(): trst: 0, srst: 1, high_output: 0x01, high_direction: 0x03 Debug: 118 931 ft2232.c:1111 comstick_reset(): trst: 0, srst: 0, high_output: 0x03, high_direction: 0x03 Debug: 119 1151 jtag.c:1537 jtag_init_inner(): Init JTAG chain Debug: 120 1151 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 121 1151 jtag.c:1295 jtag_reset_callback(): - Debug: 122 1151 jtag.c:1295 jtag_reset_callback(): - Debug: 123 1151 jtag.c:1295 jtag_reset_callback(): - Debug: 124 1151 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 125 1151 jtag.c:1295 jtag_reset_callback(): - Debug: 126 1151 jtag.c:1295 jtag_reset_callback(): - Debug: 127 1151 jtag.c:1295 jtag_reset_callback(): - Error: 128 1151 jtag.c:1351 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc. Error: 129 1151 jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway... Debug: 130 1151 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 131 1151 jtag.c:1295 jtag_reset_callback(): - Debug: 132 1151 jtag.c:1295 jtag_reset_callback(): - Debug: 133 1151 jtag.c:1295 jtag_reset_callback(): - Error: 134 1161 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 135 1191 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 136 1191 jtag.c:1295 jtag_reset_callback(): - Debug: 137 1191 jtag.c:1295 jtag_reset_callback(): - Debug: 138 1191 jtag.c:1295 jtag_reset_callback(): - Error: 139 1191 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 140 1201 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 141 1201 jtag.c:1295 jtag_reset_callback(): - Debug: 142 1201 jtag.c:1295 jtag_reset_callback(): - Debug: 143 1201 jtag.c:1295 jtag_reset_callback(): - Error: 144 1201 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 145 1211 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 146 1211 jtag.c:1295 jtag_reset_callback(): - Debug: 147 1211 jtag.c:1295 jtag_reset_callback(): - Debug: 148 1211 jtag.c:1295 jtag_reset_callback(): - Error: 149 1211 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 150 1231 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 151 1231 jtag.c:1295 jtag_reset_callback(): - Debug: 152 1231 jtag.c:1295 jtag_reset_callback(): - Debug: 153 1231 jtag.c:1295 jtag_reset_callback(): - Error: 154 1261 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 155 1271 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 156 1271 jtag.c:1295 jtag_reset_callback(): - Debug: 157 1271 jtag.c:1295 jtag_reset_callback(): - Debug: 158 1271 jtag.c:1295 jtag_reset_callback(): - Error: 159 1271 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Error: 160 1271 jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit Debug: 161 1271 openocd.c:126 handle_init_command(): flash init complete Debug: 162 1271 openocd.c:130 handle_init_command(): NAND init complete Debug: 163 1271 openocd.c:134 handle_init_command(): pld init complete Debug: 164 1312 gdb_server.c:2036 gdb_init(): gdb service for target arm966e at port 3333 Debug: 166 1332 command.c:432 command_run_line(): reset Debug: 167 1342 target.c:1851 handle_reset_command(): - Debug: 168 1342 ft2232.c:253 ft2232_speed(): 86 3c 00 Debug: 169 1342 jtag.c:1581 jtag_init_reset(): Trying to bring the JTAG controller to life by asserting TRST / TLR Debug: 170 1342 jtag.c:996 jtag_add_reset(): SRST line released Debug: 171 1342 jtag.c:1015 jtag_add_reset(): TRST line asserted Debug: 172 1342 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 173 1342 jtag.c:1295 jtag_reset_callback(): - Debug: 174 1342 jtag.c:1295 jtag_reset_callback(): - Debug: 175 1342 jtag.c:1295 jtag_reset_callback(): - Debug: 176 1342 jtag.c:992 jtag_add_reset(): SRST line asserted Debug: 177 1342 jtag.c:1015 jtag_add_reset(): TRST line asserted Debug: 178 1342 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 179 1342 jtag.c:1295 jtag_reset_callback(): - Debug: 180 1342 jtag.c:1295 jtag_reset_callback(): - Debug: 181 1342 jtag.c:1295 jtag_reset_callback(): - Debug: 182 1342 jtag.c:992 jtag_add_reset(): SRST line asserted Debug: 183 1342 jtag.c:996 jtag_add_reset(): SRST line released Debug: 184 1342 ft2232.c:1111 comstick_reset(): trst: 1, srst: 0, high_output: 0x02, high_direction: 0x03 Debug: 185 1442 ft2232.c:1111 comstick_reset(): trst: 1, srst: 1, high_output: 0x00, high_direction: 0x03 Debug: 186 1442 ft2232.c:1111 comstick_reset(): trst: 0, srst: 1, high_output: 0x01, high_direction: 0x03 Debug: 187 1552 ft2232.c:1111 comstick_reset(): trst: 0, srst: 0, high_output: 0x03, high_direction: 0x03 Debug: 188 1772 jtag.c:1537 jtag_init_inner(): Init JTAG chain Debug: 189 1772 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 190 1772 jtag.c:1295 jtag_reset_callback(): - Debug: 191 1772 jtag.c:1295 jtag_reset_callback(): - Debug: 192 1772 jtag.c:1295 jtag_reset_callback(): - Debug: 193 1772 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 194 1772 jtag.c:1295 jtag_reset_callback(): - Debug: 195 1772 jtag.c:1295 jtag_reset_callback(): - Debug: 196 1772 jtag.c:1295 jtag_reset_callback(): - Error: 197 1772 jtag.c:1351 jtag_examine_chain(): JTAG communication failure, check connection, JTAG interface, target power etc. Error: 198 1772 jtag.c:1556 jtag_init_inner(): trying to validate configured JTAG chain anyway... Debug: 199 1772 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 200 1772 jtag.c:1295 jtag_reset_callback(): - Debug: 201 1772 jtag.c:1295 jtag_reset_callback(): - Debug: 202 1772 jtag.c:1295 jtag_reset_callback(): - Error: 203 1782 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 204 1792 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 205 1792 jtag.c:1295 jtag_reset_callback(): - Debug: 206 1792 jtag.c:1295 jtag_reset_callback(): - Debug: 207 1792 jtag.c:1295 jtag_reset_callback(): - Error: 208 1792 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 209 1802 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 210 1802 jtag.c:1295 jtag_reset_callback(): - Debug: 211 1802 jtag.c:1295 jtag_reset_callback(): - Debug: 212 1802 jtag.c:1295 jtag_reset_callback(): - Error: 213 1802 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 214 1812 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 215 1812 jtag.c:1295 jtag_reset_callback(): - Debug: 216 1812 jtag.c:1295 jtag_reset_callback(): - Debug: 217 1812 jtag.c:1295 jtag_reset_callback(): - Error: 218 1812 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 219 1852 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 220 1852 jtag.c:1295 jtag_reset_callback(): - Debug: 221 1852 jtag.c:1295 jtag_reset_callback(): - Debug: 222 1852 jtag.c:1295 jtag_reset_callback(): - Error: 223 1852 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Debug: 224 1862 jtag.c:326 jtag_call_event_callbacks(): jtag event: JTAG controller reset (TLR or TRST) Debug: 225 1862 jtag.c:1295 jtag_reset_callback(): - Debug: 226 1862 jtag.c:1295 jtag_reset_callback(): - Debug: 227 1862 jtag.c:1295 jtag_reset_callback(): - Error: 228 1862 jtag.c:1444 jtag_validate_chain(): Error validating JTAG scan chain, IR mismatch, scan returned 0x07ffff Error: 229 1862 jtag.c:1565 jtag_init_inner(): Could not validate JTAG chain, exit } -------------------------------------------------- After that, the comstick starts running, but as you can see, there is no proper connection with the JTAG. Could be of any help changing the USB driver? Is there any mistake in the script? Can anyone help me? Thanks Styl
Stelios Markatis wrote: > > Could be of any help changing the USB driver? Is there any mistake in > the script? Can anyone help me? > > Thanks > Styl script looks ok to me. Try a newer version of openocd - should work but your version is quite old. Before you attempt to program, you need to get the connection working first so try reset_halt rather than run_and_halt. The script will need updating for the newer openocd, but there are examples in the target/target dir of openocd. Cheers Spen
Spencer Oliver wrote: > Stelios Markatis wrote: >> >> Could be of any help changing the USB driver? Is there any mistake in >> the script? Can anyone help me? >> >> Thanks >> Styl > > script looks ok to me. > Try a newer version of openocd - should work but your version is quite > old. Dear Spen, Thank you for your reply. Where can I find a more recent version of opeocd? I got the 717 version of opeocd from Yagarto. Styl
Stelios Markatis wrote: > Spencer Oliver wrote: >> Stelios Markatis wrote: >>> >>> Could be of any help changing the USB driver? Is there any mistake in >>> the script? Can anyone help me? >>> >>> Thanks >>> Styl >> >> script looks ok to me. >> Try a newer version of openocd - should work but your version is quite >> old. > > Dear Spen, Thank you for your reply. > Where can I find a more recent version of opeocd? > I got the 717 version of opeocd from Yagarto. > Styl Hi Stelios, thanks for your posting, your script is the solution for me. I adapted my configuration with your changes and I got my comStick working. I have the same version of OCD as you!
Hi, I am also new to ARM programming and I also bought some STR9-comStick from Hitex. I modified an example that now uses the RTC interupts to increase a counter nd does an output over UART. Unforunately, my code has apparently some mistakes and now I cannot connect to stick anymore. Currently I am not using OpenOCD, but the Hitop for compilation and download and Eclipse for editing. Is there any chance to access my comStick ever again? I read that the stick is a bit picky on particular errors, as the JTAG is resettet with the processor and it takes some time until JTAG gets control. Thanks for helping cheers Axel
Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
Log in with Google account
No account? Register here.