ok panic over !!
I normally leave the boot0 jumper in the operational position and gdb server just works. I put the jumper to program mode, reset and then started openocd and there were no errors. I then replaced the usb loader with Blinky, went back to operational mode and everything is ok.
When the USB loader program was loaded and running, it was not possible to halt it and I got a load of errors.....
Info : stm32f103c8t6.cpu: external reset detected
Polling target stm32f103c8t6.cpu failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
Error: Error connecting DP: cannot read IDR
Error: Could not find MEM-AP to control the core
Examination failed, GDB will be halted. Polling again in 100ms
Error: Error connecting DP: cannot read IDR
Polling target stm32f103c8t6.cpu failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
Error: Error connecting DP: cannot read IDR
Error: Could not find MEM-AP to control the core
Examination failed, GDB will be halted. Polling again in 300ms
Error: Error connecting DP: cannot read IDR
Polling target stm32f103c8t6.cpu failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
Error: Error connecting DP: cannot read IDR
Error: Could not find MEM-AP to control the core
Examination failed, GDB will be halted. Polling again in 700ms
Error: Error connecting DP: cannot read IDR
Polling target stm32f103c8t6.cpu failed, trying to reexamine
Error: Error connecting DP: cannot read IDR
The upshot of all of this is I am not sure how to get this particular USB bootloader to work. It is recognised by my PC (win 10) and establishes a virtual com port which spews out messages every so often but nothing else shows up.
Why do you give a Linux-based example sith sudo and then start talking about a virtual com port?
I have a Raspberry pi running OpenOcd server connected to the STM32 and the PC (win)connects to the Pi.