Stm32 cube programmer linux

How to install STM32CubeProgrammer in Linux

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?

4 Answers 4

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

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 

@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.

@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

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.

Читайте также:  Gaomon s620 driver linux

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

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 "$" )" && 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.

Источник

Оцените статью
Adblock
detector