ntfreak:
For swd support the best way at the moment is stlink or versaloon. The swd patches you mention are still wip and to slow as a daily driver.
I suppose another possibility would be to reflash your stlink as a BMP - https://github.com/gsmcmullin/blackmagic
Cheers
Spen
Spen … Nice advice.
I had a chat with Uwe B , and mailed the schematic of the STM8S-Discovery Programmer-part (also a st-linkv1 variant)
Uwe just happened to have a STM8S-Discovery in the drawer …
And just did a port (new platform) of Blackmagic Probe (BMP) to the programming dongle on a STM8S-Discovery, and named it swlink.
The reason to include the extra port was that, the STM8S programmer has the F103 jtag pins accesible by a 0.1" header. This makes uploading a new firmware to the board with a “Normal Arm Jtag” (i used at ftdi 2232 variant) , very simple.
Due to the easy access to the the F103 jtag pins , this one can also do normal Jtag.
So when using it as a BMP, this is the only “Discovery ST-Link” version that can be used as both a swd, and a Jtag.
This means that the STM8S dongle can do Uart/JTAG and SWD.
It is pre-cut and easily breakable from the STM8 targetboard , and it is cheap.
Uwe guided me through building the dfu-loader and the BMP firmware
Uwe wrote
********** Snip ************
Check out https://github.com/UweBonnes/blackmagic
compile like make PROBE_HOST=swlink (in the blackmagic dir)
load resulting blackmagic_dfu(|.bin|.hex) file to 0x08000000 , and load blackmagic(|.bin|.hex) file to 0x08002000
or use dfu-util -s 0x08002000:leave -D blackmagic.bin after loading of the bootloader.
dfu-util is located at from git://gitorious.org/dfu-util/dfu-util.git
TRACESWO is not yet adapted, but should be doable.
********** Snip ************
See https://github.com/UweBonnes/blackmagic … ink/Readme + platform.c/h , for pinout info & bootloader info
CN5 CN7
JTAG/OUT UART
SWD+TRACESWO UART
JTAG/IN Pin 3/4 shorted when started: Force Bootloader
SWD
TCK gets SWCLK
TMS gets SDDIO
https://github.com/UweBonnes/blackmagic
https://github.com/UweBonnes/blackmagic … rms/swlink
I used the launchpad arm-gcc - gcc-arm-none-eabi-4_7-2012q4 , and it’s a tight fit …
I had to modify the -O2 to -Os in the src/Makefile before being able to link it.
I haven’t had the time to test the dongle (have on-call duty this weekend) , but it dfu-loaded ok , and reports back as a BMP.
This is a nice addition to the toolbox , as my biggest problem with Versaloon & OOCD was that one of them always was out of sync
… As in oocd comitted new patches and Simon didn’t tell witch oocd revision his versaloon pathch was made against.
Black Magic Probe has the OOCD part onboard the “Probe” so all you need is a working arm-none-eabi-gdb , the you have a working jtag/swd dongle.
It might not be as general or versatile as oocd , but you’ll always have the ability to flash your arm , if it’s known to BMP.
This is going to be my “rescue dongle” 
Edit: A bit more ino http://embdev.net/articles/STM_Discover … agic_Probe
CN5 JTAG Conn
--------------
JRST - o o - GND
JTDI - o o - JTMS/SWDIO
JTCK/SWCLK - o o - JTDO
o - +3v3
/Bingo