3

I installed STM32CubeProgrammer in Ubuntu 18.04.3 LTS with the intention of solving an error that I get when attempting to flash micro controllers in my STM32WB55 Nucleo Pack, but STM32CubeProgrammer doesn't launch upon installation.

Nothing happens when I click on the icon in the launcher and I didn't find any executable files for launching the program. How can I proceed?

5 Answers 5

4

The instructions in section 1.2.1 of the STM32CubeProgrammer software description worked for me.

I installed openjdk-8

sudo apt install openjdk-8-jre-headless

I set selected java-8 as my default run time engine

sudo update-alternatives --config java

and installed the following packages

sudo apt purge openjfx
sudo apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2
sudo apt-mark hold openjfx libopenjfx-jni libopenjfx-java

Then I installed the STM32CubeProgrammer as I had done earlier

sudo ./SetupSTM32CubeProgrammer-2.2.1.linux

The last page of the installation procedure mentioned the path to the program files. The following path now leads to the program files on my system

/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/

The program can be launched using

sudo /usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/./STM32CubeProgrammer
8
  • 1
    Has anyone gotten this to work under Ubuntu 20.04? May 16, 2020 at 20:43
  • 1
    @DanielGlasser did you make it? If so, can you please tell me what to do?
    – muyustan
    Jun 6, 2020 at 10:02
  • 1
    @muyustan Unfortunately, not yet. I did manage to get the programmer working with Windows 10, but it's not an ideal solution. I think that STMicro needs to update their software to use a closer to current version of the libraries. Jun 13, 2020 at 21:55
  • @DanielGlasser ok, I made it, let me share how I did it in Ubuntu 20.04. ---------- I have followed the link below and installed java from Oracle. Then it worked when I changed the default java version. fosstechnix.com/install-oracle-java-8-on-ubuntu
    – muyustan
    Jun 13, 2020 at 21:56
  • 1
    @muyustan Thanks; I'll try that as soon as I can. Jun 13, 2020 at 22:00
1

The other solutions mentioned here did not work for me on Ubuntu20.04.

According to a user on the ST forum (source), the JDK8 compatible version of openjfx is not available for Focal Fossa.

This StackOverflow question describes a simple and effective solution.

To get around this issue you can install an OpenJDK version that includes JavaFX.

I installed Liberica (making sure to select the full JDK) Running

sudo dpkg -i /path/to/bellsoft-jdk8u275+1-linux-amd64-full.deb

This installs the JDK and updates alternatives. (no need to run sudo update-alternatives --config java)

For me this was all I needed to do to get CubeProgrammer working

0

I've got this working on Ubuntu 20.04 + openjdk 11.0.10

If you run STM32CubeProgrammer from cli you'll get a clue to the problem

./STM32CubeProgrammer
Error: Could not find or load main class com.st.app.Main
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application

So, annoyingly javafx is no longer packaged with java 9+

So the fix is to either find an older java or:

  1. Download javafx and unpack to a folder
  2. Update STM32CubeProgrammer script vi $(which STM32CubeProgrammer)
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export LD_LIBRARY_PATH=$DIR/../lib:$LD_LIBRARY_PATH
export PATH_TO_FX=/home/williao/tools/javafx-sdk-11.0.2/lib
java --module-path $PATH_TO_FX:$PATH_TO_FX/lib --add-modules javafx.controls,javafx.fxml,javafx.web -jar $DIR/STM32CubeProgrammerLauncher

Don't forget to change PATH_TO_FX!!!!

0

At some point all executables in the archive lose exec attribute - it has to be restored not only for the .linux file but for ./jre/bin/* also:

$ chmod -R 755 ./jre/bin

-1

I found this site while looking for how to fix the installer in Debian. This worked for me.

$ sudo java -jar SetupSTM32CubeProgrammer-2.8.0.exe

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .