.\" Automatically generated by Pandoc 2.4 .\" .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]] .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 .B 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 .B 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 .B erase Perform a mass erasing of the device firmware .TP .B reset Reset the target .SH OPTIONS .TP .B \-\-version Print version information .TP .B \-\-debug TODO .TP .B \-\-reset TODO .TP .B \-\-serial \f[I]iSerial\f[R] TODO .TP .B \-\-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 4096 \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.