September 8, 2020

ST-flash software

I have been working with the little ST-link gadgets for several years now, but only recently discovered a package "stlink" that I can install on fedora

su
dnf install stlink
Installed: stlink-1.7.0-4.fc37.x86_64
To find out what this gives me:
/usr/bin/st-flash
/usr/bin/st-info
/usr/bin/st-trace
/usr/bin/st-util
/usr/lib/libstlink.so.1
/usr/lib/udev/rules.d/49-stlinkv1.rules
/usr/lib/udev/rules.d/49-stlinkv2-1.rules
/usr/lib/udev/rules.d/49-stlinkv2.rules
/usr/lib/udev/rules.d/49-stlinkv3.rules
I plug in the first st-link v2 dongle I have laying around (some cheap knockoff from China) into an available USB port and type this command:
st-info --probe
Found 1 stlink programmers
  version:    V2J17S4
  serial:     48FF71066780575624171567
  flash:      0 (pagesize: 0)
  sram:       0
  chipid:     0x0000
  descr:      unknown device
This software may also be found as "stlink-utils"

How to use it

The instructions to flash "dirty JTAG" are as follows:
st-flash write /path/to/dirtyjtag.bin 0x8000000
It doesn't get much simpler than that. This is a lot easier than using OpenOCD as I have done in the past.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org