This is a modified version of SEGGER STLinkReflash utility
You will probably have to downgrade your St-Link to an older driver. Tested on clone using: STSW-LINK007 2.36.26 version
How to:
Windows:
- Unpack St-toJ-.zip
- Make sure .exe and .dll is in the same folder
- run STLinkReflash, follow instructions.
- Done
MacOS/Linux:
- Don't know, was originally made for Windows only
Thanks to NSA/Ghidra It's as simple as modifying the following binary offsets
2566 (break) 3C -> 38
2567 (new) 40 -> C0
26B2 (break) 3C -> 38
26B3 (new) 4A -> C0
Additional .gzf file and .c export provided