Making your own ST-LINK V2 from STM32 Blue-Pill or STM32 Black-Pill

In this article I will explain how to create your own ST-LINK V2 with cheap board from China (Blue Pill).

Well we also need USB to Serial converter and some software. First we will look at software. We need so called “Flash Loader Demonstrator“, you can get it at the bottom of this page, or for your convenience on this link, because getting it from ST can be quite a challenge. We need ST-LINK Utility, which contains drivers we will need later, you can get it here on the bottom of the page or again for convenience here on my page. We also need .hex file for uploading into microcontroller, you can find it here. I got .hex file from Mare & Gal’s web page.

Now let’s prepare the hardware. We need to set jumper BOOT0 to 1. We also need to connect our USB to serial adapter as the diagram below:

Be careful to set adapter voltage to 3.3V!!!

Now we run Flash Loader Demo, which I won’t explain how to install, because it is very straightforward. You are presented with this window:

Here we select proper COM port and click Next. You are presented with this window, if not, maybe you connected RX and TX wrong or the BOOT jumpers are at the wrong position:If you programmed this board before, you might have to remove protection. Click Next and you are here, just click Next:Here you click on the icon marked green and browse to your stlink.hex file and click Open:
 And then click Next and the Loader will start to download program the microcontroller:

Adn then it will also start to verify it:And finally it will say it is done:But we are not done yet. Now we disconnect everything and connect our board to computer with micro USB cable and also move the BOOT0 jumper back to 0. Now we start ST-LINK Utility, select ST-LINK -> Firmware update:

New window opens and here we click on Device Connect and it will connect to our new ST-LINK:Now click on Yes and it will start to upgrade:When it’s done it will let us know:

Now all we need to do is test it. I am testing it according to diagram below with another Blue Pill (don’t miss that short connection between PB12 and PB14!!!):All we need to test if it works is to click on Target -> Connect:

Ifeverything is ok you should get target connected to your new ST-LINK:


Have fun with your new toy! Thank you for reading!

P.S.: In the title I mentioned Black Pill, it is same for it, just find the proper pins.



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.