ST-LINK between two Discovery Boards

I’ve been using the STM32F4 Discovery board for prototyping SmartMic. This board has an ancillary STMF103 ARM3 (U2) that is used to debug the STM32F4 via the ST-LINK interface, which allows me to use gdb, flash the STM32F4 and support semi-hosting for development.

I want to use this same ARM3 to debug SmartMic, i.e. use the Discovery board as a STLINK “pod” for custom STM32F4 designs. To test this idea I used the ARM3 on one Discovery board to debug a STM32F4 on a second Discovery board. It worked quite well, here’s how I did it:

1. Remove CN3 jumpers from both Discovery boards.

2. Make the following connections:

Signal Host Discovery CN2 STM32F4 Under Test
SWCLK pin 2 PA14
GND pin 3 GND
SWDIO pin 4 PA13

Note just three wires are required, so a little bit simpler than JTAG. I added one extra wire to allow the Host Discovery to supply 5V power to the DUT.