Flashing and debugging of externally compiled program
I'm sorry, I selected STM32F103VCTx of course. The rest of type string is not interesting in my opinion because describes mcu package. It is not related to debug configuration:)
So, your guide works for me for STM32L Discovery board (st-link v2 and built-in mcu).
Then, I made a progress with my custom board. The openocd script was missing in debug configuration. I created my own related to my board:
source [find interface/stlink-v2.cfg] source [find target/stm32f1x_stlink.cfg] # use hardware reset, connect under reset reset_config srst_only srst_nogate
I received next error message:
Error in final launch sequence Failed to execute MI command: load "" Error message from debugger back end: Error erasing flash with vFlashErase packet Error erasing flash with vFlashErase packet
I found a forum topic dealing this issue. When I tried change reset_config to none received error message:
Error in final launch sequence Failed to execute MI command: -target-select remote localhost:3333 Error message from debugger back end: localhost:3333: The system tried to connect the unit to the directories on a drive attached to them. (Translation from my native language!)
In the same topic it is noted the problem could be caused by openocd version with a bug (1.6). So, I revert to openocd version 1.3 and no changes. Next change of reset_config configuration did not provide additional progress.