st-flash(1)
π st-flash β the manual page, bestie edition π
okay so this is st-flash, and it lives in the stlink manual family. literally what it does is flash binary files onto your STM32 device. that's the whole vibe. β¨
πΈ NAME πΈ
st-flash β Flash binary files to STM32 device π«Ά
β¨ SYNOPSIS β¨
st-flash [OPTIONS] {read|write|erase} [FILE] <ADDR> <SIZE>
π¦ DESCRIPTION π¦
So here's the tea, bestie: this thing flashes binary files into arbitrary sections of memory, or reads arbitrary addresses of memory out into a binary file. both directions. iconic. π
You can use this instead of st-util(1) if that's more your vibe, but listen β use the .bin image, not the .elf file. that part matters, no cap.
And use hexadecimal format for the ADDR and the SIZE. like, hexadecimal. that's the format. periodt. π
π COMMANDS π
writeFILE ADDR β Write firmware FILE to device starting from ADDR πreadFILE ADDR SIZE β Read firmware from device starting from ADDR up to SIZE bytes, out to FILE πeraseβ Perform a mass erasing of the device firmware πresetβ Reset the target π
π OPTIONS π
--versionβ Print version information π·οΈ--debugβ TODO (yeah bestie, that's literally all it says, the authors left it as a TODO, we don't make the rules) π--resetβ Trigger a reset both before and after flashing β¨--optβ Enable ignore ending empty bytes optimization π§--serialiSerial β TODO (also just a TODO, fr fr) π--flash=fsize β Where fsize is the size in decimal, octal, or hex, followed by an optional multiplierkfor KB, ormfor MB. Use a leading0xto specify hexadecimal, or a leading zero for octal. π’
π EXAMPLES π
Flash firmware.bin to device π
$ st-flash write firmware.bin 0x8000000
Read firmware from device (4096 bytes) π
$ st-flash read firmware.bin 0x8000000 0x1000
Erase firmware from device π
$ st-flash erase
π SEE ALSO π
st-util(1), st-info(1) β go read those too, bestie, they're part of the friend group π«Ά
π COPYRIGHT π
This work is copyrighted. Stlink contributors. See LICENSE file in the stlink source distribution. π
okay that's the whole page, you're officially fluent in st-flash now. go flash something responsibly (and in hex, always in hex). π¦β¨
this one came from the stlink crew β that's the "Open Source STMicroelectronics S..." situation β and it's dated Feb 2018. mwah. bye bestie! ππ
π¦ where this page comes from
- alpine 3.24: stlink-doc 1.8.0-r1 Β· MIT
- arch rolling: stlink 1.9.0-1 Β· BSD-3-Clause
- debian bookworm: stlink-tools 1.7.0+ds-1 Β· BSD-3-Clause
- debian trixie: stlink-tools 1.8.0-1.1 Β· BSD-3-Clause
- epel 9: stlink 1.7.0-6.el9 Β· BSD
- fedora 43: stlink 1.8.0-3.fc41 Β· BSD-3-Clause
- fedora 43: stlink 1.8.0-3.fc41 Β· BSD-3-Clause
- fedora 44: stlink 1.8.0-3.fc41 Β· BSD-3-Clause
- fedora 44: stlink 1.8.0-3.fc41 Β· BSD-3-Clause
- nixos 26.05: stlink 1.8.0
- nixpkgs unstable: stlink 1.8.0
- opensuse-leap 16.0: stlink 1.8.0-bp160.1.12 Β· BSD-3-Clause
- opensuse-leap 16.0: stlink 1.8.0-bp160.1.12 Β· BSD-3-Clause
- opensuse-leap 16.0: stlink 1.8.0-bp160.1.12 Β· BSD-3-Clause
- opensuse-leap 16.0: stlink 1.8.0-bp160.1.12 Β· BSD-3-Clause
- ubuntu jammy: stlink-tools 1.7.0+ds-1 Β· BSD-3-Clause
- ubuntu noble: stlink-tools 1.8.0-1build2 Β· BSD-3-Clause
- ubuntu questing: stlink-tools 1.8.0-1.1
- ubuntu resolute: stlink-tools 1.8.0-1.1build1 Β· BSD-3-Clause
- ubuntu stonking: stlink-tools 1.8.0-1.1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms