Mabl,
I had some time today so tried your openOCD code, along with trying to sort out some Eclipse/GitHub issues so I could install a new copy of 5.... properly.
Apart from some finger trouble I have it working but I think there are still some problems.
Version Open On-Chip Debugger 0.7.0-dev-g4e00135 (2012-10-10-11:00).
Compiled this morning (0:00 UTC), just a coincidence.
The following is the Debug window. Note the numbers at the end of each thread listing except main. Perhaps they relate to your stack issues.
Code: Select all
Dev_1_OCD_dev [Program]
/home/chris/bin/oocd/bin/openocd
Dev_1 [GDB Hardware Debugging]
ch.elf
Thread [4] 536877952 (shell : : WTQUEUE) (Suspended : Container)
chSchGoSleepS() at chschd.c:122 0x8001664
chSchGoSleepTimeoutS() at chschd.c:195 0x8001768
qwait() at chqueues.c:69 0x8003c40
chIQReadTimeout() at chqueues.c:232 0x8003e6c
read() at serial.c:63 0x800574e
shellGetLine() at shell.c:261 0x80134c6
shell_thread() at shell.c:155 0x801328a
_port_thread_start() at chcore_v7m.c:255 0x8000d32
chSchGoSleepS() at chschd.c:121 0x8001664
0xaa52432a
Thread [3] 536877640 (blinker : : SLEEPING) (Suspended : Container)
chSchGoSleepS() at chschd.c:122 0x8001664
chSchGoSleepTimeoutS() at chschd.c:190 0x800174e
chThdSleep() at chthreads.c:290 0x8001cee
Thread1() at main.c:351 0x8015bb6
_port_thread_start() at chcore_v7m.c:255 0x8000d32
chSchGoSleepS() at chschd.c:121 0x8001664
0x200022d4
Thread [2] 536873472 (idle : : CURRENT) (Suspended : Container)
_idle_thread() at chsys.c:61 0x8000ee8
_port_thread_start() at chcore_v7m.c:255 0x8000d32
chSchGoSleepS() at chschd.c:121 0x8001664
0x20000b28
Thread [1] 536873664 (main : : WTOREVT) (Suspended : User Request)
0x8000ee8
chSchGoSleepTimeoutS() at chschd.c:190 0x800174e
chEvtWaitOneTimeout() at chevents.c:451 0x80033c8
main() at main.c:657 0x8015f26
gdb
The following is my openOCD console log. Note one range of problem addresses is the same range as at the end of the first thread above.
Code: Select all
openOCD console
--------------------
Open On-Chip Debugger 0.7.0-dev-g4e00135 (2012-10-10-11:00)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
adapter speed: 500 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : clock speed 500 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x08000ee8 psp: 0x20000ab0
cortex_m3 interrupt mask auto
background polling: on
TAP: stm32f1x.cpu (enabled)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x08000ee8 psp: 0x20000ab0
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
Info : accepting 'gdb' connection from 3333
Info : device id = 0x20036410
Info : flash size = 128kbytes
Warn : acknowledgment received, but no packet pending
Auto-detected RTOS: ChibiOS
Info : Successfully loaded memory map of ChibiOS/RT target running version 2.5.1
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0xaa52432b
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x55555556
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0xaa52432b
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x55555556
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0xaa52432b
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x55555556
Error: JTAG-DP STICKY ERROR
Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0xaa52432b
It is run on an STM32F103RB so no FPU and some of those addresses do look abnormal.
It was run with an Olimux usb JTAG. Note I do not normally run the JTAG at 500k, just tried it to see if it made any difference.
I hope that this helps.
Regards saraben