Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 2.55 KB

stm32cubeprogrammer.md

File metadata and controls

61 lines (50 loc) · 2.55 KB

Using STM32 Cube Programmer

Applicable platforms: STM32MP157-DK1, STM32MP157-DK2, STM32MP135-DK, STM32MP257F-EV1.

STM32 Cube Programmer is a utility provided by ST that allows to reflash an STM32MPU platform directly from your PC. It is particularly useful if the storage used on your STM32MPU platform is non-removable, such as an eMMC or NAND flash. STM32 Cube Programmer uses USB connectivity with the STM32MPU platform to do the reflashing, and it works even if the STM32MPU 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.17.0, and the below instructions assume that STM32 Cube Programmer is installed in the $HOME/stm32cube folder.

As the STM32MP157-DK1/DK2 or the STM32MP135F-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 STM32MPU platform.

Follow these steps:

  1. Switch the boot mode switch SW1 to USB boot
    • STM32MP157: BOOT0 and BOOT2 to OFF
    • STM32MP135: BOOT0, BOOT1 and BOOT2 to OPEN
    • STM32MP257: BOOT0, BOOT1, BOOT2 and BOOT3 to OPEN
  2. Plug a second USB-C cable on CN7 on the STM32MP157/135 or CN15 on the STM32MP257F-EV1.
  3. Run these commands to flash the SDCard:
$ cd output/images/
$ sudo ~/stm32cube/bin/STM32_Programmer_CLI -c port=usb1 -w flash.tsv
  1. Switch back the boot mode switch to SD boot
    • STM32MP157: BOOT0 and BOOT2 to ON
    • STM32MP135: BOOT0 to ON, BOOT1 to OPEN, BOOT2 to ON
    • STM32MP257: BOOT0 to ON, BOOT1, BOOT2 and BOOT3 to OPEN
  2. 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: