Log output attached. After reconnect stm32 (f0 - f7) unable to operate device, because it into undefinishion state. I try jlink v9, jlink v6 and stlink v2 and it was same. It may unable to connect gdb at the furst time
Reproduction steps:
run openocd -f interface/jlink.cfg -c 'transport select swd' -f target/stm32f1x.cfg
output into attached first_connection.log
run gdb gdb-multiarch -ex 'target remote :3333'
and look up this message
Remote debugging using :3333 Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=3fff;qXfer:memory-map:read+;qXfer:features:read+;qXfer:threads:read+;QStartNoAckMode+;vContSupported+
Other way to solve this problem - after openocd running, connect to it via telnet and run halt command: echo "halt"| telnet localhost 4444
On my opinin, the way to solve this problem is send reset command after device connect
Isn't target/stm32f1x.cfg already doing a reset of the target early on?
https://repo.or.cz/openocd.git/blob/HEAD:/tcl/target/stm32f1x.cfg#l72