stlink-tool-rs

Crates.iostlink-tool-rs
lib.rsstlink-tool-rs
version0.2.0
sourcesrc
created_at2023-03-11 08:02:59.853074
updated_at2023-03-11 08:14:36.705063
descriptionA tool to flash chinese ST-link dongles
homepagehttps://github.com/MadsAndreasen/stlink-tool-rs
repository
max_upload_size
id807084
size39,324
Mads Andreasen (MadsAndreasen)

documentation

README

stlink-tool-rs

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-rs [options] firmware.bin
Options:
	-p	Probe the ST-Link adapter
	-h	Show help

stlink-tool-rs has been tested under Linux.

Compiling

Prerequisite - Rust toolchain.

cargo build

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 :

Thanks

This is a reimplementation in rust of https://github.com/UweBonnes/stlink-tool/tree/stlinkv21 Mainly for the purpose of learning some Rust, with a real project.

Commit count: 0

cargo fmt