st-flash(1) | stlink | st-flash(1) |
st-flash - Flash binary files to STM32 device
st-flash [OPTIONS] {read|write|erase} [FILE] <ADDR> <SIZE>
Flash binary files to arbitrary sections of memory, or read arbitrary addresses of memory out to a binary file.
You can use this instead of st-util(1) if you prefer, but remember to use the .bin image, rather than the .elf file.
Use hexadecimal format for the ADDR and SIZE.
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
This work is copyrighted. Stlink contributors. See LICENSE file in the stlink source distribution.
Feb 2018 | Open Source STMicroelectronics Stlink Tools |