Turn an STM32F103C8T6 (BluePill) into an STLink Programmer

It is relatively easy to turn an STM32F103C8T6 (BluePill) into an STLink programmer. All that is needed is a copy of the STLink firmware and a means to flash it. Do a search for STLinkV2.J16.S4 and download it. Flash that binary file into the STM32F103C8T6.

See my other post HERE on the STM32F103C8T6 as it mentions several methods to program (flash) it.

I have several ST-Link programmers so I used the stlink utilities program called st-flash and  flashed it via:

st-flash --debug write STLinkV2.J16.S4.bin 0x8000000

The new STM32F103C8T6 STLink can then be upgraded to the latest firmware version from https://www.st.com.

Here is the wiring diagram on how to connect the new STM32F103C8T6 STLink programmer to another STM32F103C8T6 to program it:

BluePill as an Stlink ProgrammerDownload the Fritzing Diagram from HERE. Actually, the capacitor and 4k7 resistors on the right side of the diagram are not needed (it works fine without them). It also works without the NRST to B0 jumper.

The minimal wiring looks like this:

STM32F103C8T6 as an ST-LINK


Skip to comment form

  1. Is the NRST connection required? The generic STM32 SWD programmer only needs the 4 wires, not NRST. I thought this would be the same.

      • earl on February 28, 2019 at 4:59 am
      • Reply

      Originally I thought it was required and did not work without it. However, I have done more testing and it does work without the NRST jumper.

    • HDN on March 18, 2020 at 9:36 am
    • Reply

    if we use SWO then what is the pin on this programmer to connect the SWO pin

    1. Take a look at the graphic (https://microcontrollerelectronics.com/wp-content/uploads/2018/05/BluePill_as_Stlink.png) in the post. It labels all the pins on the STM32F103C8T6 programmer and the STM32F103C8T6 being programmed.

    • Thinh on October 6, 2020 at 6:40 pm
    • Reply

    Can i program stm8 from bluepill as stlink?

      • earl on October 7, 2020 at 7:47 am
      • Reply

      The STM8 uses the SWIM protocol so you would need to connect different pins than what is show in this diagram.

    • Anbu on April 21, 2024 at 11:13 pm
    • Reply

    Is there any latest firmware available for this?

Leave a Reply

Your email address will not be published.