Skip to main content
Visitor II
January 31, 2022
Solved

Bug report: STM32CubeProgrammer flash failure on STM32MP1

  • January 31, 2022
  • 1 reply
  • 1353 views

On my Ubuntu 20.04, Flashing of STM32MP157C-DK2 with STMCubeProgrammer fails with the following error I easily reproduced using the scripts:

$ STM32_Programmer.sh -c port=usb1 -w FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv
 -------------------------------------------------------------------
 STM32CubeProgrammer v2.9.0 
 -------------------------------------------------------------------
 
 
 
USB speed : High Speed (480MBit/s)
Manuf. ID : STMicroelectronics
Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
SN : 002C002E3338511134383330
FW version : 0x0110
Board : --
Device ID : 0x0500
Device name : STM32MP1
Device type : MPU
Revision ID : -- 
Device CPU : Cortex-A7
 
 
Start Embedded Flashing service
 
Error: File does not exist: /users/vincent/Documents/03_DEV/STM32MP1/en.FLASH-stm32mp1-openstlinux-5-10-dunfell-mp1-21-11-17_tar_v3.1.0/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1/flashlayout_st-image-weston/trusted/arm-trusted-firmware/tf-a-stm32mp157c-dk2-usb.stm32
Error: TSV flashing service failed

Indeed, the programmer is looking at a path which does not match with current filesystem.

I have got this errors for all the files the programmer was looking for. I have solved it by adding to symbolic links (instead of moving directories). For example:

0 [30 janv.-16:09:33] vincent@colin:~/Documents/03_DEV/STM32MP1/en.FLASH-stm32mp1-openstlinux-5-10-dunfell-mp1-21-11-17_tar_v3.1.0/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1/flashlayout_st-image-weston/trusted
$ ln -s ../../arm-trusted-firmware/ .

    This topic has been closed for replies.
    Best answer by Olivier GALLIEN

    Hi @vlacr.1​ ,

    tsv file are built with related path to binaries from "/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1"

    You have to run CubeProg from this path and use CLI command :

    vincent@colin: cd ~/Documents/03_DEV/STM32MP1/en.FLASH-stm32mp1-openstlinux-5-10-dunfell-mp1-21-11-17_tar_v3.1.0/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1
    vincent@colin: STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

    Olivier

    1 reply

    Technical Moderator
    January 31, 2022

    Hi @vlacr.1​ ,

    tsv file are built with related path to binaries from "/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1"

    You have to run CubeProg from this path and use CLI command :

    vincent@colin: cd ~/Documents/03_DEV/STM32MP1/en.FLASH-stm32mp1-openstlinux-5-10-dunfell-mp1-21-11-17_tar_v3.1.0/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1
    vincent@colin: STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

    Olivier

    vlacr.11Author
    Visitor II
    February 8, 2022

    Hello @Community member​ ,

    Ok understood. Thanks for your answer. I think we can close this ticket.

    Best Regards,

    Vincent

    Technical Moderator
    February 9, 2022

    Hi @vlacr.1​ ,

    Thanks for feedback ! :smiling_face_with_smiling_eyes:

    In this Q&A forum, the only and best way to close a conversation is to mark as "Best answer" the answer which help you.

    Thanks

    Olivier