I'm trying connect to a Nucleo STM32F072 board using the SWD interface.
I can program the board with the blink program but I need to disconnect the SWD cable after programming every time and connect a different cable (USB) to power the board to test the new program.
What I would like to know, is it a matter of wrongly connecting the 2 connectors or is it a bug in the Chinese clone programmer?
EDIT:
I am using the Arduino IDE to compile
The .ELF file is located in linux directory: /tmp/arduino_build_XXXXXX
STM32CubeProgrammer is used to program the device
ST-Link_V2_clone to SWD pinout
Re: ST-Link_V2_clone to SWD pinout
Just use ST-Link that's on Nucleo board.
Re: ST-Link_V2_clone to SWD pinout
Maybe I should have mentioned that the board is also a clone. 
I tried programming using the USB port a few times and noticed that it is not reliable. Since I am using a much shorter USB cable (about. 10", 25cm), performance has improved.
Using USB, I have to press the buttons boot0-down reset-down reset-up boot0-up before it accepts a new program.
I would like to find a way to program by just running a PC program instead of clicking buttons on the hardware. That is why I started to experiment with SWD.

I tried programming using the USB port a few times and noticed that it is not reliable. Since I am using a much shorter USB cable (about. 10", 25cm), performance has improved.
Using USB, I have to press the buttons boot0-down reset-down reset-up boot0-up before it accepts a new program.
I would like to find a way to program by just running a PC program instead of clicking buttons on the hardware. That is why I started to experiment with SWD.