HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

st-flash — Flash binary files to STM32 ARM Cortex microcontrollers. More information: <https://github.com/stlin

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandfilescliflashst-flashstm32binaryarm

Problem

How to use the st-flash command: Flash binary files to STM32 ARM Cortex microcontrollers. More information: <https://github.com/stlink-org/stlink/blob/testing/doc/man/st-flash.md>.

Solution

st-flash — Flash binary files to STM32 ARM Cortex microcontrollers. More information: <https://github.com/stlink-org/stlink/blob/testing/doc/man/st-flash.md>.

Read 4096 bytes from the device starting from 0x8000000:
st-flash read {{firmware}}.bin 0x8000000 4096


Write firmware to device starting from 0x8000000:
st-flash write {{firmware}}.bin 0x8000000


Erase firmware from device:
st-flash erase

Code Snippets

Read 4096 bytes from the device starting from 0x8000000

st-flash read {{firmware}}.bin 0x8000000 4096

Write firmware to device starting from 0x8000000

st-flash write {{firmware}}.bin 0x8000000

Erase firmware from device

st-flash erase

Context

tldr-pages: common/st-flash

Revisions (0)

No revisions yet.