cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to flash with STM32CubeProgrammer

SimonHuwyler
Associate II

Hi,

I just installed STM32CubeProgrammer v2.17.0 on Linux.

When I connect to the board (tried with several different ones), I get the following error;

flash loader cannot be loaded. FlashLoaderPath = /home/[yadayada]/bin/FlashLoader/0x

I can read the flash, I can do everything, with the exception of flashing. This fails.

I first thought it might be a truncated log message. But when I just copied any of the loader files and gave it the file name "0x", I didn't get the error message. So it really looks for a file named "0x". It looks like in the code, the assembly of the file name (all the files match the pattern 0x*.stldr)

 

I tried to do an software update, but this also fails: "The updater package on server is corrupted"

 

 

35 REPLIES 35
Cesare Riva
Associate II

Hi everyone,
I am running Linux Mint 22.3 XFCE edition and I am experiencing exactly the same problem described in this thread.
The problem started after a system upgrade. Luckily, I had an almost identical copy of my development environment running in a virtual machine, so I started upgrading one package at a time until I identified the package causing the issue.
The meta package name shown in the Update Manager is "mesa"

update_manager_mesa.png

The affected packages are the ones listed in the screenshots:

• libegl-mesa0
• libgbm1
• libgl1-mesa-dri
• libglx-mesa0
• mesa-libgallium
• mesa-va-drivers
• mesa-vdpau-drivers
• mesa-vulkan-drivers

In my specific case, the issue was triggered when upgrading from version 25.0.7 to 25.2.8.
I then tried to downgrade these packages back to version 25.0.7 but it seems that version was removed from the repository; the only version available was 24.0.5.


You can check the available package versions in the repository using:

apt-cache policy <package-name>
cesare@cesare-vbox:~/issue$ apt-cache policy libgbm1
libgbm1:
  Installed: 24.0.5-1ubuntu1
  Candidate: 25.2.8-0ubuntu0.24.04.1
  Version table:
     25.2.8-0ubuntu0.24.04.1 500
        500 http://archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
 *** 24.0.5-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu noble/main amd64 Packages
        100 /var/lib/dpkg/status

 

After multiple attempts, I was able to fix the issue by downgrading the offending packages to version 24.0.5:

sudo apt install libegl-mesa0=24.0.5-1ubuntu1 libgbm1=24.0.5-1ubuntu1 libgl1-mesa-dri=24.0.5-1ubuntu1 libglx-mesa0=24.0.5-1ubuntu1 libglapi-mesa=24.0.5-1ubuntu1 mesa-va-drivers=24.0.5-1ubuntu1 mesa-vdpau-drivers=24.0.5-1ubuntu1 mesa-vulkan-drivers=24.0.5-1ubuntu1

 

@Kouthair 
I hope this helps the STM team identify the root cause.

Same issue here, I tried your suggested fix (downgrading the list of packages) and it worked for me

nilesh-dryad
Associate III

Yes it happened automatically with some system module update. It was working fine and suddenly stopped working. 

Kouthair
ST Employee

Hello everyone,

This issue has been fixed in STM32CubeProgrammer v2.22. You can download it via this link.

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.

Tested and 2.22 Works for me using a STV3MOD.

 

Great analysis... downgrading the packages resolved the issue completely. With a STM32F103 in computer running Ubuntu 22 with STM32CubeProgrammer v2.16, everything works correctly using the same ST-Link. However, on a machine with Ubuntu 24, I was encountering the error: “Mass erase operation failed. Please verify flash protection.”

After downgrading the packages, this error no longer occurs too