Flash via StLink Utilities - RoboDurden/Hoverboard-Firmware-Hack-Gen2.x GitHub Wiki
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
Now on the menu go to Target->Option Bytes and change Readout Protection from Enabled to Disabled.
After you press apply it will error says option byte write failed please reset target
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.
If you did not see the popup you can try to upload manually, but it will most likely fail, because again the latest st link utilities is bugged, see issues to resolve it.
Issues
The latest version of st link utilities have problem connecting to stlink, if you faced the same issue, please download this version instead
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.