why is it necessary to connect the NRST of my MCU to the ST-Link? I have no problem connecting to the target with the ST-Link utility but I do have problem flashing/debugging when I use SW4STM32. Well, problems is an understatement: it’s impossible.
My target is the infamous STM32 Blue Pill (STM32F103C8T6). The reset pin is exposed, but on the 4-pin SWD connector (has gnd, swio, swclk, and 3.3V).
The ST-Link utility is clearly able to reset/half the target via some SWD commands, it seems. I believe openocd supports that as well. See http://openocd.org/doc/html/Reset-Configuration.html
Has somebody got a clue whether it’s working? If so, where would I add the openocd options to switch from hardware reset (via NRST) to emulation reset (via SWD commands)?