cancel
Showing results for 
Search instead for 
Did you mean: 

“Error: failed to download Segment[0]�? Populate the target and boot the image example

JAmia.1
Associate II

“Error: failed to download Segment[0]�?

I looked at the other items with the same title but did not see an answer that would help me.

I am using the STM32MP157F-DK2

The demo code was working when box was opened

I tried to run the demo

“Populate the target and boot the image�?

at

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2

I am using ecosystem release v3.1.0

And

STM32CubeProgrammer 2.9.0

Down load eventually fails with “Error: failed to download Segment[0]�?

Any help on the matter would be appreciated

Below is the Log

 10:53:37 : USB speed  : High Speed (480MBit/s)

 10:53:37 : Manuf. ID  : STMicroelectronics

 10:53:37 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

 10:53:37 : SN         : 002A001B3438511436383238

 10:53:37 : FW version : 0x0110

 10:53:37 : Board      : --

 10:53:37 : Device ID  : 0x0500

 10:53:48 : Start Embedded Flashing service

 10:53:48 : Memory Programming ...

 10:53:48 : Opening and parsing file: tf-a-stm32mp157f-dk2-usb.stm32

 10:53:48 :  File         : tf-a-stm32mp157f-dk2-usb.stm32

 10:53:48 :  Size         : 225596 Bytes

 10:53:48 :  Partition ID : 0x01

 10:53:48 : Download in Progress:

 10:53:48 : File download complete

 10:53:48 : Time elapsed during download operation: 00:00:00.473

 10:53:48 : RUNNING Program ...

 10:53:48 :  PartID:     :0x01

 10:53:48 : Start operation done successfully at partition 0x01

 10:53:48 : Flashlayout Programming ...

 10:53:48 : Running Flashlayout Partition ...

 10:53:48 : Flashlayout partition started successfully

 10:53:48 : Memory Programming ...

 10:53:48 : Opening and parsing file: fip-stm32mp157f-dk2-trusted.bin

 10:53:48 :  File         : fip-stm32mp157f-dk2-trusted.bin

 10:53:48 :  Size         : 1090807 Bytes

 10:53:48 :  Partition ID : 0x03

 10:53:48 : Download in Progress:

 10:53:50 : File download complete

 10:53:50 : Time elapsed during download operation: 00:00:01.428

 10:53:50 : RUNNING Program ...

 10:53:50 :  PartID:     :0x03

 10:53:50 : Reconnecting the device ...

 10:53:53 : USB speed  : High Speed (480MBit/s)

 10:53:53 : Manuf. ID  : STMicroelectronics

 10:53:53 : Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2001, @Name /STM32MP157FAC Rev.Z,

 10:53:53 : SN         : 002A001B3438511436383238

 10:53:53 : FW version : 0x0110

 10:53:53 : Board      : --

 10:53:53 : Device ID  : 0x0500

 10:53:53 : Device name : STM32MP157FAC Rev.Z

 10:53:53 : Device type :

 10:53:53 : Device CPU :

 10:53:53 : Start operation done successfully at partition 0x03

 10:53:53 : Memory Programming ...

 10:53:53 : Opening and parsing file: tf-a-stm32mp157f-dk2-sdcard.stm32

 10:53:53 :  File         : tf-a-stm32mp157f-dk2-sdcard.stm32

 10:53:53 :  Size         : 225489 Bytes

 10:53:53 :  Partition ID : 0x04

 10:53:53 : Download in Progress:

 10:53:56 : Error: failed to download Segment[0]

 10:53:56 : Error: failed to download the File

 10:53:56 : Error: Download partition 0x04 failed

 10:53:56 : Error: TSV flashing service failed

 10:53:56 : Warning: Connection to device 0x500 is lost

 10:53:56 : Disconnected from device.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @JAmia.1​ ,

We identified an issue with 1 or 2 faulty boards, out of the box, with the same symptoms than yours, when running at 800MHz.

  • The problem never happens if you are using the file from 157c-dk2 instead of 157f-dk2 because they are running at 650Mhz.
  • Or it is possible to use the board without the screen even at 800MHz, what you have done by using the files 157d-dk1.

Unfortunately, you have to contact your supplier to have your board replaced.

Or you can continue to use it, but with 157c-dk2 files only.

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

16 REPLIES 16
Kevin HUBER
ST Employee

Hello @JAmia.1​ ,

Do you still need help on this error?

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JAmia.1
Associate II

Yes. I discovered that the failure point is random, I upgraded ubuntu to 20.4 with no change reloaded ad re decompresses the 21-11-17_tar_v3.1.0 tar. If I use the wrong file "FlashLayout_sdcard-stm32mp157d-dk1-trusted.tsv" the cube program actually works as does the stm32mp157F-dk2 once loaded with the 2016? version

as previously stated ""FlashLayout_sdcard-stm32mp157f-dk2-trusted.tsv"" randomly fails during programing sect 5 or 6 up to 11

JAmia.1
Associate II

I also tried to use the cube command line version on a older Linux virtual machine (I'm using A lenovo laptop ) Same failure

JAmia.1
Associate II
JAmia.1
Associate II

I still would like help getting the Cube Programmer working

Kevin HUBER
ST Employee

Hi @JAmia.1​ ,,

You said that you already tried the command line, but please can you try again to run the command line version of cube programmer 2.9.0. Run this command:

STM32_Programmer_CLI -c port=usb1 -vb 2 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv

from your folder

STM32MP15-Ecosystem-v3.1.0/Starter-Package/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1

And send here the complete log.

I will have a look at them.

Do you also use a virtual machine for Ubuntu?

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JAmia.1
Associate II

I did exactly what you asked it just returned "STM32_Programmer_CLI: command not found"

Let me repeat my steps

1) tried running the example

“Populate the target and boot the image�?

at

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2

I am using ecosystem release v3.1.0

And

STM32CubeProgrammer 2.9.0

on A lenovo lap top T420 first running Ubuntu 18 now upgraded to 20.4. First Entry includes the data log. Error happens at random sectors (4 or 5 some times as high as 11) (No predictable failure point rather random)

2) A co worker had an older stm32 development board working on a virtual machine using a command line and my files (aka FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv) and support files down loaded from the previous step. The results looked the same random failure point (Data log looked very similar to the above aka first entry in this thread)

3) Now we are back to my laptop. I tried to use an older file 157d-dk1- and the process worked and I could reboot the stm32 board and it worked

4) assuming that maybe something went wrong with the 157f file I re down loaded / unpacked the project. No difference

What do you want me to do next?

Hello @JAmia.1​ ,

I understood your problem, but I used again the file from v3.1.0 ecosystem as shown in my previous post and it worked with my DK2, so it doesn't seem to be a problem related to the delivery.

Normally if you followed the page “Populate the target and boot the image�?, you should have added the path of CubeProgrammer into your path:

Add the STM32CubeProgrammer binary path to your PATH environment variable:

export PATH=$HOME/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-x.y.z/bin:$PATH

In your case you must replace x.y.z by 2.9.0.

This binary STM32_Programmer_CLI is available in your STM32CubeProgrammer folder:

/home/osboxes/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-2.9.0/bin/STM32_Programmer_CLI

As explained in: https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157x-DK2/Let%27s_start/Populate_the_target_and_boot_the_image#Overview

0693W00000JO8cgQAD.png 

So please, can you modify your path as explained here and try again the command that I sent before.

The goal is to have the traces of the download to see what is your issue.

Regards,

Kevin

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
JAmia.1
Associate II

I got the following

//****************************************************************************

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.9.0          

   -------------------------------------------------------------------

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     : 002A001B3438511436383238

FW version : 0x0110

Board    : --

Device ID  : 0x0500

  AREA NAME     SECT.NBR    PARTITION.ID  SIZE     TYPE

  fsbl1        0000     0x00000004   0256 KB   RW

  fsbl2        0000     0x00000005   0256 KB   RW

  fip         0000     0x00000006   0004 MB   RW

  boot         0000     0x00000010   0064 MB   RW

  vendorfs       0000     0x00000011   0016 MB   RW

  rootfs        0000     0x00000012   0744 MB   RW

  userfs        0000     0x00000013   14364 MB   RW

  virtual       0000     0x000000f1   0512 B    RW

  OTP         0000     0x000000f2   1024 B    RW

  PMIC         0000     0x000000f4   0008 B    RW

Device name : STM32MP157FAC Rev.Z

Device type : MPU

Revision ID : --  

Device CPU : Cortex-A7

Start Embedded Flashing service

sending a set alternate setting request with index: 7

receiving packet

UpLoading data

Flashing service completed successfully

//*******************************************************************************************

It happened instantaneously (there is no way it actually programmed the SD card)

is this what you were looking for?