Openocd does not work as expected - Solved
I have just solved this problem working on Ac6 SW for STM32:
- the Blue Pill board:
http://www.ebay.de/itm/Arduino-IDE-kompatibles-Board-STM32-STM32f103C8T6-ST-ARM-32-bit-Cortex-M3-039-/221812183158?hash=item33a5095076:g:tI4AAOSwHnFVj5Aq
- the adapter St-Link/V2:
http://www.ebay.de/itm/ST-LINK-V2-ST-LINK-STM8-STM32-kompatibler-Emulator-USB-Programmer-Debugger-/171689684649?hash=item27f980aea9:g:iTsAAOSwMmBVpNes
One can find a lot of useful information (inclyding the schematic and the detailed board layout with explanations) at
Blue Pill - STM32F103C8T6 Board - STM32duino wiki:
http://wiki.stm32duino.com/index.php?title=Blue_Pill
I read somewhere in this forum that this budget St-Link/V2 adapter does not assert the low level on its RST pin, so connecting it to NRST pin of the STM32 MCU is useless. (By the way, when you use official St-Link/V2 adapter, for the hardware reset you need to connect its NRST pin (pin 15 of the 20-pin connector) to NRST pin of the MCU, in case of STM32F103C8T6 - to pin 7. On the Blue Pill board it is marked "R").
Many recommend to edit .cfg file in your project directory to change
reset_config srst_only srst_nogate connect_assert_srst
to
reset_config none
to use software system reset.
However, the latest version of Ac6 SW for STM32 I started to work with offers the easiest option to set the software system reset. Go to the menu
Run->Debug Configuration
In the tab "Debug" set the radio button of "Configuration Script" to "User Defined" and press the button "Show Generator Options...". There change "Hardware Reset" to "Software System Reset". This will automatically change the line in .cfg script to "reset_config none". Press Apply and Close.
After this, my Blue Pill board started to work, and it can be debugged!