STM32CubeProgrammer allows for multiple configuration options to work with any ST-LINK probe. It has both a graphical and a command-line interface, as well as support for multiple operating systems.
GUI version
- Launch STM32CubeProgrammer.

- Setup your preferred configuration settings and click the Connect button on the top right.

- Next, click the Erasing and Programming button on the left.

- In the download section, choose the location of your executable file and start address (default is
0x08000000
), then hit the Start Programming button.

CLI version
The CLI version should be automatically available after installing STM32CubeProgrammer.
Note:
Windows version will be namedSTM32_Programmer_CLI.exe
. Append .exe
to all the following commands if you are running on Windows.
Available options for STM32_Programmer_CLI can be listed with:
STM32_Programmer_CLI -h
To program a binary executable, use the following command:
STM32_Programmer_CLI -c port=SWD -w <binary-file-location> 0x08000000