Skip to content

Instantly share code, notes, and snippets.

@tstellanova
Last active August 12, 2023 13:27
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tstellanova/434b0205084756babf3447b58eb6a066 to your computer and use it in GitHub Desktop.
Save tstellanova/434b0205084756babf3447b58eb6a066 to your computer and use it in GitHub Desktop.
Install st-link on raspberry pi
@Erol444
Copy link

Erol444 commented Dec 3, 2020

@Joypacharya I had a similar problem:

EraseFlash - Sector:0x4 Size:0x20000 2020-12-03T13:14:56 INFO common.c: Flash page at addr: 0x08020000 er                                                                                             ased
EraseFlash - Sector:0x5 Size:0x40000 2020-12-03T13:14:58 INFO common.c: Flash page at addr: 0x08040000 er                                                                                             ased
2020-12-03T13:14:58 INFO common.c: Finished erasing 6 pages of 262144 (0x40000) bytes
2020-12-03T13:14:58 INFO common.c: Starting Flash write for F2/F4/F7/L4
2020-12-03T13:14:58 INFO flash_loader.c: Successfully loaded flash loader in sram
enabling 32-bit flash writes
size: 32768
2020-12-03T13:14:59 ERROR flash_loader.c: flash loader run error
2020-12-03T13:14:59 ERROR common.c: stlink_flash_loader_run(0x8000000) failed! == -1
stlink_fwrite_flash() == -1

I had the st-link version st-flash 1.6.1-115-g8560f93-dirty (st-flash --version). I tried to checkout to version 1.6 and it worked!
Steps:

  • after cloning the repo, checkout to stlink version 1.6 sudo git checkout 6aa08a6
  • sudo make

I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment