St-flash Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora And MacOS

St-flash Installation On A Debian, Ubuntu, Alpine, Arch, Kali, Fedora And MacOS

st-flash

Flash binary files to STM32 ARM Cortex microcontrollers.

Maintainer: Luca Boccassi



Section: electronics

Install st-flash

  • Debian apt-get install stlink-tools Click to copy
  • Ubuntu apt-get install stlink-tools Click to copy
  • Alpine OS apk add stlink Click to copy
  • Arch Linux pacman -S stlink Click to copy
  • Kali Linux apt-get install stlink-tools Click to copy
  • Fedora dnf install stlink Click to copy
  • macOS brew install stlink Click to copy

Flash binary files to STM32 ARM Cortex microcontrollers.

How to use st-flash?

Below are few example commands for st-flash that you can use in the terminal.

Read 4096 bytes from the device starting from 0x8000000:
st-flash read firmware.bin 0x8000000 4096Click to copy
Write firmware to device starting from 0x8000000:
st-flash write firmware.bin 0x8000000Click to copy
Erase firmware from device:
st-flash eraseClick to copy
Installing st-flash command is simple. just copy one of the above commands for your operating system and paste it into terminal. This command is available for Debian, Ubuntu, Alpine, Arch, Kali, Fedora and macOS operating systems. Once you run the command it will install the latest version of st-flash 2026 package in your OS.