cancel
Showing results for 
Search instead for 
Did you mean: 

Hi, I have built the OpenSTLinux distribution according to your wiki guide (https://wiki.st.com/stm32mpu/index.php/STM32MP1_Distribution_Package#Building_the_OpenSTLinux_distribution).

JMour.1
Associate II

I want to populate the distribution to an SD-card and mount it in STM32MP157A-DK1 according to this link: https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer#How_to_populate_a_microSD_card_inserted_in_a_Linux_host_PC

My host PC is a virtual machine and it seems like there is a problem with STM32CubeProgrammer reconnecting to the device (see uploaded image). I have changed the USB settings on my virtual machine to automatically attach the device to it. This works fine when I press the reset button on STM32MP157A-DK1, it unmounts and mounts directly to the virtual machine again.

How can I solve the reconnecting problem with STM32CubeProgrammer? Is there another way to populate an SD card by copying files from the deploy folder in the built distribution folder?

6 REPLIES 6
PatrickF
ST Employee

Hi, did the flashload work with pre-built Starter Package ?

Otherwise please have a look to https://community.st.com/s/article/FAQ-STM32MP1-STM32CubeProgrammer-USB-reconnect-error-at-STM32MP1-boot-device-flashing

Regards.

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.
JMour.1
Associate II

No, it didn't.

I have tried to do this on Windows instead and the same problem occurs despite not using a virtual machine. Here is the log from CubeProgrammer:

08:23:31 : Read TSV File: C:\Work\Starter-Package\stm32mp1-openstlinux-5.10-dunfell-mp1-21-03-31\images\stm32mp1\flashlayout_st-image-weston\trusted\FlashLayout_sdcard_stm32mp157a-dk1-trusted.tsv

 08:23:31 : Number of partitions: 9

 08:23:50 : USB speed  : High Speed (480MBit/s)

 08:23:50 : Manuf. ID  : STMicroelectronics

 08:23:50 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

 08:23:50 : SN     : 003000443338510D39303435

 08:23:50 : FW version : 0x0110

 08:23:50 : Device ID  : 0x0500

 08:23:54 : Start Embedded Flashing service

 08:23:54 : Memory Programming ...

 08:23:54 : Opening and parsing file: tf-a-stm32mp157a-dk1-usb.stm32

 08:23:54 :  File     : tf-a-stm32mp157a-dk1-usb.stm32

 08:23:54 :  Size     : 225572 Bytes

 08:23:54 :  Partition ID : 0x01 

 08:23:54 : Download in Progress:

 08:23:55 : File download complete

 08:23:55 : Time elapsed during download operation: 00:00:00.387

 08:23:55 : RUNNING Program ... 

 08:23:55 :  PartID:   :0x01 

 08:23:55 : Start operation done successfully at partition 0x01

 08:23:55 : Flashlayout Programming ...

 08:23:55 : Running Flashlayout Partition ...

 08:23:55 : Flashlayout partition started successfully

 08:23:55 : Memory Programming ...

 08:23:55 : Opening and parsing file: fip-stm32mp157a-dk1-trusted.bin

 08:23:55 :  File     : fip-stm32mp157a-dk1-trusted.bin

 08:23:55 :  Size     : 1064414 Bytes

 08:23:55 :  Partition ID : 0x03 

 08:23:55 : Download in Progress:

 08:23:56 : File download complete

 08:23:56 : Time elapsed during download operation: 00:00:00.957

 08:23:56 : RUNNING Program ... 

 08:23:56 :  PartID:   :0x03 

 08:23:56 : Reconnecting the device ...

 08:24:26 : Error: Unable to reconnect the target device: time out expired

 08:24:26 : Error: Start operation failed at partition 0x03

 08:24:26 : Error: TSV flashing service failed

 08:24:26 : Warning: Connection to device 0x500 is lost

 08:24:26 : Disconnected from device.

What am I doing wrong?

Hi,

in W10 Device Manager, please check the USB 'DFU in HS mode @...." device properties details.

Property 'Bus reported device description' should be:

  1. "DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000" when it is issued from the BootROM (used to load partition Id 0x01 and 0x03) after reset with BOOT pin set to 'Serial USB'
  2. "USB download gadget@Device ID /0x500, @Revision ID /0x2000, @Name /STM32MP157AAC Rev.B," or similar when uBoot is connected (after "Reconnecting the device ..." )

If not, you might have missed some USB driver during installation or some USB devices are disabled (e.g. still point to a Virtual Machine).

Be sure to try with latest CubeProgrammer v2.7.0 and pre-built images from latest Starter Package.

Logging console could help (UART VCP on ST-Link port, 115200,n,8,1)

Regards.

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.
JMour.1
Associate II

Hi,

The USB in Device Manager is "DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000".

I'm not sure if the DFU driver was installed during installation. STM32 Bootloader.bat file executes without errors but

"PC $> STM32_Programmer_CLI -l usb"

returns:

"STM32_Programmer_CLI : The term 'STM32_Programmer_CLI' is not recognized as the name of a cmdlet, function, script

file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct

and try again.

At line:1 char:1

+ STM32_Programmer_CLI -l usb

+ ~~~~~~~~~~~~~~~~~~~~

  + CategoryInfo     : ObjectNotFound: (STM32_Programmer_CLI:String) [], CommandNotFoundException

  + FullyQualifiedErrorId : CommandNotFoundException"

I'm using the latest CubeProgrammer and pre-built image from latest Starter Package.

Please carefully check the property 'Bus reported device description' for point 1 and 2 in my previous reply

When uBoot start, it should be like that (captured from DK2-F):0693W000008zWg3QAE.pngyou could also use:

"%ProgramFiles%\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" -l usb

and check "Product ID" before flashing (with BootROM DFU) and during Flashing (with uBoot DFU).

Have your tried on another PC or using another USB high-speed port on the PC ?

Regards.

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.
Fase.1
Associate

I also faced the similar issue of reconnecting with STM32CubeProgrammer while working on my new page project If there is a possibility to solve this issue then please guide me.