2026-03-23 5:20 PM - last edited on 2026-03-24 3:32 AM by Andrew Neil
Despite my best efforts to populate and boot the the image of the STM32MP157-DK2 using the .tsv files I am met with a mixed result To date I have yet to establish a USB connection despite following the procedures at wiki. The UART connection is working. My environment is as follows ...
Ubuntu 24.04.4 LTS - stm32mp1-openstlinux-6.6-yocto-scarthgap-mpu-v26.02.18 - STM32CubeProgrammer v2.22.0 and STM32_Programmer_CLI
Be it that I use STM32CubeProg or the STM32_Programmer_CLI terminal interface the FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv is not found despite the path being correct. Yet I am able to flash tf-a-stm32mp157c-dk2-optee-programmer-usb.stm32 0x01 or tf-a-stm32mp157f-dk2-optee-programmer-usb.stm32 0x01 using the terminal which was the first value in a sequence of the .tsv file (see kate as an example). The same conundrum occurs using STM32CubeProg. Might you suggest how I might resolve this problem - be it in establishing a USB connection or flashing the sd card using a different approach? Thanks in advance for your assistance. Much appreciated.
Solved! Go to Solution.
2026-04-05 12:48 PM - edited 2026-04-09 1:32 PM
I have determined that the power supply is not the problem. I have since ordered a replacement cable for CN7 as it is defective. Replaced the cable and the problem has been solved. Thanks for your assistance, Regards.
2026-03-24 3:24 AM
Hi @DigiCode
I'm on windows, but command line should be similar on Linux.
I'm using the following, run from the folder "...\stm32mp1-openstlinux-6.6-yocto-scarthgap-mpu-vxx.xx.xx\images\stm32mp1\"
"%ProgramFiles%\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\STM32_Programmer_CLI.exe" -c port=usb1 -w flashlayout_st-image-weston\optee\FlashLayout_sdcard_stm32mp157f-dk2-optee.tsv
in case of issue, please BOOT pins and also check UART console log for potential error messages (could be due to supply not USB-C compliant).
Regards.
2026-03-26 2:11 PM - edited 2026-03-26 2:31 PM
Patrick thanks for your response. I had previously followed the link that you provided to no avail - since then I have corrected the paths to the values within the .tsv files and I am now working towards the inspection of the UART log files. Regardless I have a question? In adjusting the paths within the .tsv am I screwing up a structure that is causing timeout errors?
On another note: the naming convention of the files at this end do differ so in changing them to match the files as this end does that ripple through and cause bigger problems? Perhaps I need to adjust the baud rate? It does not appear to be a power supply problem. Regards.
./STM32_Programmer_CLI -c port=ttyACM0 -w $HOME/STM32MPU-Ecosystem-v6.1.0/Starter-Package/stm32mp1-openstlinux-6.6-yocto-scarthgap-mpu-v26.02.18/images/stm32mp1/flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp157f-dk2-trusted.tsv
-------------------------------------------------------------------
STM32CubeProgrammer v2.22.0
-------------------------------------------------------------------
Serial Port ttyACM0 is successfully opened.
Port configuration: parity = even, baudrate = 115200, data-bit = 8, stop-bit = 1.0, flow-control = off
Activating device: OK
Board : --
Chip ID: 0x500
BootLoader protocol version: 4.0
Device name : STM32MP15xx
Device type : MPU
Revision ID : --
Device CPU : Cortex-A7
Start Embedded Flashing service
Opening and parsing file: tf-a-stm32mp157c-dk2-optee-programmer-usb.stm32
Memory Programming ...
File : tf-a-stm32mp157c-dk2-optee-programmer-usb.stm32
Size : 216.41 KB
Partition ID : 0x01
Download in Progress:
[==================================================] 100%
File download complete
Time elapsed during download operation: 00:00:25.103
RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01
Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
Timeout error occured while waiting for acknowledgement.
^C
2026-03-27 12:33 AM
Hi @DigiCode
I forgot to notice that you were trying to download using UART. This is not supported for whole package, only for debug purposes (e.g. to load small bare-metal test program).
Please use USB (CN7 to connect to the PC as USB DFU). STLINK port is only for UART console (VCP) or debug.
In the CLI command line, use the "port=<DEVICE_PORT_LOCATION>" with the USB one:
Regards.
2026-03-30 3:20 PM
Hi Patrick,
please provide a part number for the USB-C compliant power supply (5V 3A) that is recommended by ST? The power supply at wiki.st.com is European and appears to be the gold standard of a Raspberry Pi. At this end I will require a North American version. FWIW DigiKey offers the SC1412 and a separate North American adapter PWREU-US. Is this the P/S that ST recommends?? My St-Link is now connecting, but it too times out??? My preference would be to forego the use of a North American adapter.
Thanks in advance for your assistance.
2026-03-31 12:40 AM
Hi,
maybe the supply is not your first issue (most USB-C phone/laptop chargers work fine, especially if they are stated USB-C-PD, issue is more on cheap USB-C pure supply not having any CC lines, or using cheap charger cables without CC lines). The SC1412 will probably not work.
You could maybe supply thru an USB-C laptop port (even if 5V 900mA is too low for most cases, it might not avoid the flashload).
With CubeProgrammer, could you please use USB CN7 instead of STLINK (which is only for debug or UART console).
After powering up the board with CN6 (with BOOT pins as stated in wiki), red led LD6 should stop flashing when you connect CN7 to a PC. This mean USB DFU enumeration is correct and you should see the USB on the PC (LD6 could stay on or off, doesn't matter at that point)
Then start CubeProgrammer command line, using USB as connection port (not ttyxxx).
Flashloading starter package with STLINK/UART is not supported (and it is too slow).
Regards.
2026-04-05 12:48 PM - edited 2026-04-09 1:32 PM
I have determined that the power supply is not the problem. I have since ordered a replacement cable for CN7 as it is defective. Replaced the cable and the problem has been solved. Thanks for your assistance, Regards.