Skip to main content
MVENN.1
Associate III
November 21, 2020
Solved

How to launch STM32Cubeprogrammer in ubuntu can you please tell me.

  • November 21, 2020
  • 23 replies
  • 11126 views

i am not able to flash the image in stm32mp157c-dk2

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

Hi @MVENN.1​ ,

Only the last version 2.6 is supported on Ubuntu 20.04.

And since this version the JRE is bundle inside STM32CubeProgrammer and no longer need extra JRE package.

Olivier

23 replies

MVENN.1
MVENN.1Author
Associate III
November 24, 2020

When i flash the image in between connection is loss

Olivier GALLIEN
Technical Moderator
November 24, 2020

Hi @MVENN.1​ 

Please follow carefully the Getting Started

Just pay attention that when reconnecting during download the USB device is well catch by your Virtual Machine and not your host

Olivier

Olivier GALLIEN 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.
MVENN.1
MVENN.1Author
Associate III
November 24, 2020

look at this once please provide suggestion.

12:03:28 : STM32CubeProgrammer API v2.6.0

12:03:35 : USB speed : High Speed (480MBit/s)

12:03:35 : Manuf. ID : STMicroelectronics

12:03:35 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

12:03:35 : SN : 0046003E3338510634383330

12:03:35 : FW version : 0x0110

12:03:35 : Device ID : 0x0500

12:03:41 : Read TSV File: D:\Projects\Tag\stm32MP1\stm32mp1-openstlinux\images\stm32mp1\flashlayout_st-image-weston\FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

12:03:41 : Number of partitions: 9

12:03:59 : Start Embedded Flashing service

12:03:59 : Memory Programming ...

12:03:59 : Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32

12:03:59 : File : tf-a-stm32mp157c-dk2-trusted.stm32

12:03:59 : Size : 245364 Bytes

12:03:59 : Partition ID : 0x01 

12:03:59 : Download in Progress:

12:04:00 : File download complete

12:04:00 : Time elapsed during download operation: 00:00:00.534

12:04:00 : RUNNING Program ... 

12:04:00 : PartID: :0x01 

12:04:00 : Start operation done successfully at partition 0x01

12:04:00 : Flashlayout Programming ...

12:04:00 : Running Flashlayout Partition ...

12:04:00 : Flashlayout partition started successfully

12:04:00 : Memory Programming ...

12:04:00 : Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32

12:04:00 : File : u-boot-stm32mp157c-dk2-trusted.stm32

12:04:00 : Size : 805514 Bytes

12:04:00 : Partition ID : 0x03 

12:04:00 : Download in Progress:

12:04:01 : File download complete

12:04:01 : Time elapsed during download operation: 00:00:00.992

12:04:01 : RUNNING Program ... 

12:04:01 : PartID: :0x03 

12:04:01 : reconnecting the device ...

12:04:31 : Error: unable to reconnect the target device: time out expired

12:04:31 : Error: Start operation failed at partition 0x03

12:04:31 : Error: TSV flashing service failed

12:04:31 : Warning: Connection to device 0x500 is lost

12:04:32 : Disconnected from device.

Thanks

PatrickF
Technical Moderator
November 24, 2020
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.NEW ! Sidekick STM32 AI agent, see here
MVENN.1
MVENN.1Author
Associate III
November 24, 2020

Hi PatrickF(ST Employee)

Thank you for reply

I am using 5V/2A power supply. And also red led Blink continue.

can you just tell the where is the mistake i did.

Thank you.

MVENN.1
MVENN.1Author
Associate III
November 25, 2020

Hi

Thank you for given this information.

I can able to flash the image on SD card in STM32CubeProgrammer in Windows.

After Booting( ON position ) i am getting default images like

0693W000005CbPRQA0.jpg0693W000005CbQAQA0.jpgAfter that this image only showing last 10 min onwards

i am not getting this image down one .

0693W000005CbRNQA0.jpg any one can reply.

Thanks.

Olivier GALLIEN
Technical Moderator
November 25, 2020

Hi @MVENN.1​ 

Very first boot after flash may take some time because there is file system uncompressed operation.

10min looks anyway very long.

Please plug a cable to get serial console and look what happen there

Olivier

Olivier GALLIEN 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.
MVENN.1
MVENN.1Author
Associate III
November 25, 2020

Hi Oliver GALLIEN (ST Emplloyee )

How to plug the cable on to the PC.

Thanks.

Olivier GALLIEN
Technical Moderator
November 25, 2020

Hi @MVENN.1​ 

Which tsv did you load on target ?

Are you sure flashload completed with success ?

Olivier

Olivier GALLIEN 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.
MVENN.1
MVENN.1Author
Associate III
November 25, 2020

Hi Olivier GALLIEN ( ST Employee )

I am loading E:\Shared_floder_window\stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12\images\stm32mp1\flashlayout_st-image-weston\trusted

tsv file FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

Binary path :E:\Shared_floder_window\stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12\images\stm32mp1

21:11:10 : USB speed : High Speed (480MBit/s)

21:11:10 : Manuf. ID : STMicroelectronics

21:11:10 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

21:11:10 : SN : 0034001A3438510438333630

21:11:10 : FW version : 0x0110

21:11:10 : Device ID : 0x0500

21:11:24 : Start Embedded Flashing service

21:11:24 : Memory Programming ...

21:11:24 : Opening and parsing file: tf-a-stm32mp157c-dk2-serialboot.stm32

21:11:24 : File : tf-a-stm32mp157c-dk2-serialboot.stm32

21:11:24 : Size : 237896 Bytes

21:11:24 : Partition ID : 0x01 

21:11:24 : Download in Progress:

21:11:25 : File download complete

21:11:25 : Time elapsed during download operation: 00:00:00.490

21:11:25 : RUNNING Program ... 

21:11:25 : PartID: :0x01 

21:11:25 : Start operation done successfully at partition 0x01

21:11:25 : Flashlayout Programming ...

21:11:25 : Running Flashlayout Partition ...

21:11:25 : Flashlayout partition started successfully

21:11:25 : Memory Programming ...

21:11:25 : Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32

21:11:26 : File : u-boot-stm32mp157c-dk2-trusted.stm32

21:11:26 : Size : 904820 Bytes

21:11:26 : Partition ID : 0x03 

21:11:26 : Download in Progress:

21:11:27 : File download complete

21:11:27 : Time elapsed during download operation: 00:00:00.993

21:11:27 : RUNNING Program ... 

21:11:27 : PartID: :0x03 

21:11:27 : reconnecting the device ...

21:11:30 : USB speed : High Speed (480MBit/s)

21:11:30 : Manuf. ID : STMicroelectronics

21:11:30 : Product ID : USB download gadget@Device ID /0x500, @Revision ID /0x2000, @Name /STM32MP157CAC Rev.B,

21:11:30 : SN : 0034001A3438510438333630

21:11:30 : FW version : 0x0110

21:11:30 : Device ID : 0x0500

21:11:30 : Start operation done successfully at partition 0x03

21:11:30 : Memory Programming ...

21:11:30 : Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32

21:11:31 : File : tf-a-stm32mp157c-dk2-trusted.stm32

21:11:31 : Size : 233800 Bytes

21:11:31 : Partition ID : 0x04 

21:11:31 : Download in Progress:

21:11:31 : File download complete

21:11:31 : Time elapsed during download operation: 00:00:00.163

21:11:31 : RUNNING Program ... 

21:11:31 : PartID: :0x04 

21:11:31 : Start operation done successfully at partition 0x04

21:11:31 : Memory Programming ...

21:11:31 : Opening and parsing file: tf-a-stm32mp157c-dk2-trusted.stm32

21:11:31 : File : tf-a-stm32mp157c-dk2-trusted.stm32

21:11:31 : Size : 233800 Bytes

21:11:31 : Partition ID : 0x05 

21:11:31 : Download in Progress:

21:11:31 : File download complete

21:11:31 : Time elapsed during download operation: 00:00:00.132

21:11:31 : RUNNING Program ... 

21:11:31 : PartID: :0x05 

21:11:31 : Start operation done successfully at partition 0x05

21:11:31 : Memory Programming ...

21:11:31 : Opening and parsing file: u-boot-stm32mp157c-dk2-trusted.stm32

21:11:31 : File : u-boot-stm32mp157c-dk2-trusted.stm32

21:11:31 : Size : 904820 Bytes

21:11:31 : Partition ID : 0x06 

21:11:31 : Download in Progress:

21:11:31 : File download complete

21:11:31 : Time elapsed during download operation: 00:00:00.483

21:11:31 : RUNNING Program ... 

21:11:31 : PartID: :0x06 

21:11:32 : Start operation done successfully at partition 0x06

21:11:32 : Memory Programming ...

21:11:32 : Opening and parsing file: st-image-bootfs-openstlinux-weston-stm32mp1.ext4

21:11:32 : File : st-image-bootfs-openstlinux-weston-stm32mp1.ext4

21:11:32 : Size : 64 MBytes

21:11:32 : Partition ID : 0x21 

21:11:32 : Download in Progress:

21:12:19 : File download complete

21:12:19 : Time elapsed during download operation: 00:00:46.408

21:12:19 : RUNNING Program ... 

21:12:19 : PartID: :0x21 

21:12:19 : Start operation done successfully at partition 0x21

21:12:19 : Memory Programming ...

21:12:19 : Opening and parsing file: st-image-vendorfs-openstlinux-weston-stm32mp1.ext4

21:12:19 : File : st-image-vendorfs-openstlinux-weston-stm32mp1.ext4

21:12:19 : Size : 16 MBytes

21:12:19 : Partition ID : 0x22 

21:12:19 : Download in Progress:

21:12:31 : File download complete

21:12:31 : Time elapsed during download operation: 00:00:11.629

21:12:31 : RUNNING Program ... 

21:12:31 : PartID: :0x22 

21:12:31 : Start operation done successfully at partition 0x22

21:12:31 : Memory Programming ...

21:12:31 : Opening and parsing file: st-image-weston-openstlinux-weston-stm32mp1.ext4

21:12:35 : File : st-image-weston-openstlinux-weston-stm32mp1.ext4

21:12:35 : Size : 407630 KBytes

21:12:35 : Partition ID : 0x23 

21:12:35 : Download in Progress:

21:17:34 : File download complete

21:17:34 : Time elapsed during download operation: 00:04:58.568

21:17:34 : RUNNING Program ... 

21:17:34 : PartID: :0x23 

21:17:34 : Start operation done successfully at partition 0x23

21:17:34 : Memory Programming ...

21:17:34 : Opening and parsing file: st-image-userfs-openstlinux-weston-stm32mp1.ext4

21:17:37 : File : st-image-userfs-openstlinux-weston-stm32mp1.ext4

21:17:37 : Size : 128 MBytes

21:17:37 : Partition ID : 0x24 

21:17:37 : Download in Progress:

21:19:12 : File download complete

21:19:12 : Time elapsed during download operation: 00:01:35.201

21:19:12 : RUNNING Program ... 

21:19:12 : PartID: :0x24 

21:19:12 : Start operation done successfully at partition 0x24

21:19:12 : Flashing service completed successfully

21:23:35 : Start Embedded Flashing service

21:23:35 : Flashing service completed successfully

21:24:00 : Start Embedded Flashing service

21:24:00 : Flashing service completed successfully

In console

UPLOAD ... done

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

##DOWNLOAD ... OK

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

##################################################DOWNLOAD ... OK

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

################Phase=END

DOWNLOAD ... OK

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

#

UPLOAD ... done

Ctrl+C to exit ...

this one please check it. I connected USB keyboard also Ctrl+C not taken.

Thanks.

Olivier GALLIEN
Technical Moderator
November 25, 2020

All looks good.

Now please share complete Linux boot log ( preferably using "Attach file "feature )

Thanks

Olivier

Olivier GALLIEN 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.
MVENN.1
MVENN.1Author
Associate III
November 25, 2020

Hi Olivier GALLIEN ( ST Employee )

Through windows ( STM32CubeProgrammer 2.5.0 ) only I am flashing the image.

please check it.

MVENN.1
MVENN.1Author
Associate III
November 26, 2020

Hi Olivier GALLIEN ( ST Employee )

please check the below log file in Linux

Update me i really struct this probelm.

moveon@moveon-VirtualBox:/$ mkdir /home/moveon/STM32MPU_workspace

moveon@moveon-VirtualBox:/$ mkdir /home/moveon/STM32MPU_workspace/STM32MPU-Tools

moveon@moveon-VirtualBox:/$ ls

bin  cdrom etc  lib  lib64  lost+found mnt proc run  snap swapfile tmp var

boot dev  home lib32 libx32 media    opt root sbin srv  sys    usr

moveon@moveon-VirtualBox:/$ cd /home/moveon/STM32MPU_workspace/STM32MPU-Tools

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ ls

en.stm32cubeprg-lin_v2-6-0.zip

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ unzip en.stm32cubeprg-lin_v2-6-0.zip

Archive: en.stm32cubeprg-lin_v2-6-0.zip

  creating: jre/

  creating: jre/bin/

  ..

 inflating: SetupSTM32CubeProgrammer-2.6.0.exe  

 inflating: SetupSTM32CubeProgrammer-2.6.0.linux  

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ ls

en.stm32cubeprg-lin_v2-6-0.zip jre SetupSTM32CubeProgrammer-2.6.0.exe SetupSTM32CubeProgrammer-2.6.0.linux

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ ./SetupSTM32CubeProgrammer-2.6.0.linux 

./SetupSTM32CubeProgrammer-2.6.0.linux

/home/moveon/STM32MPU_workspace/STM32MPU-Tools

chdir /home/moveon/STM32MPU_workspace/STM32MPU-Tools/.

current dir /home/moveon/STM32MPU_workspace/STM32MPU-Tools

Command line arguments: 

====================

Installation started

Framework: 1.8.0_192-BellSoft-b03 (Oracle Corporation)

Platform: ubuntu_linux,version=5.4.0-53-generic,arch=x64,symbolicName=null,javaVersion=1.8.0_265

Installation finished

WARNING: using deprecated Desktop Entry key Encoding with value UTF-8

WARNING: using deprecated Desktop Entry key Encoding with value UTF-8

WARNING: using deprecated Desktop Entry key Encoding with value UTF-8

WARNING: using deprecated Desktop Entry key Encoding with value UTF-8

WARNING: using deprecated Desktop Entry key Encoding with value UTF-8

WARNING: using deprecated Desktop Entry key Encoding with value UTF-8

[ Writing the uninstaller data ... ]

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ export PATH=/home/moveon/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin//:$PATH

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ STM32_Programmer_CLI --h

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.6.0          

   -------------------------------------------------------------------

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ sudo apt-get install libusb-1.0-0

[sudo] password for moveon: 

Reading package lists... Done

Building dependency tree    

Reading state information... Done

libusb-1.0-0 is already the newest version (2:1.0.23-2build1).

The following packages were automatically installed and are no longer required:

 libdlt2 libfprint-2-tod1 openjfx-source

Use 'sudo apt autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 40 not upgraded.

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ mkdir /home/moveon/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MPU-Tools$ cd ..

moveon@moveon-VirtualBox:~/STM32MPU_workspace$ ls

STM32MP15-Ecosystem-v2.1.0 STM32MPU-Tools

moveon@moveon-VirtualBox:~/STM32MPU_workspace$ mkdir Starter-Package

moveon@moveon-VirtualBox:~/STM32MPU_workspace$ cd STM32MP15-Ecosystem-v2.1.0/

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0$ mkdir Starter-Package

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0$ ls

Starter-Package

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0$ cd Starter-Package/

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package$ ls

en.FLASH-stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12.tar.xz

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package$ tar xvf en.FLASH-stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12.tar.xz

stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/

stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/

stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1/

stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1/st-image-weston-openstlinux-weston-stm32mp1.license

....

stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1/st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package$ STM32_Programmer_CLI -l usb

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.6.0          

   -------------------------------------------------------------------

===== DFU Interface  =====

Total number of available STM32 device in DFU mode: 1

 Device Index      : USB1

 USB Bus Number     : 001

 USB Address Number   : 002

 Product ID       : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000

 Serial number     : 0034001A3438510438333630

 Firmware version    : 0x0110

 Device ID       : 0x0500

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package$ ls

en.FLASH-stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12.tar.xz stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images$ cd stm32mp1/

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1$ ls

arm-trusted-firmware                 st-image-userfs-openstlinux-weston-stm32mp1.manifest

bootloader                      st-image-vendorfs-openstlinux-weston-stm32mp1.ext4

flashlayout_st-image-weston              st-image-weston-openstlinux-weston-stm32mp1.ext4

optee                         st-image-weston-openstlinux-weston-stm32mp1.license

scripts                        st-image-weston-openstlinux-weston-stm32mp1-license_content.html

st-image-bootfs-openstlinux-weston-stm32mp1.ext4   st-image-weston-openstlinux-weston-stm32mp1.manifest

st-image-bootfs-openstlinux-weston-stm32mp1.manifest st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi

st-image-userfs-openstlinux-weston-stm32mp1.ext4

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1$ STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

   -------------------------------------------------------------------

            STM32CubeProgrammer v2.6.0          

   -------------------------------------------------------------------

USB speed  : High Speed (480MBit/s)

Manuf. ID  : 

Product ID : 

SN     : 

FW version : 0x0110

IAP

Error: TSV files are only supported for STM32MP

moveon@moveon-VirtualBox:~/STM32MPU_workspace/STM32MP15-Ecosystem-v2.1.0/Starter-Package/stm32mp1-openstlinux-5-4-dunfell-mp1-20-11-12/images/stm32mp1$ 

Thank.

Olivier GALLIEN
Technical Moderator
November 26, 2020

Hi @MVENN.1​ 

First path flashlayout_st-image-weston/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv is strange

might be flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157c-dk2-trusted.tsv

But this do not explain the connection problem.

Looks like you loose target connection between :

$ STM32_Programmer_CLI -l usb

and

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

Did you change anything in between ?

Can you check "STMicroelectronics DFU " device is still visible from you Virtual Box prior to launch the flashload command ?

Else I'm a bit puzzled since you previously report success in flashing but stuck in boot and I requested linux boot log console.

Please clarify.

Olivier

Olivier GALLIEN 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.
MVENN.1
MVENN.1Author
Associate III
November 26, 2020

Hi Olivier GALLIEN (ST Employee )

Thank you for reply

Actually previous report is flashing succeed in windows platform.

I now flashing Linux(Ubuntu20.04 its getting error like

0693W000005CjwJQAS.jpgplease check it.

Thanks.

MVENN.1
MVENN.1Author
Associate III
November 26, 2020

Hi Olivier GALLIEN (ST Employee )

Thank you for reply

Actually previous report is flashing succeed in windows platform.

I now flashing Linux(Ubuntu20.04 its getting error like0693W000005CkAfQAK.jpg 

please check it .

Thanks.