Close

Installing STM32cube IDE on Linux

ken-yapKen Yap wrote 05/21/2021 at 05:35 • 3 min read • Like

To forestall any questions about how to get the IDE to compile code, Cube is just an IDE, which generates code specific to various STM32 MCU models and dev boards. You have to get a toolchain separately. The ones from the ARM gcc toolchain project are free, but configuring and using it is a subject for a different page, for when I get around to trying my STM32 dev board.

Updated 2023-08-30 for 1.13 IDE release.

I decided to give this a try. Packages are available for Linux. I decided to use the Linux installer. Quite large at > 1.1 GB. There was a bit of hassle because ST requires an email address to send a download link to. You can leave the "I accept marketing box" unticked. Otherwise you can opt out later.

First you have to unpack the zip file, which leaves you with a .sh installer. When I tried to run the installer with:

sh st-stm32cubeide_1.13.1_17479_20230728_0839_amd64.rpm_bundle.sh

it said that it cannot run yum. The packagers didn't consider my distro, which uses zypper. Now I see that I can install a compatibility yum package. However I will describe what I actually did. Looking through the .sh file I saw that I could supply the --tar option with arguments. So I tried:

sh st-stm32cubeide_1.13.1_17479_20230728_0839_amd64.rpm_bundle.sh --tar tvf

That generated this output:

drwx------ acitlsqa/acitlsqa 0 2023-07-28 19:46 ./
-rwxrwxr-x acitlsqa/acitlsqa 1366 2023-07-28 19:45 ./setup.sh
-rw-rw-r-- acitlsqa/acitlsqa 8675 2023-07-28 19:45 ./prompt_linux_license.sh
-rw-rw-r-- acitlsqa/acitlsqa 39332 2023-07-28 19:45 ./segger_license_prompt.sh
-rw-rw-r-- acitlsqa/acitlsqa 1100758604 2023-07-28 19:46 ./st-stm32cubeide-1.13.1-17479_20230728_083
9.amd64.rpm
-rw-rw-r-- acitlsqa/acitlsqa      70940 2023-07-28 19:46 ./st-stlink-server-2.1.1-1-linux-amd64.rpm
-rw-rw-r-- acitlsqa/acitlsqa      15270 2023-07-28 19:46 ./st-stlink-udev-rules-1.0.3-2-linux-noarch
.rpm
-rw-rw-r-- acitlsqa/acitlsqa      48452 2023-07-28 19:46 ./segger-jlink-udev-rules-7.88h-linux-noarc
h.rpm
-rwxrwxr-x acitlsqa/acitlsqa        342 2023-07-28 19:46 ./cleanup.sh
-rw-rw-r-- acitlsqa/acitlsqa        280 2023-07-28 19:46 ./pkg_rootdir_content.txt 

So I repeated with xvf:

sh st-stm32cubeide_1.13.1_17479_20230728_0839_amd64.rpm_bundle.sh --tar xvf

and that extracted the files in the current directory. Running ./setup.sh gave the yum not found message again, so I decided to install the RPM files manually.

First I deleted any existing version of the st-stlink-server, st-stlink-udev-rules, segger-jlink-udev-rules and st-stm32cubeide packages.

The st-stlink-server package complained that the libusbx dependency was missing. Looking inside the RPM with rpm -qlp showed that it contained only one binary, /usr/bin/stlink-server. A search didn't find any packages for OpenSUSE. So I took a chance and did:

rpm -i --nodeps st-stlink-server-2.1.1-1-linux-amd64.rpm
ldd /usr/bin/stlink-server

showed no missing dependency, and running it worked as far as I could see. Must be an old requirement that is satisfied by the normal libusb libraries now. Anyway I hope to use other software for downloading to the dev board.

$ stlink-server 
Info : default port : 7184
Info : Remote address: 127.0.0.1

The two udev rules packages installed with no issues. The st-stm32cubeide had a dependency on libcurses.so.5. I installed my distro's version of libncurses5 but it still complained. Suspecting that my distro's package didn't include a provides for libcurses.so.5, I decided to ignore it and do:

rpm -i --nodeps st-stm32cubeide-1.13.1-17479_20230728_0839.amd64.rpm

and that worked. Running the application binary stm32cubeide brought up the IDE GUI and I had to tell it where my project were stored. It offered to update my config files from the previous version and I accepted. I did:

ln -s /opt/st/stm32cubeide_1.13.1/stm32cubeide /usr/local/bin

Now I can run stm32cubeide from the CLI without the full path.

Like

Discussions