.\" Automatically generated by Pandoc 2.1.1 .\" .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[] [\f[I]OPTIONS\f[]] {read|write|erase} [\f[I]FILE\f[]] .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[] image, rather than the \f[B].elf\f[] file. .PP Use hexadecimal format for the \f[I]ADDR\f[] and \f[I]SIZE\f[]. .SH COMMANDS .TP .B write \f[I]FILE\f[] \f[I]ADDR\f[] Write firmware \f[I]FILE\f[] to device starting from \f[I]ADDR\f[] .RS .RE .TP .B read \f[I]FILE\f[] \f[I]ADDR\f[] \f[I]SIZE\f[] Read firmware from device starting from \f[I]ADDR\f[] up to \f[I]SIZE\f[] bytes to \f[I]FILE\f[] .RS .RE .TP .B erase Perform a mass erasing of the device firmware .RS .RE .TP .B reset Reset the target .RS .RE .SH OPTIONS .TP .B \f[C]\-\-version\f[] Print version information .RS .RE .TP .B \f[C]\-\-debug\f[] TODO .RS .RE .TP .B \f[C]\-\-reset\f[] TODO .RS .RE .TP .B \f[C]\-\-serial\f[] \f[I]iSerial\f[] TODO .RS .RE .TP .B \f[C]\-\-flash=fsize\f[] 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. .RS .RE .SH EXAMPLES .PP Flash \f[C]firmware.bin\f[] to device .IP .nf \f[C] $\ st\-flash\ write\ firmware.bin\ 0x8000000 \f[] .fi .PP Read firmware from device (4096 bytes) .IP .nf \f[C] $\ st\-flash\ read\ firmware.bin\ 0x8000000\ 4096 \f[] .fi .PP Erase firmware from device .IP .nf \f[C] $\ st\-flash\ erase \f[] .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[] file in the stlink source distribution.