Populate the target and boot the image example with STM32MP157D-DK1
I am trying to flash the bootable image onto the STM32MP157D-DK1 device. The image I’m using is the latest version available on the OpenSTLinux Starter Package download page. I am using the STM32CubeProgrammer tool on both Windows and Linux, and every time I try, I receive the same error message at the same partition during installation — approximately at 20% of the installation of partition 0x12. The following message appears:
19:58:42 : STM32CubeProgrammer API v2.19.0 | Windows-64Bits
19:58:56 : Read TSV File: C:\Users\maste\Downloads\stm32mp1-openstlinux-6.6-yocto-scarthgap-mpu-v24.11.06\images\stm32mp1\flashlayout_st-image-weston\optee\FlashLayout_sdcard_stm32mp157d-dk1-optee.tsv
19:58:56 : Number of partitions: 13
19:59:19 : UR connection mode is defined with the HWrst reset mode
19:59:19 : USB speed : High Speed (480MBit/s)
19:59:19 : Manuf. ID : STMicroelectronics
19:59:19 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
19:59:19 : SN : 004200433438511536383238
19:59:19 : DFU protocol: 1.1
19:59:19 : Board : --
19:59:19 : Device ID : 0x0500
19:59:25 : Start Embedded Flashing service
19:59:25 : Opening and parsing file: tf-a-stm32mp157d-dk1-optee-programmer-usb.stm32
19:59:25 : Memory Programming ...
19:59:25 : File : tf-a-stm32mp157d-dk1-optee-programmer-usb.stm32
19:59:25 : Size : 220.41 KB
19:59:25 : Partition ID : 0x01
19:59:25 : Download in Progress:
19:59:33 : File download complete
19:59:33 : Time elapsed during download operation: 00:00:08.422
19:59:33 : RUNNING Program ...
19:59:33 : PartID: :0x01
19:59:33 : Start operation done successfully at partition 0x01
19:59:33 : Opening and parsing file: fip-stm32mp157d-dk1-optee-programmer-usb.bin
19:59:33 : Memory Programming ...
19:59:33 : File : fip-stm32mp157d-dk1-optee-programmer-usb.bin
19:59:33 : Size : 1.75 MB
19:59:33 : Partition ID : 0x03
19:59:33 : Download in Progress:
20:00:29 : File download complete
20:00:29 : Time elapsed during download operation: 00:00:55.428
20:00:29 : RUNNING Program ...
20:00:29 : PartID: :0x03
20:00:29 : Reconnecting the device ...
20:00:33 : USB speed : High Speed (480MBit/s)
20:00:33 : Manuf. ID : STMicroelectronics
20:00:33 : Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157DAC Rev.Z,
20:00:33 : SN : 004200433438511536383238
20:00:33 : DFU protocol: 1.1
20:00:33 : Board : --
20:00:33 : Device ID : 0x0500
20:00:33 : Device name : STM32MP157DAC Rev.Z
20:00:33 : Device type :
20:00:33 : Device CPU :
20:00:33 : Start operation done successfully at partition 0x03
20:00:33 : Flashlayout Programming ...
20:00:33 : Running Flashlayout Partition ...
20:00:34 : Reconnecting the device ...
20:00:34 : USB speed : High Speed (480MBit/s)
20:00:34 : Manuf. ID : STMicroelectronics
20:00:34 : Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157DAC Rev.Z,
20:00:34 : SN : 004200433438511536383238
20:00:34 : DFU protocol: 1.1
20:00:34 : Board : --
20:00:34 : Device ID : 0x0500
20:00:34 : Device name : STM32MP157DAC Rev.Z
20:00:34 : Device type :
20:00:34 : Device CPU :
20:00:34 : Flashlayout partition started successfully
20:00:34 : Opening and parsing file: tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:00:34 : Memory Programming ...
20:00:34 : File : tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:00:34 : Size : 224.44 KB
20:00:34 : Partition ID : 0x04
20:00:34 : Download in Progress:
20:00:38 : File download complete
20:00:38 : Time elapsed during download operation: 00:00:04.221
20:00:38 : RUNNING Program ...
20:00:38 : PartID: :0x04
20:00:38 : Start operation done successfully at partition 0x04
20:00:38 : Opening and parsing file: tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:00:38 : Memory Programming ...
20:00:38 : File : tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:00:38 : Size : 224.44 KB
20:00:38 : Partition ID : 0x05
20:00:38 : Download in Progress:
20:00:43 : File download complete
20:00:43 : Time elapsed during download operation: 00:00:04.222
20:00:43 : RUNNING Program ...
20:00:43 : PartID: :0x05
20:00:43 : Start operation done successfully at partition 0x05
20:00:43 : Opening and parsing file: metadata.bin
20:00:43 : Memory Programming ...
20:00:43 : File : metadata.bin
20:00:43 : Size : 120.00 B
20:00:43 : Partition ID : 0x06
20:00:43 : Download in Progress:
20:00:43 : File download complete
20:00:43 : Time elapsed during download operation: 00:00:00.015
20:00:43 : RUNNING Program ...
20:00:43 : PartID: :0x06
20:00:43 : Start operation done successfully at partition 0x06
20:00:43 : Opening and parsing file: metadata.bin
20:00:43 : Memory Programming ...
20:00:43 : File : metadata.bin
20:00:43 : Size : 120.00 B
20:00:43 : Partition ID : 0x07
20:00:43 : Download in Progress:
20:00:43 : File download complete
20:00:43 : Time elapsed during download operation: 00:00:00.015
20:00:43 : RUNNING Program ...
20:00:43 : PartID: :0x07
20:00:43 : Start operation done successfully at partition 0x07
20:00:43 : Opening and parsing file: fip-stm32mp157d-dk1-optee-sdcard.bin
20:00:43 : Memory Programming ...
20:00:43 : File : fip-stm32mp157d-dk1-optee-sdcard.bin
20:00:43 : Size : 1.75 MB
20:00:43 : Partition ID : 0x08
20:00:43 : Download in Progress:
20:01:16 : File download complete
20:01:16 : Time elapsed during download operation: 00:00:33.528
20:01:16 : RUNNING Program ...
20:01:16 : PartID: :0x08
20:01:17 : Start operation done successfully at partition 0x08
20:01:17 : Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp1.bootfs.ext4
20:01:17 : Memory Programming ...
20:01:17 : File : st-image-bootfs-openstlinux-weston-stm32mp1.bootfs.ext4
20:01:17 : Size : 64.00 MB
20:01:17 : Partition ID : 0x10
20:01:17 : Download in Progress:
20:21:54 : File download complete
20:21:54 : Time elapsed during download operation: 00:20:37.457
20:21:54 : RUNNING Program ...
20:21:54 : PartID: :0x10
20:21:54 : Start operation done successfully at partition 0x10
20:21:54 : Opening and parsing file: st-image-vendorfs-openstlinux-weston-stm32mp1.vendorfs.ext4
20:21:54 : Memory Programming ...
20:21:54 : File : st-image-vendorfs-openstlinux-weston-stm32mp1.vendorfs.ext4
20:21:54 : Size : 16.00 MB
20:21:54 : Partition ID : 0x11
20:21:54 : Download in Progress:
20:27:04 : File download complete
20:27:04 : Time elapsed during download operation: 00:05:09.375
20:27:04 : RUNNING Program ...
20:27:04 : PartID: :0x11
20:27:04 : Start operation done successfully at partition 0x11
20:27:04 : Opening and parsing file: st-image-weston-openstlinux-weston-stm32mp1.rootfs.ext4
20:27:04 : Memory Programming ...
20:27:04 : File : st-image-weston-openstlinux-weston-stm32mp1.rootfs.ext4
20:27:04 : Size : 652.00 MB
20:27:04 : Partition ID : 0x12
20:27:04 : Download in Progress:
21:10:35 : Error: failed to download data chunck [1]
21:10:35 : Error: failed to download Sector[0]
21:10:35 : Error: failed to download the File
21:10:35 : Error: Download partition 0x12 failed
21:10:35 : Error: TSV flashing service failed
21:10:35 : Disconnected from device.
When it reaches that point, the device powers off and restarts. I’ve tried all kinds of power sources, and none seem to have worked. Interestingly, when I install a different version of the OpenSTLinux Starter Package — specifically this one: stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23 — I can successfully flash it to the device.
However, I don’t know if it depends on the version of the image I install, but unfortunately, when I flash that version to the device, I can no longer use STM32CubeIDE. I can’t connect to the device through the ST-Link port, and I can’t do anything in the IDE — it doesn’t recognize the device. I already updated the driver through the software, but I still can’t get it to work.
