Hi all,

I'm just trying to debug a problem that has cropped up out of the blue.
 I have a couple of STM32F103VE-based microcontrollers which I'm
programming using a Olimex ARM-USB-TINY-H JTAG programmer.

Host environment is Open On-Chip Debugger 0.7.0-dev-00080-g59c051c-dirty
(2013-01-25-19:17), from the Gentoo ebuild.

I'm invoking openocd with the following:
> openocd -f interface/olimex-arm-usb-tiny-h.cfg -f target/stm32f1x.cfg 

which up until now has worked fine, I've been able to telnet in to port
4444, and flash my devices, even hook up gdb.  I was doing some
debugging today, no problems flashing the devices until suddenly, it
stopped halting the device.  No configuration files had been changed.

When I issue a `reset init`, I get:
>> reset init
> JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 
> 0xba00, ver: 0x3)
> JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020, part: 0x6414, 
> ver: 0x0)
> Halt timed out, wake up GDB.
> timed out while waiting for target halted
> TARGET: stm32f1x.cpu - Not halted
> 
> in procedure 'reset'

Turning up debugging I get:
> Debug: 357 74774 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_reset init
> Debug: 358 74774 command.c:145 script_debug(): command - reset ocd_reset init
> Debug: 360 74777 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_target names
> Debug: 361 74777 command.c:145 script_debug(): command - ocd_target 
> ocd_target names
> Debug: 362 74777 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu invoke-event reset-start
> Debug: 363 74777 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu invoke-event reset-start
> Debug: 364 74777 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_jtag arp_init-reset
> Debug: 365 74777 command.c:145 script_debug(): command - ocd_jtag ocd_jtag 
> arp_init-reset
> Debug: 366 74777 core.c:1520 jtag_init_reset(): Initializing with hard 
> TRST+SRST reset
> Debug: 367 74778 core.c:732 jtag_add_reset(): JTAG reset with TLR instead of 
> TRST
> Debug: 368 74778 core.c:323 jtag_call_event_callbacks(): jtag event: TAP reset
> Debug: 369 74778 core.c:1412 jtag_init_inner(): Init JTAG chain
> Debug: 370 74778 core.c:323 jtag_call_event_callbacks(): jtag event: TAP reset
> Debug: 371 74778 core.c:1048 jtag_examine_chain(): DR scan interrogation for 
> IDCODE/BYPASS
> Debug: 372 74778 core.c:323 jtag_call_event_callbacks(): jtag event: TAP reset
> Info : 373 74779 core.c:951 jtag_examine_chain_display(): JTAG tap: 
> stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
> Info : 374 74779 core.c:951 jtag_examine_chain_display(): JTAG tap: 
> stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020, part: 0x6414, ver: 0x0)
> Debug: 375 74779 core.c:1208 jtag_validate_ircapture(): IR capture validation 
> scan
> Debug: 376 74780 core.c:1267 jtag_validate_ircapture(): stm32f1x.cpu: IR 
> capture 0x01
> Debug: 377 74780 core.c:1267 jtag_validate_ircapture(): stm32f1x.bs: IR 
> capture 0x01
> Debug: 378 74780 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu cget -chain-position
> Debug: 379 74780 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu cget -chain-position
> Debug: 380 74780 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_jtag tapisenabled stm32f1x.cpu
> Debug: 381 74780 command.c:145 script_debug(): command - ocd_jtag ocd_jtag 
> tapisenabled stm32f1x.cpu
> Debug: 382 74780 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu invoke-event examine-start
> Debug: 383 74780 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu invoke-event examine-start
> Debug: 384 74780 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu arp_examine
> Debug: 385 74780 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu arp_examine
> Debug: 386 74780 arm_adi_v5.c:1097 ahbap_debugport_init():  
> Debug: 387 74782 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu invoke-event examine-end
> Debug: 388 74782 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu invoke-event examine-end
> Debug: 389 74782 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu invoke-event reset-assert-pre
> Debug: 390 74782 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu invoke-event reset-assert-pre
> Debug: 391 74782 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu cget -chain-position
> Debug: 392 74782 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu cget -chain-position
> Debug: 393 74782 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_jtag tapisenabled stm32f1x.cpu
> Debug: 394 74782 command.c:145 script_debug(): command - ocd_jtag ocd_jtag 
> tapisenabled stm32f1x.cpu
> Debug: 395 74782 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu arp_reset assert 1
> Debug: 396 74782 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu arp_reset assert 1
> Debug: 397 74782 target.c:1631 target_free_all_working_areas_restore(): 
> freeing all working areas
> Debug: 398 74782 cortex_m.c:974 cortex_m3_assert_reset(): target->state: reset
> Debug: 399 74788 cortex_m.c:1065 cortex_m3_assert_reset(): Using Cortex-M3 
> SYSRESETREQ
> Debug: 400 74790 cortex_m.c:597 cortex_m3_halt(): target->state: reset
> Debug: 401 74790 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu invoke-event reset-assert-post
> Debug: 402 74790 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu invoke-event reset-assert-post
> Debug: 403 74790 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu invoke-event reset-deassert-pre
> Debug: 404 74790 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu invoke-event reset-deassert-pre
> Debug: 405 74790 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu cget -chain-position
> Debug: 406 74790 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu cget -chain-position
> Debug: 407 74790 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_jtag tapisenabled stm32f1x.cpu
> Debug: 408 74790 command.c:145 script_debug(): command - ocd_jtag ocd_jtag 
> tapisenabled stm32f1x.cpu
> Debug: 409 74790 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu arp_reset deassert 1
> Debug: 410 74790 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu arp_reset deassert 1
> Debug: 411 74790 target.c:1631 target_free_all_working_areas_restore(): 
> freeing all working areas
> Debug: 412 74790 cortex_m.c:1101 cortex_m3_deassert_reset(): target->state: 
> reset
> Debug: 413 74790 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu invoke-event reset-deassert-post
> Debug: 414 74790 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu invoke-event reset-deassert-post
> Debug: 415 74791 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu cget -chain-position
> Debug: 416 74791 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu cget -chain-position
> Debug: 417 74791 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_jtag tapisenabled stm32f1x.cpu
> Debug: 418 74791 command.c:145 script_debug(): command - ocd_jtag ocd_jtag 
> tapisenabled stm32f1x.cpu
> Debug: 419 74791 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu arp_waitstate halted 1000
> Debug: 420 74791 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu arp_waitstate halted 1000
> Debug: 421 74844 target.c:2460 target_wait_state(): waiting for target 
> halted...
> Info : 423 75791 target.c:453 target_poll(): Halt timed out, wake up GDB.
> Debug: 424 75791 target.c:1310 target_call_event_callbacks(): target event 0 
> (gdb-halt)
> Error: 425 75847 target.c:2468 target_wait_state(): timed out while waiting 
> for target halted
> Debug: 426 75847 command.c:145 script_debug(): command - ocd_command 
> ocd_command type ocd_stm32f1x.cpu curstate
> Debug: 427 75847 command.c:145 script_debug(): command - ocd_stm32f1x.cpu 
> ocd_stm32f1x.cpu curstate
> User : 428 75847 command.c:549 command_print(): TARGET: stm32f1x.cpu - Not 
> halted
> 
> Debug: 429 75847 command.c:631 run_command(): Command failed with error code 
> -4
> User : 430 75847 command.c:669 command_run_line(): in procedure 'reset'

Is there any way, using openocd, to determine if it's something wrong
with the targets (all three seem to have failed, and all were working
earlier), or if the JTAG device has failed?

Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)

I haven't lost my mind...
  ...it's backed up on a tape somewhere.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to