
alexwhittemore has posted a detailed tutorial how to make an adapter: ST-Link/V2 SWD-JTAG adapter
The fantastic STM32 Discovery boards from ST Micro all come with an embedded ST-Link/V2 debugger onboard, including some jumpers to disconnect it from the target device for use as a standalone SWD debugger. Presumably, this is to allow for easy use debugging a custom end-product PCB, but it’s also useful if you have any other STM32 evaluation boards hanging around with no built-in debugger, but don’t happen to have a proper JTAG dongle handy. Here’s how to make an adapter.
It happens to be the case that I’ve got an STM3210E-Eval board I need to work on, but no compatible JTAG debugger handy. I do have a ton of Discovery boards, so now I just need an adapter to use the Serial Wire Debug capabilities on the STM3210E from my Discovery board.

I made the layouts available for a several small PCB’s to do just this.
You can download the OSHW gerbers for free and order your own from OSHpark.com
the design files for the 20 pin version are here :
http://www.patternagents.com/projects/JTAG20M-STLV2F.html
and the tiny, postage stamp, sized 10 pin version is here :
http://www.patternagents.com/projects/JTAG10M-STLV2F.html
best regards,
@patternagents