Test openOCD-Chibios
Using Eclipse

1 Load test code in target
   Dev_1 (Code with shell, LED blinker, FatFs, and two hardware interrupts)
2 Power cycle JTAG and target 
   OK
3 Run openOCD (Version Open On-Chip Debugger 0.7.0-dev-g4e00135 (2012-10-10-11:00). 
   Using start script
   source [find ...../openocd/scripts/interface/olimex-arm-usb-ocd.cfg]
   source [find ....../oocd/share/openocd/scripts/target/stm32f1x.cfg]
   init
   halt
   cortex_m3 maskisr auto
   poll
   reset run

4 Run GDB (Eclipse, record config)
Standard GDB Hardware Debugging Launcher
On Startup tab
   Selected 
      Reset
      Load symbols
      Use project binary: ch.elf
   file /home/chris/software/ChibiOS_5_1/Dev_1/build/ch.elf 
On Debugger tab
   GDB is ..../arm-none-eabi-gdb
   Protocol version "mi"
   
5 Record Debug window
Dev_1_OCD [Program]	
	/home/chris/bin/oocd/bin/openocd	
Dev_1 [GDB Hardware Debugging]	
	GDB Hardware Debugger (16/10/12 10:53 AM) (Suspended)	
		Thread [1] (Suspended)	
			4 chSchGoSleepS() chschd.c:122 0x08001360	
			3 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			2 chEvtWaitOneTimeout() chevents.c:451 0x08002c10	
			1 main() main.c:657 0x08014f84	
		Thread [2] (Suspended)	
			2 _idle_thread() chsys.c:61 0x08000ed8	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [3] (Suspended)	
			5 chSchGoSleepS() chschd.c:122 0x08001360	
			4 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			3 chThdSleep() chthreads.c:290 0x080018a8	
			2 Thread1() main.c:351 0x08014c16	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [4] (Suspended)	
			8 chSchGoSleepS() chschd.c:122 0x08001360	
			7 chSchGoSleepTimeoutS() chschd.c:195 0x08001454	
			6 qwait() chqueues.c:69 0x08003350	
			5 chIQReadTimeout() chqueues.c:232 0x08003556	
			4 read() serial.c:63 0x08004bee	
			3 shellGetLine() shell.c:261 0x08012536	
			2 shell_thread() shell.c:155 0x0801230a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
	/opt/soucery/arm-2012_03/bin/arm-none-eabi-gdb (16/10/12 10:53 AM)	
	/home/chris/software/ChibiOS_5_1/Dev_1/build/ch.elf (16/10/12 10:53 AM)	

6 Resume then pause
7 Record debug window
Dev_1_OCD [Program]	
	/home/chris/bin/oocd/bin/openocd	
Dev_1 [GDB Hardware Debugging]	
	GDB Hardware Debugger (16/10/12 10:53 AM) (Suspended)	
		Thread [1] (Suspended: Signal 'SIGINT' received. Description: Interrupt.)	
			4 chSchGoSleepS() chschd.c:122 0x08001360	
			3 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			2 chEvtWaitOneTimeout() chevents.c:451 0x08002c10	
			1 main() main.c:657 0x08014f84	
		Thread [2] (Suspended)	
			2 _idle_thread() chsys.c:61 0x08000ed8	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [3] (Suspended)	
			5 chSchGoSleepS() chschd.c:122 0x08001360	
			4 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			3 chThdSleep() chthreads.c:290 0x080018a8	
			2 Thread1() main.c:351 0x08014c16	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [4] (Suspended)	
			8 chSchGoSleepS() chschd.c:122 0x08001360	
			7 chSchGoSleepTimeoutS() chschd.c:195 0x08001454	
			6 qwait() chqueues.c:69 0x08003350	
			5 chIQReadTimeout() chqueues.c:232 0x08003556	
			4 read() serial.c:63 0x08004bee	
			3 shellGetLine() shell.c:261 0x08012536	
			2 shell_thread() shell.c:155 0x0801230a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
	/opt/soucery/arm-2012_03/bin/arm-none-eabi-gdb (16/10/12 10:53 AM)	
	/home/chris/software/ChibiOS_5_1/Dev_1/build/ch.elf (16/10/12 10:53 AM)	

8 Set breakpoint at LED flasher.
9 Run till break
   Stopped at chSchGoSleepS in thread 1
10 Record debug window
Dev_1_OCD [Program]	
	/home/chris/bin/oocd/bin/openocd	
Dev_1 [GDB Hardware Debugging]	
	GDB Hardware Debugger (16/10/12 10:53 AM) (Suspended)	
		Thread [1] (Suspended: Signal 'SIGTRAP' received. Description: Trace/breakpoint trap.)	
			4 chSchGoSleepS() chschd.c:122 0x08001360	
			3 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			2 chEvtWaitOneTimeout() chevents.c:451 0x08002c10	
			1 main() main.c:657 0x08014f84	
		Thread [3] (Suspended)	
			5 chSchGoSleepS() chschd.c:122 0x08001360	
			4 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			3 chThdSleep() chthreads.c:290 0x080018a8	
			2 Thread1() main.c:351 0x08014c16	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [4] (Suspended)	
			8 chSchGoSleepS() chschd.c:122 0x08001360	
			7 chSchGoSleepTimeoutS() chschd.c:195 0x08001454	
			6 qwait() chqueues.c:69 0x08003350	
			5 chIQReadTimeout() chqueues.c:232 0x08003556	
			4 read() serial.c:63 0x08004bee	
			3 shellGetLine() shell.c:261 0x08012536	
			2 shell_thread() shell.c:155 0x0801230a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [5] (Suspended)	
			2 Thread1() main.c:321 0x08014b7a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
	/opt/soucery/arm-2012_03/bin/arm-none-eabi-gdb (16/10/12 10:53 AM)	
	/home/chris/software/ChibiOS_5_1/Dev_1/build/ch.elf (16/10/12 10:53 AM)	

11 Run till break
  Stopped at chSchGoSleepS in thread 1
12 Record debug window
Dev_1_OCD [Program]	
	/home/chris/bin/oocd/bin/openocd	
Dev_1 [GDB Hardware Debugging]	
	GDB Hardware Debugger (16/10/12 10:53 AM) (Suspended)	
		Thread [1] (Suspended: Signal 'SIGTRAP' received. Description: Trace/breakpoint trap.)	
			4 chSchGoSleepS() chschd.c:122 0x08001360	
			3 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			2 chEvtWaitOneTimeout() chevents.c:451 0x08002c10	
			1 main() main.c:657 0x08014f84	
		Thread [3] (Suspended)	
			5 chSchGoSleepS() chschd.c:122 0x08001360	
			4 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			3 chThdSleep() chthreads.c:290 0x080018a8	
			2 Thread1() main.c:351 0x08014c16	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [4] (Suspended)	
			8 chSchGoSleepS() chschd.c:122 0x08001360	
			7 chSchGoSleepTimeoutS() chschd.c:195 0x08001454	
			6 qwait() chqueues.c:69 0x08003350	
			5 chIQReadTimeout() chqueues.c:232 0x08003556	
			4 read() serial.c:63 0x08004bee	
			3 shellGetLine() shell.c:261 0x08012536	
			2 shell_thread() shell.c:155 0x0801230a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [5] (Suspended)	
			2 Thread1() main.c:321 0x08014b7a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
	/opt/soucery/arm-2012_03/bin/arm-none-eabi-gdb (16/10/12 10:53 AM)	
	/home/chris/software/ChibiOS_5_1/Dev_1/build/ch.elf (16/10/12 10:53 AM)	

13 Remove breakpoint
14 Resume Pause
15 Record debug window
Dev_1_OCD [Program]	
	/home/chris/bin/oocd/bin/openocd	
Dev_1 [GDB Hardware Debugging]	
	GDB Hardware Debugger (16/10/12 10:53 AM) (Suspended)	
		Thread [1] (Suspended: Signal 'SIGINT' received. Description: Interrupt.)	
			4 chSchGoSleepS() chschd.c:122 0x08001360	
			3 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			2 chEvtWaitOneTimeout() chevents.c:451 0x08002c10	
			1 main() main.c:657 0x08014f84	
		Thread [3] (Suspended)	
			5 chSchGoSleepS() chschd.c:122 0x08001360	
			4 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			3 chThdSleep() chthreads.c:290 0x080018a8	
			2 Thread1() main.c:351 0x08014c16	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [4] (Suspended)	
			8 chSchGoSleepS() chschd.c:122 0x08001360	
			7 chSchGoSleepTimeoutS() chschd.c:195 0x08001454	
			6 qwait() chqueues.c:69 0x08003350	
			5 chIQReadTimeout() chqueues.c:232 0x08003556	
			4 read() serial.c:63 0x08004bee	
			3 shellGetLine() shell.c:261 0x08012536	
			2 shell_thread() shell.c:155 0x0801230a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [6] (Suspended)	
			2 _idle_thread() chsys.c:61 0x08000ed8	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
	/opt/soucery/arm-2012_03/bin/arm-none-eabi-gdb (16/10/12 10:53 AM)	
	/home/chris/software/ChibiOS_5_1/Dev_1/build/ch.elf (16/10/12 10:53 AM)	

16 Resume Pause
17 Record debug window
Dev_1_OCD [Program]	
	/home/chris/bin/oocd/bin/openocd	
Dev_1 [GDB Hardware Debugging]	
	GDB Hardware Debugger (16/10/12 10:53 AM) (Suspended)	
		Thread [1] (Suspended: Signal 'SIGINT' received. Description: Interrupt.)	
			4 chSchGoSleepS() chschd.c:122 0x08001360	
			3 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			2 chEvtWaitOneTimeout() chevents.c:451 0x08002c10	
			1 main() main.c:657 0x08014f84	
		Thread [3] (Suspended)	
			5 chSchGoSleepS() chschd.c:122 0x08001360	
			4 chSchGoSleepTimeoutS() chschd.c:190 0x0800143a	
			3 chThdSleep() chthreads.c:290 0x080018a8	
			2 Thread1() main.c:351 0x08014c16	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [4] (Suspended)	
			8 chSchGoSleepS() chschd.c:122 0x08001360	
			7 chSchGoSleepTimeoutS() chschd.c:195 0x08001454	
			6 qwait() chqueues.c:69 0x08003350	
			5 chIQReadTimeout() chqueues.c:232 0x08003556	
			4 read() serial.c:63 0x08004bee	
			3 shellGetLine() shell.c:261 0x08012536	
			2 shell_thread() shell.c:155 0x0801230a	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
		Thread [6] (Suspended)	
			2 _idle_thread() chsys.c:61 0x08000ed8	
			1 _port_thread_start() chcore_v7m.c:255 0x08000d1c	
	/opt/soucery/arm-2012_03/bin/arm-none-eabi-gdb (16/10/12 10:53 AM)	
	/home/chris/software/ChibiOS_5_1/Dev_1/build/ch.elf (16/10/12 10:53 AM)	

NOTES:

From Power cycle of target and JTAG
Start openOCD
Start GDB (STD)
Runs normally but stops in chSchGoSleepS (in main I think)
Continual Resume Pasue cycles stop in chSchGoSleepS
