2025-06-10 7:55 PM
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.
2025-06-11 12:16 AM
Hi @YaelSanchez
from time to time, we have seen few boards having trouble when flashloading at 800MHz.
To confirm root cause, could you try this modified .tsv which flashload at 650MHz (but the code flashed is still the 800MHz one) ?
(Only two first lines changed to 157a instead of 157d)
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157a-dk1-optee-programmer-usb.stm32
- 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp157a-dk1-optee-programmer-usb.bin
P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157d-dk1-optee-sdcard.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157d-dk1-optee-sdcard.stm32
PD 0x06 metadata1 FWU_MDATA mmc0 0x00084400 arm-trusted-firmware/metadata.bin
PD 0x07 metadata2 FWU_MDATA mmc0 0x000C4400 arm-trusted-firmware/metadata.bin
P 0x08 fip-a FIP mmc0 0x00104400 fip/fip-stm32mp157d-dk1-optee-sdcard.bin
PED 0x09 fip-b FIP mmc0 0x00504400 none
PED 0x0A u-boot-env ENV mmc0 0x00904400 none
P 0x10 bootfs System mmc0 0x00984400 st-image-bootfs-openstlinux-weston-stm32mp1.bootfs.ext4
P 0x11 vendorfs FileSystem mmc0 0x04984400 st-image-vendorfs-openstlinux-weston-stm32mp1.vendorfs.ext4
P 0x12 rootfs FileSystem mmc0 0x05984400 st-image-weston-openstlinux-weston-stm32mp1.rootfs.ext4
P 0x13 userfs FileSystem mmc0 0x105984400 st-image-userfs-openstlinux-weston-stm32mp1.userfs.ext4
Regards.
2025-06-11 8:28 PM
Hi @PatrickF
First of all, I want to thank you for your quick response. I already tried what you suggested, but the same issue still occurs, exactly in the same partition 0x12 with the same symptom — the flashing stops around 20%. In any case, I’m attaching the full log so you can review it in case I made a mistake.
20:11:50 : STM32CubeProgrammer API v2.19.0 | Windows-64Bits
20:12:13 : 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
20:12:13 : Number of partitions: 13
20:12:27 : UR connection mode is defined with the HWrst reset mode
20:12:27 : USB speed : High Speed (480MBit/s)
20:12:27 : Manuf. ID : STMicroelectronics
20:12:27 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
20:12:27 : SN : 004200433438511536383238
20:12:27 : DFU protocol: 1.1
20:12:27 : Board : --
20:12:27 : Device ID : 0x0500
20:12:28 : Start Embedded Flashing service
20:12:28 : Opening and parsing file: tf-a-stm32mp157a-dk1-optee-programmer-usb.stm32
20:12:28 : Memory Programming ...
20:12:28 : File : tf-a-stm32mp157a-dk1-optee-programmer-usb.stm32
20:12:28 : Size : 220.41 KB
20:12:28 : Partition ID : 0x01
20:12:28 : Download in Progress:
20:12:37 : File download complete
20:12:37 : Time elapsed during download operation: 00:00:08.387
20:12:37 : RUNNING Program ...
20:12:37 : PartID: :0x01
20:12:37 : Start operation done successfully at partition 0x01
20:12:37 : Opening and parsing file: fip-stm32mp157a-dk1-optee-programmer-usb.bin
20:12:37 : Memory Programming ...
20:12:37 : File : fip-stm32mp157a-dk1-optee-programmer-usb.bin
20:12:37 : Size : 1.75 MB
20:12:37 : Partition ID : 0x03
20:12:37 : Download in Progress:
20:13:33 : File download complete
20:13:33 : Time elapsed during download operation: 00:00:55.550
20:13:33 : RUNNING Program ...
20:13:33 : PartID: :0x03
20:13:33 : Reconnecting the device ...
20:13:36 : USB speed : High Speed (480MBit/s)
20:13:36 : Manuf. ID : STMicroelectronics
20:13:36 : Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157DAC Rev.Z,
20:13:36 : SN : 004200433438511536383238
20:13:36 : DFU protocol: 1.1
20:13:36 : Board : --
20:13:36 : Device ID : 0x0500
20:13:36 : Device name : STM32MP157DAC Rev.Z
20:13:36 : Device type :
20:13:36 : Device CPU :
20:13:36 : Start operation done successfully at partition 0x03
20:13:36 : Flashlayout Programming ...
20:13:36 : Running Flashlayout Partition ...
20:13:37 : Reconnecting the device ...
20:13:37 : USB speed : High Speed (480MBit/s)
20:13:37 : Manuf. ID : STMicroelectronics
20:13:37 : Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157DAC Rev.Z,
20:13:37 : SN : 004200433438511536383238
20:13:37 : DFU protocol: 1.1
20:13:37 : Board : --
20:13:37 : Device ID : 0x0500
20:13:37 : Device name : STM32MP157DAC Rev.Z
20:13:37 : Device type :
20:13:37 : Device CPU :
20:13:37 : Flashlayout partition started successfully
20:13:37 : Opening and parsing file: tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:13:37 : Memory Programming ...
20:13:37 : File : tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:13:37 : Size : 224.44 KB
20:13:37 : Partition ID : 0x04
20:13:37 : Download in Progress:
20:13:41 : File download complete
20:13:41 : Time elapsed during download operation: 00:00:04.221
20:13:41 : RUNNING Program ...
20:13:41 : PartID: :0x04
20:13:41 : Start operation done successfully at partition 0x04
20:13:41 : Opening and parsing file: tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:13:41 : Memory Programming ...
20:13:41 : File : tf-a-stm32mp157d-dk1-optee-sdcard.stm32
20:13:41 : Size : 224.44 KB
20:13:41 : Partition ID : 0x05
20:13:41 : Download in Progress:
20:13:45 : File download complete
20:13:45 : Time elapsed during download operation: 00:00:04.221
20:13:45 : RUNNING Program ...
20:13:45 : PartID: :0x05
20:13:45 : Start operation done successfully at partition 0x05
20:13:45 : Opening and parsing file: metadata.bin
20:13:45 : Memory Programming ...
20:13:45 : File : metadata.bin
20:13:45 : Size : 120.00 B
20:13:45 : Partition ID : 0x06
20:13:45 : Download in Progress:
20:13:45 : File download complete
20:13:45 : Time elapsed during download operation: 00:00:00.016
20:13:45 : RUNNING Program ...
20:13:45 : PartID: :0x06
20:13:46 : Start operation done successfully at partition 0x06
20:13:46 : Opening and parsing file: metadata.bin
20:13:46 : Memory Programming ...
20:13:46 : File : metadata.bin
20:13:46 : Size : 120.00 B
20:13:46 : Partition ID : 0x07
20:13:46 : Download in Progress:
20:13:46 : File download complete
20:13:46 : Time elapsed during download operation: 00:00:00.016
20:13:46 : RUNNING Program ...
20:13:46 : PartID: :0x07
20:13:46 : Start operation done successfully at partition 0x07
20:13:46 : Opening and parsing file: fip-stm32mp157d-dk1-optee-sdcard.bin
20:13:46 : Memory Programming ...
20:13:46 : File : fip-stm32mp157d-dk1-optee-sdcard.bin
20:13:46 : Size : 1.75 MB
20:13:46 : Partition ID : 0x08
20:13:46 : Download in Progress:
20:14:19 : File download complete
20:14:19 : Time elapsed during download operation: 00:00:33.527
20:14:19 : RUNNING Program ...
20:14:19 : PartID: :0x08
20:14:19 : Start operation done successfully at partition 0x08
20:14:19 : Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp1.bootfs.ext4
20:14:19 : Memory Programming ...
20:14:19 : File : st-image-bootfs-openstlinux-weston-stm32mp1.bootfs.ext4
20:14:19 : Size : 64.00 MB
20:14:19 : Partition ID : 0x10
20:14:19 : Download in Progress:
20:34:55 : File download complete
20:34:55 : Time elapsed during download operation: 00:20:35.364
20:34:55 : RUNNING Program ...
20:34:55 : PartID: :0x10
20:34:55 : Start operation done successfully at partition 0x10
20:34:55 : Opening and parsing file: st-image-vendorfs-openstlinux-weston-stm32mp1.vendorfs.ext4
20:34:55 : Memory Programming ...
20:34:55 : File : st-image-vendorfs-openstlinux-weston-stm32mp1.vendorfs.ext4
20:34:55 : Size : 16.00 MB
20:34:55 : Partition ID : 0x11
20:34:55 : Download in Progress:
20:40:04 : File download complete
20:40:04 : Time elapsed during download operation: 00:05:09.357
20:40:04 : RUNNING Program ...
20:40:04 : PartID: :0x11
20:40:04 : Start operation done successfully at partition 0x11
20:40:04 : Opening and parsing file: st-image-weston-openstlinux-weston-stm32mp1.rootfs.ext4
20:40:04 : Memory Programming ...
20:40:04 : File : st-image-weston-openstlinux-weston-stm32mp1.rootfs.ext4
20:40:04 : Size : 652.00 MB
20:40:04 : Partition ID : 0x12
20:40:04 : Download in Progress:
21:23:46 : Error: failed to download data chunck [1]
21:23:46 : Error: failed to download Sector[0]
21:23:46 : Error: failed to download the File
21:23:46 : Error: Download partition 0x12 failed
21:23:46 : Error: TSV flashing service failed
21:23:47 : Disconnected from device.
2025-06-11 11:24 PM
Hi,
regarding timestamps, seems there is probably an issue with USB speed or the SD-Card itself.
Flashing speed is extremely slow (e.g. 5 minutes for 16MB, whereas it should be in the 10 seconds range).
Maybe check your USB cable, try a different port, try another SD-Card, etc....
Regards.