View this project on CADLAB.io.
JTAG (20-pin) to SWD adaptor (6-pin or 4-pin).
Pay attention which side the female 20-pin and male 4/6-pin headers solder to: they should point in opposite directions.
Also pay attention to which way the key is orientated on the 20-pin header.