STM32 Cube Programmer (STM32CUBEPROG) is an all-in-one multi-OS software tool for programming STM32 and external memories connected to STM32.
Below there is a quick start guide about the way to use the STM32 Cube Programmer (CP).
NOTE:
- Use FIREFOX or CHROME for a clear view of the images present in this web site
- For enlarge the image press: CTRL +
For reduce the image press: CTRL –
More info are below
- UM2238: STM32 Trusted Package Creator tool software description
- UM2237: STM32CubeProgrammer software description
- Secure firmware update software expansion for STM32Cube (X-CUBE-SBSFU)
Introduction
STM32CubeProgrammer provides an easy-to-use and efficient environment for reading, writing and verifying device memory through both the debug interface (JTAG and SWD) and the bootloader interface (UART and USB).
STM32CubeProgrammer offers a wide range of features to program STM32 microcontroller internal memories (such as Flash, RAM, and OTP) as well as external memories.
STM32CubeProgrammer also allows option programming and upload, programming content verification, and microcontroller programming automation through scripting.
STM32CubeProgrammer is delivered in GUI (graphical user interface) and CLI (command-line interface) versions.
Key Features
- Erases, programs, views and verifies the content of the device Flash memory
- Supports Motorola S19, Intel HEX, ELF, and binary formats
- Supports debug and bootloader interfaces:
- ST-LINK debug probe (JTAG/SWD)
- UART and USB DFU bootloader interfaces
- Programs, erases and verifies external memories, with examples of external Flash loaders to help users to develop loaders for specific external memories
- Automates STM32 programming (erase, verify, programming, configuring option bytes)
- Allows OTP memory programming
- Supports the programming and configuring of option bytes
- Offers a command-line interface for automation through scripting
- ST-LINK firmware update
- Enables secure firmware creation using the STM32 Trusted Package Creator tool
- Multi-OS support: Windows® , Linux® , macOS®
UpGrade the ST-LINK-v2 FW
Run the CP, the first window that appear is shown below.
If appear the line:
ST-LINK error (DEV_OLD_FIRMWARE_WARNING)
you must first upgrade the FW of the ST-LINK-v2
For UpGrade the FW of the ST-LINK-v2, click on the icon: FIRMWARE UPGRADE
then press on: OPEN IN UPDATE MODE
and press on: UPGRADE
see below.
At this point do the steps below:
- Close CP
- Unconnect your ST-LINK-v2 or evaboard from the PC
- Wait 10 sec
- Connect your ST-LINK-v2 or evaboard from the PC
- Run CP
If CP show you a generic error during the connection to your ST-LINK-v2 or evaboard do this:
- Close CP
- Run ST-LINK Utility
- Clear completely the flash of your MCU that there is on your evaboard
- Close the ST-LINK Utility
Now run the CP and at this point all must be OK, see below.
Program Internal Flash of STM32
Click on the OPEN FILE icon, see below.
From the window that appear choose the file to use for write the Flash (internal mcu Flash).
Remember, the format of file must be:
Motorola S19, Intel HEX, ELF, and binary formats.
Now press on the ERASING & PROGRAMMING icon (1),
Check the boxes:
VERIFY PROGRAMMING
and
RUN AFTER PROGRAMMING
And now press on the START PROGRAMMING button (3)
See below.
At the end of the procedure you must see something like below.
Programming external memory
The procedure is similar to the programming internal Flash but in this case you must select your external memory, see below.