cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157C-DK2 fails to flash the image on the board

JE_SP
Associate

os: Ubuntu (wsl)

I am trying to follow the steps as below:

https://wiki.st.com/stm32mpu/wiki/STM32MP15_Discovery_kits_-_Starter_Package#Installing_the_tools

However, step 6.2 Image flashing cannot be completed.

When I entered the command below, it iterated only for the tf-a-stm32mp157c-dk2-usb.stm32 file.

Here are printed messages.

root@jesong:/home/STM32MP157C-DK2/STM32MPU_workspace/STM32MP1-Ecosystem-v5.0.0/Starter-Package/stm32mp1-openstlinux-6.1-yocto-mickledore-mp1-v23.06.21/images/stm32mp1# STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp157c-dk2-optee.tsv
-------------------------------------------------------------------
STM32CubeProgrammer v2.16.0
-------------------------------------------------------------------

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

Start Embedded Flashing service

Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2-usb.stm32
File : tf-a-stm32mp157c-dk2-usb.stm32
Size : 220.40 KB
Partition ID : 0x01

Download in Progress:
[==================================================] 100%

File download complete
Time elapsed during download operation: 00:00:03.013

RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01


Memory Programming ...
Opening and parsing file: tf-a-stm32mp157c-dk2-usb.stm32
File : tf-a-stm32mp157c-dk2-usb.stm32
Size : 220.40 KB
Partition ID : 0x01

Download in Progress:
[==================================================] 100%

File download complete
Time elapsed during download operation: 00:00:02.143

RUNNING Program ...
PartID: :0x01
Start operation done successfully at partition 0x01

I've also attached part of my log.

 

2 REPLIES 2
PatrickF
ST Employee

HI @JE_SP 

strange to have twice TF-A load in the log file (maybe just because you tried twice).

Could you share the console log (using ST-Link USB which should show a VCP on your PC) ?

I see "Ubuntu (wsl)" , do this mean you are running Linux on a Windows WSL machine ?

Could you try Cubeprogrammer on a Windows machine or a Linux native machine ?

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.
Tip of the day: Try Sidekick STM32 AI agent, see here

Hi, @PatrickF 

Thank you for your response.

I wrote to answer your question.

 

strange to have twice TF-A load in the log file (maybe just because you tried twice).

>> I think I wrote in a way that could lead to misunderstanding. (so I edited)
However, I entered that command only once.

 

Could you share the console log (using ST-Link USB which should show a VCP on your PC) ?

>> I already attached the log file, is there another way to get the log?

I got the log using "-log trace_optee.log" option.

Below is part of the contents of the file I attached.

07:50:12:005 -------------------------------------------------------------------
07:50:12:005 STM32CubeProgrammer v2.16.0
07:50:12:005 -------------------------------------------------------------------

07:50:12:005

07:50:12:005 Log output file: trace_optee.log
07:50:12:005 Command line: -c port=usb1 -w "flashlayout_st-image-weston/optee/FlashLayout_sdcard_stm32mp157c-dk2-optee.tsv" -log "trace_optee.log"
07:50:12:005
07:50:12:006
07:50:12:006
07:50:12:024 Device Descriptor:
07:50:12:024 |_bLength : 0x12
07:50:12:024 |_bDescriptorType : 0x01
07:50:12:024 |_bcdUSB : 0x0200
07:50:12:024 |_bDeviceClass : 0x00
07:50:12:024 |_bDeviceSubClass : 0x00
07:50:12:024 |_bDeviceProtocol : 0x00
07:50:12:024 |_bMaxPacketSize : 0x40
07:50:12:024 |_idVendor : 0x0483
07:50:12:024 |_idProduct : 0xdf11
07:50:12:024 |_bcdDevice : 0x0200
07:50:12:024 |_iManufacturer : 0x01
07:50:12:024 |_iProduct : 0x02
...

 

I see "Ubuntu (wsl)" , do this mean you are running Linux on a Windows WSL machine ?

>> Exactly Yes!!

 

Could you try Cubeprogrammer on a Windows machine or a Linux native machine ?

>> If my running in wsl could be causing the problem, I'll try again with the method you suggested.