I am running OpenOCD through Eclipse on an STM32F103VD via an ARM_USB_OCD_H Jtag. When I open it all works well and this is the console output:
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Info : only one transport option; autoselect ‘jtag’
1000 kHz
adapter_nsrst_delay: 100
jtag_ntrst_delay: 100
cortex_m3 reset_config sysresetreq
Info : max TCK change to: 30000 kHz
Info : clock speed 1000 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
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)
However, when I attempt to start a debug session this is appended to the console output, and OpenOCD terminates:
Info : device id = 0x10036414
Info : flash size = 0kbytes
Assertion failed!
Program: C:\openocd\bin\openocd-0.6.0-dev-120229143915.exe
File: …/…/…/…/src/flash/nor/stm32f1x.c, Line 997
Expression: num_pages > 0
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application’s support team for more information.
The problem appears to be that OpenOCD has decided that the device has no flash so aborts.
The setup has worked successfully for a long time, and I am not aware of any changes to cause the problem. I have tried different target boards, running on different PC’s and swapping Jtag dongles to no effect.
Can anyone suggest what is happening?