As you may know, ST also produces its own debugger/programmer called ST-Link. It supports JTAG and SWD interfaces. You can purchase an ST-Link USB adapter, but there is a better option if you are into STM32 microcontrollers and probably own one of the ST32 Discovery boards. Since I have STM32VLDiscovery nearby, this is how to program another STM32F103RBT6 board using only four wires.
![TM32VLDiscovery program another STM32F103RBT6 board](https://scienceprog.com/wp-content/uploads/2012/06/st32discovery_and_target_board.jpg)
On the discovery board, locate CN3 jumpers and disconnect them as they connect the discovery board to a debugger.
![CN3](https://scienceprog.com/wp-content/uploads/2012/06/ST32VLdiscovery_SWD_jumpers.jpg)
Then locate CN2 pins and connect them to target boards JTAG connector as follows:
![target boards JTAG connector](https://scienceprog.com/wp-content/uploads/2012/06/target_Jtag_connector.jpg)
- VDD (pin 1) to JTAG VCC (pin 1)
- SWCLK (pin 2) to JTCK (pin 9)
- SWDIO (pin 4) to JTMS (pin 7)
- GND (pin 3) to GND (pin 4)
Power both boards and open ST-Link utility. You can see that the Medium Density board has been detected.
![](https://scienceprog.com/wp-content/uploads/2012/06/ST-Link_target_detected.jpg)
Now you can load the binary file, and program microcontrollers Flash memory. Using the Target menu, you can perform additional operations similar to J-Flash.
![Target menu](https://scienceprog.com/wp-content/uploads/2012/06/ST-Link_target_menu.jpg)
An exciting feature of ST-Link is the MCU panel. You can do various things like Run code, halt, step, reset, core reset, and read core registers. You can treat this panel as a quick debugger
![ST-Link_Core_menu.jpg](https://scienceprog.com/wp-content/uploads/2012/06/ST-Link_Core_menu.jpg)
You will find a great tutorial in the user manual in ST-Link install location on your PC.
A couple more flashing methods: embedded bootloader and Using J-Link JTAG adapter