STM32CubeProgrammer

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

  1. Launch STM32CubeProgrammer.
cubeprog startup screen
  1. Setup your preferred configuration settings and click the Connect button on the top right.
cubeprog connect button
  1. Next, click the Erasing and Programming button on the left.
cubeprog erase option
  1. In the download section, choose the location of your executable file and start address (default is 0x08000000), then hit the Start Programming button.
cubeprog download section

CLI version

The CLI version should be automatically available after installing STM32CubeProgrammer.

Note:
Windows version will be named STM32_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