1
0
Fork
You've already forked stlink-tool
0
Firmware uploader for ST-Link
  • C 98.5%
  • Makefile 1.5%
Find a file
2026年06月11日 15:23:37 +02:00
docs Fixing typo 2018年03月17日 11:57:59 +01:00
src Add stlink_wipe function declaration 2026年06月11日 15:23:37 +02:00
tiny-AES-c @ddd84d3787 Initial commit 2018年01月20日 21:34:48 +01:00
.gitignore Initial commit 2018年01月20日 21:34:48 +01:00
.gitmodules Initial commit 2018年01月20日 21:34:48 +01:00
Makefile reposition LDFLAGS 2019年01月30日 19:53:32 +00:00
README.md Add link to sakana280 fork 2020年06月10日 18:27:41 +02:00

stlink-tool

libusb tool for flashing chinese ST-Link dongles. Please note that similarly to ST's updater, the uploaded firmware won't replace the bootloader (meaning that you should be able to reflash the original afterwards using ST's firmware update utility).

Usage: ./stlink-tool [options] firmware.bin
Options:
	-p	Probe the ST-Link adapter
	-h	Show help

stlink-tool has been tested under Linux and macOS. With sakana280's fork you can use it under Windows.

Compiling

Required dependencies :

  • C compiler (both clang and gcc seems to work great)
  • libusb1
  • git
git clone https://github.com/jeanthom/stlink-tool
cd stlink-tool
git submodule init
git submodule update
make

Firmware upload protocol

ST's firmware upload protocol is USB's DFU protocol with some twists. Every DFU command is issued with the 0xF3 prefix, and the command set does not exactly match USB's.

Some documentation :