How to upgrade firmware - tomaskovacik/audi_concert1_chorus1_volume_fix GitHub Wiki
There are a few options for how to do it, preferred version is to use STlinkv2 clone will do just fine and SWlink software from st.com, but this requires registration so I will go with Arduino, follow this howto and install Arduino and stm32 support into it.
then you need the binary file of the firmware. In this how-to I will use combined binaries which includes bootloader and also main firmware for simplicity, there is an option to upload only the bootloader, in case of the empty chip, or if your board was sold to you before 09.2021, where I switched to using fastboot bootloader, which solves a lot of problems.
If you buy your module after 09.2021 then you have fastboot version of the bootloader and you can use just USB cable to upgrade firmware, you can use this approach also if you do not want to upgrade bootloader
The first step is to identify which version of the board you have, This article helps you with it.
The second step is to download firmware binary
combined binary for v1 and v2 boards
the final step is to connect stlinv2 to your module and flash it:
Connect these stlinv2 programer pins to module 5V, GND, SWDIO, SWCLK. The pins description is on the next picture, SWD header is on the right side of the board:
The next step is actual programming (2021.5.31 is the installed version, it can be different):
For Linux:
~/.arduino15/packages/stm32duino/tools/stm32tools/2021.5.31/linux/stlink_upload ./current_no_serial_boot_stlink_HWv1-2.bin
for Windows it should be something like this: (TODO: TEST THIS!)
C:\Users\{username}\Documents\ArduinoData\packages\stm32duino\tools\stm32tools\2021.5.31\linux\stlink_upload.bat ./current_no_serial_boot_stlink_HWv1-2.bin
Utility stlink_upload is in your arduino15 folder, more about it on the official Arduino site here