2025-07-10 6:43 AM
Hello all,
Sorry if I'm not doing everything perfect about this post but this is my very first :).
So i'm currently working on the STM32MP13 DK - Starter package (on STM32MP135F-DK)
And when executing the command : STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp135f-dk-optee.tsv
which job is to flash the image into the sd card i'm getting the following log. I'm working on oracle VM, Ubuntu 24.04.
If you have any question about my setup I'll be happy to answer you.
Théo
Log :
Start Embedded Flashing service
Opening and parsing file: tf-a-stm32mp135f-dk-optee-programmer-usb.stm32
Memory Programming ...
File : tf-a-stm32mp135f-dk-optee-programmer-usb.stm32
Size : 86.52 KB
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:02.171
RUNNING Program ...
PartID: :0x01
Reconnecting the device ...
Error: Unable to reconnect the target device: time out expired
Error: Start operation failed at partition 0x01
Error: TSV flashing service failed
Solved! Go to Solution.
2025-07-11 7:22 AM
It finally worked.
I ended up switching to VMware for my VMs. As said in https://wiki.st.com/stm32mpu/wiki/PC_prerequisites
"ST has selected VMWare as Linux virtual machine solution."
Which I hardly recommand you go trough and listen :) !
It does feel like the USB devices managing is done better in VMWare as whenever you plug a device it asks in which (between host OS and VM) you would like to connect the USB to.
Yes @PatrickF there were indeed some settings in VM to tell a peripheral to be directly taken by the VM but it didn't make things better for me.
Thank you for your help.
Théo
2025-07-10 7:59 AM
Hello @Theo_,
Have you checked that boot pin is on 0000 ? Otherwise board couldn't boot on USB.
See https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP135x-DK/Let%27s_start/Populate_the_target_and_boot_the_image#Populate_the_SD_card to get visual aid on boot pin.
Tell me if this solves your timeout problem.
Best regards,
Thomas
2025-07-10 11:20 AM
I'm using a STM32MP157F-DK2 and I don't know if this could be your problem: I was having intermittent problems when trying to flash. The STM Linux Device was told to disconnect and would not reconnect. I would have to restart the DK2 because that port was dead.
What fixed my problems was disconnecting the cable from the USB Micro port.
2025-07-10 11:11 PM
HI @Theo_
that's could be due to VM setting which does not route correctly the USB to VM on USB reconnect (uBoot initialize DFU with slightly different USB profile than BootROM).
Regards.
2025-07-11 1:18 AM
Hi,
@ThomasB, Yes the boot pins are on 0000.
@smanger It does look like our devices are getting deconnected. But yours seems to be working correctly for a few partitions dl. While mine seems to be deconnected at the very beginning (for the first partition dl).
You say what fixed your problem was disconnecting a micro USB cable ? But on my board (MP135F), I have only 2 USB-C cables (one for power and one for image flashing). Maybe our boards differ on that point idk.
@PatrickF I've read some things about ST supporting VMware for VMs and so, not especially supporting OracleVM. What do you think ? Should I switch to VMware ?
It does indeed feels like my problem comes from the VM since the peripheral (my st board) is getting disconnected on the VM tools on the top of the UI. Could you give me some more information on how to route correctly the uBoot's usb profile ?
Thank you all for all the answers.
Théo
2025-07-11 2:00 AM - edited 2025-07-11 2:00 AM
Hi,
I cannot tell for other VM like the OracleVM, but once USB fail to reconnect (do not reset the board), you might see the DFU on Windows device manager (instead of having it visible inside Linux VM).
There is likely some menu in the VM settings to tell that this peripheral has to be taken by the VM (and not Windows host).
As a fallback, you could also load starter package into the board using cubeprogrammer on windows (VM must be stopped).
Regards.
2025-07-11 7:22 AM
It finally worked.
I ended up switching to VMware for my VMs. As said in https://wiki.st.com/stm32mpu/wiki/PC_prerequisites
"ST has selected VMWare as Linux virtual machine solution."
Which I hardly recommand you go trough and listen :) !
It does feel like the USB devices managing is done better in VMWare as whenever you plug a device it asks in which (between host OS and VM) you would like to connect the USB to.
Yes @PatrickF there were indeed some settings in VM to tell a peripheral to be directly taken by the VM but it didn't make things better for me.
Thank you for your help.
Théo
2025-07-13 5:06 AM
reconnected usb and download again