OpenOCD stopped working (Halt timed out)

Hello!

My installation of OpenOCD was working flawlessly. However, now it stopped working, I cannot halt the system any more. First I needed more than one attempt to halt the system, now I can try as often as I like it does not halt any more.

I have already tried changing the JTag speed but without success. Do you have an Idea what is wrong? This is what the debug output says:

Debug: 14 0 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_jtag_khz 6000

Debug: 15 0 command.c:133 script_debug(): command - jtag_khz ocd_jtag_khz 6000

Debug: 17 0 core.c:1560 jtag_config_khz(): handle jtag khz

Debug: 18 0 core.c:1523 jtag_khz_to_speed(): convert khz to interface specific speed value

User : 19 0 command.c:539 command_print(): 6000 kHz

Debug: 20 0 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_reset_config trst_and_srst

Debug: 21 0 command.c:133 script_debug(): command - reset_config ocd_reset_config trst_and_srst

User : 23 0 command.c:539 command_print(): trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

Debug: 24 0 configuration.c:87 find_file(): found c:/openocd/bin/…/share/openocd/scripts/interface/olimex-arm-usb-tiny-h.cfg

Debug: 25 0 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_interface ft2232

Debug: 26 0 command.c:133 script_debug(): command - interface ocd_interface ft2232

Debug: 28 0 command.c:346 register_command_handler(): registering ‘ocd_ft2232_device_desc’…

Debug: 29 0 command.c:346 register_command_handler(): registering ‘ocd_ft2232_serial’…

Debug: 30 0 command.c:346 register_command_handler(): registering ‘ocd_ft2232_layout’…

Debug: 31 0 command.c:346 register_command_handler(): registering ‘ocd_ft2232_vid_pid’…

Debug: 32 0 command.c:346 register_command_handler(): registering ‘ocd_ft2232_latency’…

Debug: 33 0 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_ft2232_device_desc Olimex OpenOCD JTAG ARM-USB-TINY-H

Debug: 34 0 command.c:133 script_debug(): command - ft2232_device_desc ocd_ft2232_device_desc Olimex OpenOCD JTAG ARM-USB-TINY-H

Debug: 36 0 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_ft2232_layout olimex-jtag

Debug: 37 0 command.c:133 script_debug(): command - ft2232_layout ocd_ft2232_layout olimex-jtag

Debug: 39 0 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_ft2232_vid_pid 0x15ba 0x002a

Debug: 40 0 command.c:133 script_debug(): command - ft2232_vid_pid ocd_ft2232_vid_pid 0x15ba 0x002a

Debug: 42 0 configuration.c:87 find_file(): found c:/openocd/bin/…/share/openocd/scripts/target/at91rm9200.cfg

Debug: 43 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_reset_config trst_and_srst

Debug: 44 15 command.c:133 script_debug(): command - reset_config ocd_reset_config trst_and_srst

User : 46 15 command.c:539 command_print(): trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain

Debug: 47 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_jtag newtap at91rm9200 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x05b0203f

Debug: 48 15 command.c:133 script_debug(): command - ocd_jtag ocd_jtag newtap at91rm9200 cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id 0x05b0203f

Debug: 49 15 tcl.c:568 jim_newtap_cmd(): Creating New Tap, Chip: at91rm9200, Tap: cpu, Dotted: at91rm9200.cpu, 8 params

Debug: 50 15 tcl.c:585 jim_newtap_cmd(): Processing option: -irlen

Debug: 51 15 tcl.c:585 jim_newtap_cmd(): Processing option: -ircapture

Debug: 52 15 tcl.c:585 jim_newtap_cmd(): Processing option: -irmask

Debug: 53 15 tcl.c:585 jim_newtap_cmd(): Processing option: -expected-id

Debug: 54 15 core.c:1300 jtag_tap_init(): Created Tap: at91rm9200.cpu @ abs position 0, irlen 4, capture: 0x1 mask: 0xf

Debug: 55 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_target create at91rm9200.cpu arm920t -endian little -chain-position at91rm9200.cpu

Debug: 56 15 command.c:133 script_debug(): command - ocd_target ocd_target create at91rm9200.cpu arm920t -endian little -chain-position at91rm9200.cpu

Debug: 57 15 command.c:346 register_command_handler(): registering ‘ocd_arm’…

Debug: 58 15 command.c:346 register_command_handler(): registering ‘ocd_arm’…

Debug: 59 15 command.c:346 register_command_handler(): registering ‘ocd_arm’…

Debug: 60 15 command.c:346 register_command_handler(): registering ‘ocd_arm’…

Debug: 61 15 command.c:346 register_command_handler(): registering ‘ocd_arm’…

Debug: 62 15 command.c:346 register_command_handler(): registering ‘ocd_etm’…

Debug: 63 15 command.c:346 register_command_handler(): registering ‘ocd_arm7_9’…

Debug: 64 15 command.c:346 register_command_handler(): registering ‘ocd_arm7_9’…

Debug: 65 15 command.c:346 register_command_handler(): registering ‘ocd_arm7_9’…

Debug: 66 15 command.c:346 register_command_handler(): registering ‘ocd_arm7_9’…

Debug: 67 15 command.c:346 register_command_handler(): registering ‘ocd_arm9tdmi’…

Debug: 68 15 command.c:346 register_command_handler(): registering ‘ocd_arm920t’…

Debug: 69 15 command.c:346 register_command_handler(): registering ‘ocd_arm920t’…

Debug: 70 15 command.c:346 register_command_handler(): registering ‘ocd_arm920t’…

Debug: 71 15 command.c:346 register_command_handler(): registering ‘ocd_arm920t’…

Debug: 72 15 command.c:346 register_command_handler(): registering ‘ocd_arm920t’…

Debug: 73 15 armv4_5.c:397 arm_set_cpsr(): set CPSR 0x00000010: User mode, ARM state

Debug: 74 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 75 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 76 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 77 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 78 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 79 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 80 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 81 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 82 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 83 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 84 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 85 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 86 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 87 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 88 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 89 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 90 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 91 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 92 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 93 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 94 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 95 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 96 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 97 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 98 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 99 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 100 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 101 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 102 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 103 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 104 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 105 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 106 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 107 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 108 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 109 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 110 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 111 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 112 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 113 15 command.c:346 register_command_handler(): registering ‘ocd_at91rm9200.cpu’…

Debug: 114 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_at91rm9200.cpu configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 1

Debug: 115 15 command.c:133 script_debug(): command - ocd_at91rm9200.cpu ocd_at91rm9200.cpu configure -work-area-phys 0x00200000 -work-area-size 0x4000 -work-area-backup 1

Debug: 116 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_arm7_9 dcc_downloads enable

Debug: 117 15 command.c:133 script_debug(): command - ocd_arm7_9 ocd_arm7_9 dcc_downloads enable

User : 119 15 command.c:539 command_print(): dcc downloads are enabled

Debug: 120 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_telnet_port 4444

Debug: 121 15 command.c:133 script_debug(): command - telnet_port ocd_telnet_port 4444

Debug: 123 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_gdb_port 2000

Debug: 124 15 command.c:133 script_debug(): command - gdb_port ocd_gdb_port 2000

Debug: 126 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_arm7_9 fast_memory_access enable

Debug: 127 15 command.c:133 script_debug(): command - ocd_arm7_9 ocd_arm7_9 fast_memory_access enable

User : 129 15 command.c:539 command_print(): fast memory access is enabled

Debug: 130 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_gdb_breakpoint_override hard

Debug: 131 15 command.c:133 script_debug(): command - gdb_breakpoint_override ocd_gdb_breakpoint_override hard

User : 133 15 gdb_server.c:2501 handle_gdb_breakpoint_override_command(): force hard breakpoints

Debug: 134 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_init

Debug: 135 15 command.c:133 script_debug(): command - init ocd_init

Debug: 137 15 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_target init

Debug: 138 15 command.c:133 script_debug(): command - ocd_target ocd_target init

Debug: 140 15 target.c:835 handle_target_init_command(): Initializing targets…

Debug: 141 15 command.c:346 register_command_handler(): registering ‘ocd_target_request’…

Debug: 142 15 command.c:346 register_command_handler(): registering ‘ocd_trace’…

Debug: 143 15 command.c:346 register_command_handler(): registering ‘ocd_trace’…

Debug: 144 15 command.c:346 register_command_handler(): registering ‘ocd_fast_load_image’…

Debug: 145 15 command.c:346 register_command_handler(): registering ‘ocd_fast_load’…

Debug: 146 15 command.c:346 register_command_handler(): registering ‘ocd_profile’…

Debug: 147 15 command.c:346 register_command_handler(): registering ‘ocd_virt2phys’…

Debug: 148 15 command.c:346 register_command_handler(): registering ‘ocd_reg’…

Debug: 149 15 command.c:346 register_command_handler(): registering ‘ocd_poll’…

Debug: 150 15 command.c:346 register_command_handler(): registering ‘ocd_wait_halt’…

Debug: 151 15 command.c:346 register_command_handler(): registering ‘ocd_halt’…

Debug: 152 15 command.c:346 register_command_handler(): registering ‘ocd_resume’…

Debug: 153 15 command.c:346 register_command_handler(): registering ‘ocd_reset’…

Debug: 154 15 command.c:346 register_command_handler(): registering ‘ocd_soft_reset_halt’…

Debug: 155 15 command.c:346 register_command_handler(): registering ‘ocd_step’…

Debug: 156 15 command.c:346 register_command_handler(): registering ‘ocd_mdw’…

Debug: 157 15 command.c:346 register_command_handler(): registering ‘ocd_mdh’…

Debug: 158 15 command.c:346 register_command_handler(): registering ‘ocd_mdb’…

Debug: 159 15 command.c:346 register_command_handler(): registering ‘ocd_mww’…

Debug: 160 15 command.c:346 register_command_handler(): registering ‘ocd_mwh’…

Debug: 161 15 command.c:346 register_command_handler(): registering ‘ocd_mwb’…

Debug: 162 15 command.c:346 register_command_handler(): registering ‘ocd_bp’…

Debug: 163 15 command.c:346 register_command_handler(): registering ‘ocd_rbp’…

Debug: 164 15 command.c:346 register_command_handler(): registering ‘ocd_wp’…

Debug: 165 15 command.c:346 register_command_handler(): registering ‘ocd_rwp’…

Debug: 166 15 command.c:346 register_command_handler(): registering ‘ocd_load_image’…

Debug: 167 15 command.c:346 register_command_handler(): registering ‘ocd_dump_image’…

Debug: 168 15 command.c:346 register_command_handler(): registering ‘ocd_verify_image’…

Debug: 169 15 command.c:346 register_command_handler(): registering ‘ocd_test_image’…

Debug: 170 15 command.c:346 register_command_handler(): registering ‘ocd_reset_nag’…

Debug: 171 15 ft2232.c:2097 ft2232_init(): ft2232 interface using shortest path jtag state transitions

Debug: 172 15 ft2232.c:1843 ft2232_init_ftd2xx(): ‘ft2232’ interface using FTD2XX with ‘olimex-jtag’ layout (15ba:002a)

Debug: 173 109 ft2232.c:1954 ft2232_init_ftd2xx(): current latency timer: 2

Info : 174 109 ft2232.c:1981 ft2232_init_ftd2xx(): device: 6 “2232H”

Info : 175 109 ft2232.c:1982 ft2232_init_ftd2xx(): deviceID: 364511274

Info : 176 109 ft2232.c:1983 ft2232_init_ftd2xx(): SerialNumber: OLT8WHKqA

Info : 177 109 ft2232.c:1984 ft2232_init_ftd2xx(): Description: Olimex OpenOCD JTAG ARM-USB-TINY-H A

Debug: 178 109 ft2232.c:2443 olimex_jtag_init(): 80 08 1b

Debug: 179 109 ft2232.c:2487 olimex_jtag_init(): 82 09 0f

Info : 180 109 ft2232.c:494 ft2232h_ft4232h_clk_divide_by_5(): max TCK change to: 30000 kHz

Debug: 181 109 core.c:1523 jtag_khz_to_speed(): convert khz to interface specific speed value

Debug: 182 109 core.c:1527 jtag_khz_to_speed(): have interface set up

Debug: 183 109 ft2232.c:463 ft2232h_ft4232h_adaptive_clocking(): 97

Debug: 184 109 ft2232.c:523 ft2232_speed(): 86 04 00

Debug: 185 109 core.c:1523 jtag_khz_to_speed(): convert khz to interface specific speed value

Debug: 186 109 core.c:1527 jtag_khz_to_speed(): have interface set up

Info : 187 109 core.c:1350 jtag_interface_init(): clock speed 6000 kHz

Debug: 188 109 openocd.c:122 handle_init_command(): jtag interface init complete

Debug: 189 109 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_jtag init

Debug: 190 109 command.c:133 script_debug(): command - ocd_jtag ocd_jtag init

Debug: 192 109 tcl.c:854 handle_jtag_init_command(): Initializing jtag devices…

Debug: 193 109 ft2232.c:1361 olimex_jtag_reset(): trst: 0, srst: 0, high_output: 0x01, high_direction: 0x0f

Debug: 194 109 core.c:672 jtag_add_reset(): SRST line released

Debug: 195 109 core.c:697 jtag_add_reset(): TRST line released

Debug: 196 109 core.c:321 jtag_call_event_callbacks(): jtag event: TAP reset

Debug: 197 109 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_jtag arp_init

Debug: 198 109 command.c:133 script_debug(): command - ocd_jtag ocd_jtag arp_init

Debug: 199 109 core.c:1364 jtag_init_inner(): Init JTAG chain

Debug: 200 109 core.c:321 jtag_call_event_callbacks(): jtag event: TAP reset

Debug: 201 109 core.c:1017 jtag_examine_chain(): DR scan interrogation for IDCODE/BYPASS

Debug: 202 109 core.c:321 jtag_call_event_callbacks(): jtag event: TAP reset

Info : 203 109 core.c:917 jtag_examine_chain_display(): JTAG tap: at91rm9200.cpu tap/device found: 0x05b0203f (mfg: 0x01f, part: 0x5b02, ver: 0x0)

Debug: 204 109 core.c:1182 jtag_validate_ircapture(): IR capture validation scan

Debug: 205 109 core.c:1243 jtag_validate_ircapture(): at91rm9200.cpu: IR capture 0x01

Debug: 206 109 openocd.c:132 handle_init_command(): Examining targets…

Info : 207 109 embeddedice.c:229 embeddedice_build_reg_cache(): Embedded ICE version 15

Error: 208 109 embeddedice.c:295 embeddedice_build_reg_cache(): unknown EmbeddedICE version (comms ctrl: 0xfffffffe)

Info : 209 109 embeddedice.c:301 embeddedice_build_reg_cache(): at91rm9200.cpu: hardware has 2 breakpoint/watchpoint units

Debug: 210 109 arm7_9_common.c:75 arm7_9_clear_watchpoints(): -

Debug: 211 109 embeddedice.c:497 embeddedice_write_reg(): 12: 0x00000000

Debug: 212 109 embeddedice.c:497 embeddedice_write_reg(): 20: 0x00000000

Debug: 213 109 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_flash init

Debug: 214 109 command.c:133 script_debug(): command - ocd_flash ocd_flash init

Debug: 216 109 tcl.c:920 handle_flash_init_command(): Initializing flash devices…

Debug: 217 109 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_mflash init

Debug: 218 109 command.c:133 script_debug(): command - ocd_mflash ocd_mflash init

Debug: 220 125 mflash.c:1325 handle_mflash_init_command(): Initializing mflash devices…

Debug: 221 125 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_nand init

Debug: 222 125 command.c:133 script_debug(): command - ocd_nand ocd_nand init

Debug: 224 125 tcl.c:536 handle_nand_init_command(): Initializing NAND devices…

Debug: 225 125 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_pld init

Debug: 226 125 command.c:133 script_debug(): command - ocd_pld ocd_pld init

Debug: 228 125 pld.c:231 handle_pld_init_command(): Initializing PLDs…

Debug: 229 125 gdb_server.c:2370 gdb_target_start(): gdb service for target ‘at91rm9200.cpu’ on TCP port 2000

Debug: 230 125 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_halt

Debug: 231 125 command.c:133 script_debug(): command - halt ocd_halt

Debug: 233 125 target.c:2062 handle_halt_command(): -

Debug: 234 125 arm7_9_common.c:1281 arm7_9_halt(): target->state: running

Debug: 235 125 embeddedice.c:497 embeddedice_write_reg(): 0: 0x00000000

Debug: 236 125 target.c:2041 target_wait_state(): waiting for target halted…

Info : 238 1140 target.c:398 target_poll(): Halt timed out, wake up GDB.

Debug: 239 1140 target.c:968 target_call_event_callbacks(): target event 2 (gdb-halt)

Error: 248 5140 target.c:2052 target_wait_state(): timed out while waiting for target halted

Debug: 249 5140 command.c:620 run_command(): Command failed with error code -4

User : 250 5140 command.c:824 openocd_jim_vfprintf(): Command handler execution failed

User : 253 5140 command.c:824 openocd_jim_vfprintf():

User : 255 5140 command.c:824 openocd_jim_vfprintf():

User : 258 5140 command.c:824 openocd_jim_vfprintf():

User : 260 5140 command.c:824 openocd_jim_vfprintf():

Debug: 261 5140 httpd_stubs.c:28 httpd_start(): libocdserver was built without HTTPD support

Debug: 262 5140 command.c:133 script_debug(): command - ocd_command ocd_command type ocd_init

Debug: 263 5140 command.c:133 script_debug(): command - init ocd_init

  • Matthias Meixner

Looks like my target hardware was broken. Using an new hardware things work again.

Is there a way to detect this in the log?

  • Matthias Meixner