Skip to content

Instantly share code, notes, and snippets.

@Lanchon
Last active September 5, 2024 11:06
Show Gist options
  • Save Lanchon/2156953d18f7534a926b to your computer and use it in GitHub Desktop.
Save Lanchon/2156953d18f7534a926b to your computer and use it in GitHub Desktop.
Installing STM32CubeMX on Linux

Installing STM32CubeMX on Linux

The STM32CubeMX tool is written in portable java, but unfortunately it is distributed as a Windows executable embedded in a Windows installer.

To install it on Linux:

  1. sudo java -jar SetupSTM32CubeMX-4.11.0.exe
  2. install the tool somewhere in your home, eg: /home/you/stm32/cubemx
  3. sudo chown -R you:you /home/you/stm32/cubemx

To run it:

  • java -jar /home/you/stm32/cubemx/STM32CubeMX.exe
  • or mark that file as executable, rename it to STM32CubeMX.jar, and double click it
@mianqi2016
Copy link

I have downloaded STM32CubeMX for Linux, and extracted it on Ubuntu 20.04, and double-click the setup file, no error prompted, but I couldn't launch it, how to?

@emha69
Copy link

emha69 commented Apr 29, 2021

Current version (6.2.0) installs normally on Ubuntu, however you need to install JDK 11 first:

sudo apt install openjdk-11-jre

Then start installer with sudo and at the end change the ownership of all files in the selected folder

chown -R user.user STM32CubeMX

Note, that you will need to start CubeMX as root in order to finish the update to version 6.2.1 and repeat chown -R ... afterwards.

@photon-delight
Copy link

photon-delight commented Apr 30, 2021

One does not need to install the JDK anymore - it seems to be included in the latest archive from ST. I just installed both STM32CubeIDE and CubeProgrammer on a fresh Ubuntu 20.04 without installing any Java. ST has also updated their software install instructions, which work fine for Ubuntu 20.04

@willcmc
Copy link

willcmc commented May 18, 2021

As of version 6.2.1, the provided Linux installation package on ST's website is designed for and tested on 64-bit systems, and (from what I gather) works only on a 64-bit system (sorta redundant to state, since ubuntu 20.04 only comes in 64-bit). And yes, no need for JDK, it is bundled with the package.

@willcmc
Copy link

willcmc commented May 18, 2021

I have downloaded STM32CubeMX for Linux, and extracted it on Ubuntu 20.04, and double-click the setup file, no error prompted, but I couldn't launch it, how to?

Have a look at the Readme.html, there are comprehensive instructions for each OS.

@emha69
Copy link

emha69 commented May 18, 2021

Current version (6.2.0) installs normally on Ubuntu, however you need to install JDK 11 first:

sudo apt install openjdk-11-jre

Installation of JDK was required on Ubuntu 18.04.3 64-bit. Forgot to mention the version.

I have downloaded STM32CubeMX for Linux, and extracted it on Ubuntu 20.04, and double-click the setup file, no error prompted, but I couldn't launch it, how to?

Check your user's permissions of the folder and sub-folders, where the IDE was installed. Start IDE from the terminal as normal user, you will see in the output where is the problem (or paste it here).

@artemfromkyiv
Copy link

When I tried to setup SetupSTM32CubeProgrammer-2.10.0.linux I got error:
Exec error: Permission denied
just check permission for files in ./jre/bin folder. They must be executable.
Zip archive clear executable bit for all files.

@gpmontt
Copy link

gpmontt commented Sep 5, 2024

@VictorTagayun Save the following code in ~/.local/share/applications/stm32cubemx.desktop:

[Desktop Entry]
Name=STM32CubeMX
GenericName=STM32CubeMX
Comment=Graphical tool for configuration of STM32 Microcontrollers
Exec=/usr/local/STMicroelectronics/STM32Cube/STM32CubeMX/STM32CubeMX
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/<USERNAME>/.local/share/applications/icons/stm32cubemx.png
StartupWMClass=STM32CubeMX
StartupNotify=true

And don't forget the icon in ~/.local/share/applications/icons/stm32cubemx.png or change the paths in the .desktop-file accordingly. stm32cubemx

Hope this helps :)

It works like a charm 👍 .
it amazes me that the stm32cubemx installer does not perform that option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment