cancel
Showing results for 
Search instead for 
Did you mean: 

Can't flash st image with stm32cubeprogrammer on stm32mp157f-dk2

JPabl.1
Associate III

HI there STM team!

I want to build a embedded linux image where I can load my QT application. I'm installing the starter package following: https://wiki.st.com/stm32mpu/wiki/STM32MP15_Discovery_kits_-_Starter_Package#Checking_the_material but I'm having problems when executing this command:

 

STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp157c-dk2-optee.tsv

 

The download starts but then it says "reconnecting the device..." and it fails with:

 

Error: Unable to reconnect the target device: time out expired
Error: Start operation failed at partition 0x03
Error: TSV flashing service failed

 

Following other posts it seems there's a problem with the tsv file: https://community.st.com/t5/stm32-mpus-products/fail-the-image-flashing-on-stm32mpu157f-dk2/m-p/217050#M6509

I downloaded the file and rename it to: FlashLayout_sdcard_stm32mp157f-dk2-optee-trial.tsv

Now, when I run this command:

 

STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp157f-dk2-optee-trial.tsv

 

I get the following error:

 

      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.17.0                  
      -------------------------------------------------------------------



USB speed   : High Speed (480MBit/s)
Manuf. ID   : STMicroelectronics
Product ID  : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN          : 002000403132511831373339
DFU protocol: 1.1
Board       : --
Device ID   : 0x0500
Device name : STM32MP15xx
Device type : MPU
Revision ID : --  
Device CPU  : Cortex-A7

Start Embedded Flashing service

Error: File does not exist: /home/gomez/Documents/openstlinux/starter-package/en.FLASH-stm32mp1-openstlinux-6.1-yocto-mickledore-mpu-v24.06.26/stm32mp1-openstlinux-6.1-yocto-mickledore-mpu-v24.06.26/images/stm32mp1/flashlayout_st-image-weston/optee/fip/fip-stm32mp157c-dk2-optee.bin
Error: TSV flashing service failed

 

I downloaded the latest starter package version, so, my directory doesn't look like that path in the error, but I don't want to mess with the folder structure without knowledge...

Thanks a lot in advance!

2 REPLIES 2
PatrickF
ST Employee

Hi @JPabl.1 

I think the issue you face is not the same than the link you looked (which fail in the middle of large partition flashing).

Are you using a Virtual Machine ?

Sometimes, the USB reconnect fail because the new USB gadget port is not assign to the VM.

See https://community.st.com/t5/stm32-mpus/faq-stm32mp1-stm32cubeprogrammer-usb-reconnect-error-at-stm32mp1/ta-p/49263. Although quite old, still overall valid.

 

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.

Hi @PatrickF , thanks for the reply.

Indeed, it seems the problem is with the USB. I'm using virtual machine 7.1.2 with Ubuntu 22.04. I can confirm the device is recognized in DFU mode with lusb.

JPabl1_0-1729893297394.png

I tried the solution in the other post. Once the process enters into timeout, I jumped into my virtual box configuration and tried to add the "USB download gadget".

The problem is that my virtual box doesn't recognize any "USB download gadget "

JPabl1_0-1729893892322.png

 

The first time I had to add the "DFU in HS mode" inside my virtual box configuration because it wasn't added automatically, but this one doesn't even appear.

Any ideas?