2.2 KiB
Using STM32 Cube Programmer
Applicable platforms: STM32MP157-DK1, STM32MP157-DK2, STM32MP135-DK
STM32 Cube Programmer is a utility provided by ST that allows to reflash an STM32MP1 platform directly from your PC. It is particularly useful if the storage used on your STM32MP1 platform is non-removable, such as an eMMC or NAND flash. STM32 Cube Programmer uses USB connectivity with the STM32MP1 platform to do the reflashing, and it works even if the STM32MP1 platform has no software installed.
To get started, download STM32 Cube Programmer from the ST
website. It
unfortunately requires having an account on st.com. We tested with
version 2.8.0, and the below instructions assume that STM32 Cube
Programmer is installed in the $HOME/stm32cube folder.
As the STM32MP157-DK1/DK2 or the STM32135F-DK do not provide any non-removable storage device, our demonstration will use the SD card: STM32 Cube Programmer will be used to reflash the SD card, with the SD card inserted in the STM32MP1 platform.
Follow these steps:
- Switch the boot mode switch SW1 to USB boot
- Plug a second USB-C cable on CN7
- Run these commands to flash the SDCard:
$ cd output/images/
$ sudo ~/stm32cube/bin/STM32_Programmer_CLI -c port=usb1 -w flash.tsv
- Switch back the boot mode switch to SD boot
- Reboot the platform
The flash.tsv file has been produced by Buildroot and tells STM32
Cube Programmer what to flash. If you want to reflash an eMMC storage
device instead, this flash.tsv file will have to be adapted.
Additional information:
-
STM32 Cube Programmer on the ST Wiki, the best source of information
-
A blog post from Bootlin giving more details on STM32 Cube Programmer usage.