Skip to content

Flash via StLink Utilities

reed-dan edited this page Feb 6, 2024 · 5 revisions

Download

It is very annoying to download anything from st official website, so please download it from here it is verified to work.

Driver

The new version of st link utilities have the correct st link drivers included so just install it when you are asked to

Unlock

If this is your first time flashing the board, it is probably locked, when you press connect in st link utilities it will say read flash failed disable readout protection and retry

abdosalm_1-1691592707345

Now on the menu go to Target->Option Bytes and change Readout Protection from Enabled to Disabled.

image image

After you press apply it will error says option byte write failed please reset target

image

But it was actually successful, so do not reset just press connect again and now it will read the flash which is all ffff because it is erased after unlock

Flashing

On the menu select File -> Open File to open your hex or bin file, it should display a popup says the file is not downloaded to target do you want to do it, just confirm it and the flashing is complete.

image image

If you did not see the popup you can try to upload image manually, but it will most likely fail, because again the latest st link utilities is bugged, see issues to resolve it.

image

Issues

The latest version of st link utilities have problem connecting to stlink, if you faced the same issue, please download this version instead

image

Warning: Use the stlink driver from latest version, or you will encounter a bug in windows that says the driver is not signed even when testsigning is on.