st-flash

Flash binary files to STM32 ARM Cortex microcontrollers. More information: <https://github.com/texane/stlink>.

Install

All systems
curl cmd.cat/st-flash.sh
Debian Debian
apt-get install stlink-tools
Ubuntu
apt-get install stlink-tools
Alpine
apk add stlink
Arch Arch Linux
pacman -S stlink
image/svg+xml Kali Linux
apt-get install stlink-tools
Fedora
dnf install stlink
Windows (WSL2)
sudo apt-get update sudo apt-get install stlink-tools
OS X
brew install stlink
Docker
docker run cmd.cat/st-flash st-flash powered by Commando

Flash binary files to STM32 ARM Cortex microcontrollers. More information: <https://github.com/texane/stlink>.

  • Read 4096 bytes from the device starting from 0x8000000:
    st-flash read firmware.bin 0x8000000 4096
  • Write firmware to device starting from 0x8000000:
    st-flash write firmware.bin 0x8000000
  • Erase firmware from device:
    st-flash erase

© tl;dr; authors and contributors