Regarding the symptoms:
I used the current tools (Eclipse Luna + ARM GCC toolchain + OpenODB 0.7.0, my PC runs Windows 8.1) until a few days ago, when suddenly I was unable to flash the microcontroller.
I did the usual stuff - rollback updates, re-installing tolls, and so on, to no avail. I know I am generating correct code and I am able to load it through ST Microelectronics flash loader demonstrator (http://www.st.com/st-web-ui/active/en/c … s/PF257525)
Then I started digging and I found that OpenOCD has trouble communicating with the target microcontroller.
-
- Started OpenOCD manually –> OK;
-
- Launched telnet on localhost:4444 to control OpenOCD –> OK;
-
- Tried “soft_reset_halt” → OK
(Output:
requesting target halt and executing a soft reset
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc)
-
- Tried “reset halt”;
-
- At this point, OpenOCD fails connection with ZWIR4512 devkit, polling the device with increasing timeout, never achieving reconnection (see LOG #1 below).
-
- Quitting OpenOCD and launching it again, connection is regained and one can see the device is, in fact, halted.
So is seems there is something quite wrong in the link OpenOCD<->STM32F1. I can issue some commands, but others fail miserably.
Any ideas of what is going on here? Any patch/workaround?
I would appreciate any hints that can put me in the right track.
Ricardo
===== LOG #1 =======
Open On-Chip Debugger 0.7.0 (2015-01-12-17:02)
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: 1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
force hard breakpoints
Info : device: 4 “2232C”
Info : deviceID: 67330064
Info : SerialNumber: A
Info : Description: Dual RS232 A
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: 0x06414041 (mfg: 0x020, part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
requesting target halt and executing a soft reset
target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
Info : accepting ‘telnet’ connection from 4444
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020, part: 0x6414, ver: 0x0)
Warn : Invalid ACK 0 in JTAG-DP transaction
in procedure ‘reset’
Error: stm32f1x.cpu – clearing lockup after double fault
Polling target stm32f1x.cpu failed, GDB will be halted. Polling again in 100ms
Error: stm32f1x.cpu – clearing lockup after double fault
Polling target stm32f1x.cpu failed, GDB will be halted. Polling again in 300ms
Error: stm32f1x.cpu – clearing lockup after double fault
Polling target stm32f1x.cpu failed, GDB will be halted. Polling again in 700ms
Error: stm32f1x.cpu – clearing lockup after double fault
Polling target stm32f1x.cpu failed, GDB will be halted. Polling again in 1500ms
Error: stm32f1x.cpu – clearing lockup after double fault
Polling target stm32f1x.cpu failed, GDB will be halted. Polling again in 3100ms
Error: stm32f1x.cpu – clearing lockup after double fault
Polling target stm32f1x.cpu failed, GDB will be halted. Polling again in 6300ms
Error: stm32f1x.cpu – clearing lockup after double fault
Polling target stm32f1x.cpu failed, GDB will be halted. Polling again in 6300ms