Small ST-Link design that can open VCP and program your STM32's

Similar projects worth following
Even the original ST-Link V2 is could be expensive for students that wants to learn how to program their STM32 MCU's. And V2 doesn't even have VCP builtin. So if you want to debug your project and program the MCU at the same time, there is not much way to do it. You must either buy a ST-Link V2.1 or buy one cheap Chinese ST-Kink V2 and FTDI board. That option is using 2 USB ports.
These problems are very annoying when you have to finish the project in short period of time.

That's why I designed this PCB. It has VCP and SWD.

PCB is manufactured with OSHPark and their after dark color option. And it looks soo cool.

The design is also compatible with SOICbite that Simon Merrett designed.

There is couple of ST-Link V2.1 hex files on the Internet. 

All of them have update problem. I will upload the .hex file I'm using after tests. 

Lets see if I can find easy to update .hex file.

Updated Version

x-zip-compressed - 467.04 kB - 07/06/2020 at 08:06


  • 1 × STM32F103CBTx Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 20 × 0402 passives
  • 1 × 3216 8mHz Crystal
  • 1 × Sot32-5 3.3V Voltage Regulator
  • 1 × Micro USB Connector

  • First Test

    Emre Özkan07/06/2020 at 07:38 0 comments

    The first test was unsuccessful. After the assembly, there was no magic smoke(There is a 22r resistor in the middle of the PCB because I forgot to order them in 0402 packages). But the USB port was not working. Not even "USB Device Not Recognized" error appeared. 

    Then I checked the schematic and I realized there was no PullUp resistor in the USB data line. When I add the PullUp resistor, there was a "USB Device Not Recognized" error, which is nice because this error will be gone when we program the MCU with ST-Link firmware.
    I did update the schematic file with the correct PullUp resistor.

    However, there is still one problem. The programmer stops working after some time. I will search for fixes for this problem, after that will send the new Gerber files to OshPark. 

  • First boards are arrived

    Emre Özkan07/03/2020 at 12:46 0 comments

    First design is arrived today. I'll assemble one board. If it works correctly, I can assemble other PCB's.

View all 2 project logs

Enjoy this project?



minh7a6 wrote 07/22/2020 at 16:47 point

Nice Project you did there. I have been implementing stlink into my custom design. There are 2 things you may need to consider: 

1. Adding the entire USB enumeration circuitry. The STLink v2-1 has some type of firmware updating mechanism that needs some of shutting down the pull up resistor and opening it up, unless you have the bootloader of STLink V2B on some of discovery board, simply pulling up usb d+ can cause you in the long run for future STLink firmware.

2. Breaking out SWO pin. This pin has proven to be useful for debugging outside of Arduino world with printf. We can debug with UART but that I would say more acceptable for big loop. If we are using RTOS, UART can be harmful if the developer does not implement uart transmit carefully.

  Are you sure? yes | no

Emre Özkan wrote 07/23/2020 at 06:31 point

Yes, when I test the STLink firmware there is always "Update the STLink Firmware" warning. I will search for that USB d+ line things.
Thank you for your SWO advice. I will try to add that. But maybe in the v3 because v2 is already shipped by the OshPark.

  Are you sure? yes | no

Mike Szczys wrote 07/07/2020 at 16:07 point

Nice and small, looks great. I'm glad you got it working with the bodge resistors!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates