This SWD Adapter was created to avoid the need for 2.54 pitch connectors on the boards and to have a standard way of supporting a debug environment with the mini version of ST-Link v2.
The form factor above is made narrow to allow it to be connected to a Hat that is in the middle of a mounted stack. The square version below is the same with a different form factor. These are PCB’s with two connectors that can be soldiered for hand, so they are designed to be dead cheap in volume and will be adapted to various boards.
I have used this for a while myself and it makes development on these boards a lot easier. The standard uses 10 pins, but keep in mind that only 4 of those (SWCLK, GND,SWDIO and RESET) are required. 5V/3.3V is just added for convenience. The serial port is nice, but might need to be dropped on some boards.