stlink/doc/man/st-flash.1

90 wiersze
1.8 KiB
Groff

.\" Automatically generated by Pandoc 2.9
.\"
.TH "st-flash" "1" "Feb 2018" "Open Source STMicroelectronics Stlink Tools" "stlink"
.hy
.SH NAME
.PP
st-flash - Flash binary files to STM32 device
.SH SYNOPSIS
.PP
\f[I]st-flash\f[R] [\f[I]OPTIONS\f[R]] {read|write|erase}
[\f[I]FILE\f[R]] <ADDR> <SIZE>
.SH DESCRIPTION
.PP
Flash binary files to arbitrary sections of memory, or read arbitrary
addresses of memory out to a binary file.
.PP
You can use this instead of st-util(1) if you prefer, but remember to
use the \f[B].bin\f[R] image, rather than the \f[B].elf\f[R] file.
.PP
Use hexadecimal format for the \f[I]ADDR\f[R] and \f[I]SIZE\f[R].
.SH COMMANDS
.TP
write \f[I]FILE\f[R] \f[I]ADDR\f[R]
Write firmware \f[I]FILE\f[R] to device starting from \f[I]ADDR\f[R]
.TP
read \f[I]FILE\f[R] \f[I]ADDR\f[R] \f[I]SIZE\f[R]
Read firmware from device starting from \f[I]ADDR\f[R] up to
\f[I]SIZE\f[R] bytes to \f[I]FILE\f[R]
.TP
erase
Perform a mass erasing of the device firmware
.TP
reset
Reset the target
.SH OPTIONS
.TP
--version
Print version information
.TP
--debug
TODO
.TP
--reset
TODO
.TP
--opt
Enable ignore ending empty bytes optimization
.TP
--serial \f[I]iSerial\f[R]
TODO
.TP
--flash=fsize
Where fsize is the size in decimal, octal, or hex followed by an
optional multiplier `k' for KB, or `m' for MB.
Use a leading \[lq]0x\[rq] to specify hexadecimal, or a leading zero for
octal.
.SH EXAMPLES
.PP
Flash \f[C]firmware.bin\f[R] to device
.IP
.nf
\f[C]
$ st-flash write firmware.bin 0x8000000
\f[R]
.fi
.PP
Read firmware from device (4096 bytes)
.IP
.nf
\f[C]
$ st-flash read firmware.bin 0x8000000 0x1000
\f[R]
.fi
.PP
Erase firmware from device
.IP
.nf
\f[C]
$ st-flash erase
\f[R]
.fi
.SH SEE ALSO
.PP
st-util(1), st-info(1)
.SH COPYRIGHT
.PP
This work is copyrighted.
Stlink contributors.
See \f[I]LICENSE\f[R] file in the stlink source distribution.