Today I found out how to “flash” blank STM32F103xC to make STLINK V2 debugger interface.
So, instead of desoldering from Discovery board to make miniture STLINK debug interface:
it’s possible to solder blank (or any) STM32F10x with USB and at least 64k flash + 20k RAM, program it with STLINK V2 Firmware and use your new USB dongle for debugging STM32 or STM8 devices.
First make single sided PCB as described here.
What you will need is a copy of STLINK V2 HEX (available in this keil uVision project in the folder ./Objects) or Binary image of the STLinkV2.J16.S4 image for writing in the microcontroller. Here is is the complete project in keil uVision. Just install free evaluation copy of Keil tools or free version for STM, open the project, connect the debug interface to the pads iC (SCLK) and iD (SDIO) and program the STM32F10x.
After writing the flash it is possible to upgrade to newest version of STLINK V2. Just install STLINK firmware upgrade, e.g. stlink-V2.J21.S4 and perform the update: