2021-07-12 06:21 AM
Hi,
I am trying to flash the Starter_Package to SD card in accordance with the following wiki("6.2 Image flashing"). But fail.
https://wiki.st.com/stm32mpu/wiki/STM32MP15_Discovery_kits_-_Starter_Package#Image_flashing
Unfortunately i am a complete beginner on these tools and don't understand what is happened.
Thank you by advance for any help or advices.
error log are...
Error: failed to download Segment[0]
Error: failed to download the File
Error: Download partition 0x06 failed
Error: TSV flashing service failed
My environments are below,
Bord:STM32MPU157F-DK2.
Host PC: Windows10 64 bit
SD card: ADATA 16GB
[Full log]
-------------------------------------------------------------------
STM32CubeProgrammer v2.7.0
-------------------------------------------------------------------
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 002700363030510D32313933
FW version : 0x0110
Device ID : 0x0500
Device name : STM32MP1
Device type : MPU
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157f-dk2-usb.stm32
File : tf-a-stm32mp157f-dk2-usb.stm32
Size : 225572 Bytes
Partition ID : 0x01
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:00.479
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Flashlayout Programming ...
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
Running Flashlayout Partition ...
Flashlayout partition started successfully
Memory Programming ...
Opening and parsing file: fip-stm32mp157f-dk2-trusted.bin
File : fip-stm32mp157f-dk2-trusted.bin
Size : 1067362 Bytes
Partition ID : 0x03
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:01.548
RUNNING Program ...
PartID: :0x03
Reconnecting the device ...
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157FAC Rev.Z,
SN : 002700363030510D32313933
FW version : 0x0110
Device ID : 0x0500
Start operation done successfully at partition 0x03
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157f-dk2-sdcard.stm32
File : tf-a-stm32mp157f-dk2-sdcard.stm32
Size : 225445 Bytes
Partition ID : 0x04
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:00.062
RUNNING Program ...
PartID: :0x04
Start operation done successfully at partition 0x04
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157f-dk2-sdcard.stm32
File : tf-a-stm32mp157f-dk2-sdcard.stm32
Size : 225445 Bytes
Partition ID : 0x05
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:00.066
RUNNING Program ...
PartID: :0x05
Start operation done successfully at partition 0x05
Memory Programming ...
Opening and parsing file: fip-stm32mp157f-dk2-trusted.bin
File : fip-stm32mp157f-dk2-trusted.bin
Size : 1067362 Bytes
Partition ID : 0x06
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロアアア 94%
Error: failed to download Segment[0]
Error: failed to download the File
Error: Download partition 0x06 failed
Error: TSV flashing service failed
Solved! Go to Solution.
2021-07-12 06:57 AM
Hi,
did you try using another computer, another board supply, another USB cable ?
Otherwise, could you try if using the attached Flashlayout file file would help ?
FlashLayout_sdcard_stm32mp157f-dk2-trusted(trial).tsv file should be extracted from attached .zip and copied in flashlayout_st-image-weston/trusted/ folder, and then use the following command:
STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157f-dk2-trusted(trial).tsv
Regards.
2021-07-12 06:57 AM
Hi,
did you try using another computer, another board supply, another USB cable ?
Otherwise, could you try if using the attached Flashlayout file file would help ?
FlashLayout_sdcard_stm32mp157f-dk2-trusted(trial).tsv file should be extracted from attached .zip and copied in flashlayout_st-image-weston/trusted/ folder, and then use the following command:
STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157f-dk2-trusted(trial).tsv
Regards.
2021-07-13 05:21 AM
Dear PatrickF,
Thank you for your quick response.
It was success with your new file.
Start operation done successfully at partition 0x13
Flashing service completed successfully
I can move to next step.
Thank you!
[full log]
C:\Users\nonoguchi\clickplus_nodered\Starter-Package\stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31\images\stm32mp1>STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157f-dk2-trusted(trial).tsv
-------------------------------------------------------------------
STM32CubeProgrammer v2.7.0
-------------------------------------------------------------------
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 002700363030510D32313933
FW version : 0x0110
Device ID : 0x0500
Device name : STM32MP1
Device type : MPU
Device CPU : Cortex-A7
Start Embedded Flashing service
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2-usb.stm32
File : tf-a-stm32mp157c-dk2-usb.stm32
Size : 225572 Bytes
Partition ID : 0x01
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:00.464
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Flashlayout Programming ...
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
Running Flashlayout Partition ...
Flashlayout partition started successfully
Memory Programming ...
Opening and parsing file: fip-stm32mp157c-dk2-trusted.bin
File : fip-stm32mp157c-dk2-trusted.bin
Size : 1066932 Bytes
Partition ID : 0x03
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:01.445
RUNNING Program ...
PartID: :0x03
Reconnecting the device ...
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157FAC Rev.Z,
SN : 002700363030510D32313933
FW version : 0x0110
Device ID : 0x0500
Start operation done successfully at partition 0x03
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157f-dk2-sdcard.stm32
File : tf-a-stm32mp157f-dk2-sdcard.stm32
Size : 225445 Bytes
Partition ID : 0x04
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:00.076
RUNNING Program ...
PartID: :0x04
Start operation done successfully at partition 0x04
Memory Programming ...
Opening and parsing file: tf-a-stm32mp157f-dk2-sdcard.stm32
File : tf-a-stm32mp157f-dk2-sdcard.stm32
Size : 225445 Bytes
Partition ID : 0x05
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:00.078
RUNNING Program ...
PartID: :0x05
Start operation done successfully at partition 0x05
Memory Programming ...
Opening and parsing file: fip-stm32mp157f-dk2-trusted.bin
File : fip-stm32mp157f-dk2-trusted.bin
Size : 1067362 Bytes
Partition ID : 0x06
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:00.454
RUNNING Program ...
PartID: :0x06
Start operation done successfully at partition 0x06
Memory Programming ...
Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp1.ext4
File : st-image-bootfs-openstlinux-weston-stm32mp1.ext4
Size : 64 MBytes
Partition ID : 0x10
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:25.330
RUNNING Program ...
PartID: :0x10
Start operation done successfully at partition 0x10
Memory Programming ...
Opening and parsing file: st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
File : st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
Size : 16 MBytes
Partition ID : 0x11
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:00:07.381
RUNNING Program ...
PartID: :0x11
Start operation done successfully at partition 0x11
Memory Programming ...
Opening and parsing file: st-image-weston-openstlinux-weston-stm32mp1.ext4
File : st-image-weston-openstlinux-weston-stm32mp1.ext4
Size : 558320 KBytes
Partition ID : 0x12
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:04:23.865
RUNNING Program ...
PartID: :0x12
Start operation done successfully at partition 0x12
Memory Programming ...
Opening and parsing file: st-image-userfs-openstlinux-weston-stm32mp1.ext4
File : st-image-userfs-openstlinux-weston-stm32mp1.ext4
Size : 128 MBytes
Partition ID : 0x13
Download in Progress:
ロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロロ 100%
File download complete
Time elapsed during download operation: 00:01:00.156
RUNNING Program ...
PartID: :0x13
Start operation done successfully at partition 0x13
Flashing service completed successfully
2023-03-04 12:55 PM
@PatrickF Hi Patrick, I just experienced the same type of problem using the same board: STM32MP157F-DK2.
Have its USB-C power connected to a dedicated USB-C brick (Apple laptop charger). USB-C OTG port plugged into Linux host PC by single cable to a USB3 port.
Errors looked like this - would get partway through this partition each time, failing at a random percentage..
RUNNING Program ...
PartID: :0x08
Start operation done successfully at partition 0x08
Memory Programming ...
Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp1.ext4
File : st-image-bootfs-openstlinux-weston-stm32mp1.ext4
Size : 64.00 MB
Partition ID : 0x10
Download in Progress:
[====== ] 12%
Error: failed to download Segment[0]
Error: failed to download the File
Error: Download partition 0x10 failed
Error: TSV flashing service failed
I grabbed your trial TSV and was able to flash successfully through DFU. IMO that rules out cables, power, host PC etc etc. (well it completed flashing, but it cannot actually boot... see below)
But this is March 2023 and I'm using the 4.1.0 starter package from ST website.. so I have some doubts as to whether using the hacked TSV from a couple years ago is best practice.. instead can we articulate what modifications if any, should be applied to the flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv which is included in today's Starter Package ?
en.FLASH-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/images
DL from here
https://www.st.com/en/embedded-software/stm32mp1starter.html
starter package process here
https://wiki.st.com/stm32mpu/wiki/STM32MP15_Discovery_kits_-_Starter_Package
device listing:
~/stmp2/en.FLASH-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23/images$ STM32_Programmer_CLI -l usb
-------------------------------------------------------------------
STM32CubeProgrammer v2.13.0
-------------------------------------------------------------------
===== DFU Interface =====
Total number of available STM32 device in DFU mode: 1
Device Index : USB1
USB Bus Number : 001
USB Address Number : 003
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
Serial number : 003200193438511836383238
Firmware version : 0x0110
Device ID : 0x0500
today's TSV from en.FLASH-stm32mp1-openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23
more flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157f-dk2-usb.stm32
- 0x03 fip-boot FIP none 0x0 fip/fip-stm32mp157f-dk2-trusted.bin
P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157f-dk2-sdcard.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157f-dk2-sdcard.stm32
P 0x06 metadata1 Binary mmc0 0x00084400 arm-trusted-firmware/metadata.bin
P 0x07 metadata2 Binary mmc0 0x000C4400 arm-trusted-firmware/metadata.bin
P 0x08 fip-a FIP mmc0 0x00104400 fip/fip-stm32mp157f-dk2-trusted.bin
PED 0x09 fip-b FIP mmc0 0x00504400 none
PED 0x0A u-boot-env Binary mmc0 0x00904400 none
P 0x10 bootfs System mmc0 0x00984400 st-image-bootfs-openstlinux-weston-stm32mp1.ext4
P 0x11 vendorfs FileSystem mmc0 0x04984400 st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
P 0x12 rootfs FileSystem mmc0 0x05984400 st-image-weston-openstlinux-weston-stm32mp1.ext4
P 0x13 userfs FileSystem mmc0 0x105984400 st-image-userfs-openstlinux-weston-stm32mp1.ext4
Results of trying to boot using a DFU-flashed card using the "trial" TSV.. it's unhappy about missing partitions. Which leads me back to wanting to figure out what modification is needed to the modern TSV that came in the starter package..
NOTICE: CPU: STM32MP157FAC Rev.Z
NOTICE: Model: STMicroelectronics STM32MP157F-DK2 Discovery Board
NOTICE: Board: MB1272 Var4.0 Rev.C-02
INFO: PMIC version = 0x20
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.6-stm32mp1-r2.0(debug):v2.6-dirty(a1f02f4f)
NOTICE: BL2: Built : 13:14:26, Nov 23 2021
ERROR: Unable to find a metadata partition
WARNING: Failed to set reference to image id=12 (-2)
WARNING: loading of FWU-Metadata failed, using Bkup-FWU-Metadata
ERROR: Unable to find a metadata partition
WARNING: Failed to set reference to image id=13 (-2)
ERROR: loading of Bkup-FWU-Metadata failed
2023-03-04 03:13 PM
I eventually did succeed in DFU flashing with the unmodified TSV file from the current day starter package for 4.1.0 (and it does boot properly). But it was very flaky, took half a dozen tries. I hope I don't have to do that very often.
2023-03-06 01:51 AM
Hi @rbarris
you should took the provided TSV in v4.1.0 and edit the first two lines replacing '157f' by '157c'Regards,
In order to give better visibility on the answered topics, please click on 'Select as Best' on the reply which solved your issue or answered your question. See also 'Best Answers'