2025-01-23 12:00 PM
Debian version:
debian@sys:~/STM32Prog$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
Version of STM32CubeProgrammer - v.2.18.0
Java version:
debian@sys-lab1:~/STM32Prog$ java -version
openjdk version "11.0.25" 2024-10-15
OpenJDK Runtime Environment (build 11.0.25+9-post-Debian-1deb11u1)
OpenJDK Server VM (build 11.0.25+9-post-Debian-1deb11u1, mixed mode
Problems:
1. Can't run installation per instruction of doc UM2237
./sudo SetupSTM32CubeProgrammer-2.18.0.linux
Invoked the above command resulted in a bunch of 'not found' errors
eg. /SetupSTM32CubeProgrammer-2.18.0.linux: 1:ELF: not found
2. Can install a bit further with Java way
sudo java -jar SetupSTM32CubeProgrammer-2.18.0.exe
Invoked the above, the process appeared trying to install but presented errors of missing following components:
====================
Installation started
Framework: 5.2.2-b7986 (IzPack)
Platform: debian_linux,version=4.14.130MV-socfpga-r2,arch=unknown,symbolicName=null,javaVersion=11.0.25
[ Starting to unpack ]
[ Processing package: Core Files (1/3) ]
[ Processing package: STM32CubeProgrammer (2/3) ]
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Execution Failed
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32CubeProgrammerLauncher': No such file or directory
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32CubeProgrammer': No such file or directory
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32_Programmer_CLI': No such file or directory
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32_Programmer.sh': No such file or directory
Questions:
1. What is the correct installation cmd to install STM32CubeProgrammer on a linux based machine?
In my case, SetupSTM32CubeProgrammer-2.18.0.exe OR SetupSTM32CubeProgrammer-2.18.0.linux?
2. The errors encountered with missing critical files below, why? Can they be downloaded directly from a repository somewhere ?
../bin/STM32CubeProgrammerLauncher': No such file or directory
../bin/STM32CubeProgrammer': No such file or directory
./bin/STM32_Programmer_CLI': No such file or directory
Thank you,
.
2025-01-24 12:54 AM
Hello @tanz,
Issues seem coming from the fact that you have Java 11 installed and added to the environment variables. This can create conflicts => Could you try uninstalling Java 11 or removing its references in the environment variables ?
It should be SetupSTM32CubeProgrammer-2.18.0.linux as specified in the user manual.
Aziz
2025-01-24 07:07 AM
Thank you for your response, Aziz.
Initially, I did not have Java installed and experienced issues.as mentioned in 1)
Then I saw a post who experienced same with debian and had to install by running Java instead:
If I invoke SetupSTM32CubeProgrammer-2.18.0.linux, below are the errors:
--------------------------------------------------------------------------------------------------------------------------------------------------------
debian@sys:~/STM32Prog$ sudo ./SetupSTM32CubeProgrammer-2.18.0.linux
./SetupSTM32CubeProgrammer-2.18.0.linux: 1:ELF: not found
@8@: not foundbeProgrammer-2.18.0.linux: 2: @@▒*
./SetupSTM32CubeProgrammer-2.18.0.linux: 1:Q▒tdR▒td: not found
./SetupSTM32CubeProgrammer-2.18.0.linux: 1: {K▒▒▒+▒M9▒▒k%▒?B▒▒k%▒BB▒▒k%▒H▒▒k%▒@B▒▒k%▒OB▒▒k%▒rG▒▒k%: not found
./SetupSTM32CubeProgrammer-2.18.0.linux: 1: ▒k%: not found
./SetupSTM32CubeProgrammer-2.18.0.linux: 2: %@@Ɠ
Ɠ
: not found
./SetupSTM32CubeProgrammer-2.18.0.linux: 6: ▒▒▒▒▒▒H▒HHH▒▒H▒¸Dlj▒▒▒▒▒▒A▒▒▒0▒▒▒▒▒A▒▒tLA▒▒A▒▒▒▒▒A▒▒A▒▒A!▒A▒▒▒▒: not found
./SetupSTM32CubeProgrammer-2.18.0.linux: 6: ▒▒▒▒▒▒▒E1▒A▒▒A▒▒D▒▒!▒E▒
1▒A▒▒▒▒!▒D▒A▒
A: not found
./SetupSTM32CubeProgrammer-2.18.0.linux: 6: ▒▒u▒A▒▒t▒▒σ▒▒▒▒▒C▒▒▒A▒▒▒▒▒!▒뵅▒t▒▒E▒▒▒▒A▒▒A▒At▒▒▒6▒▒▒▒▒▒▒▒+▒▒▒+▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒7▒▒: not found./SetupSTM32CubeProgrammer-2.18.0.linux: 9: Syntax error: "(" unexpected
--------------------------------------------------------------------------------------------------------------------------------------------------------
I get much further with invoking - sudo java -jar SetupSTM32CubeProgrammer-2.18.0.exe
From the trace below, we can see the FAILURE is in unpacking the
Processing package: STM32CubeProgrammer (2/3) <<<<======= ERROR HERE
that caused the missing files as listed above in the initial report
-------------------------------------------------------------------------------------------------------------------------------------------------------
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
STM32CubeProgrammer Components selection
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
Select the packs you want to install:
[x] Pack 'Core Files' required
-------------------------------------------------
[x] Include optional pack 'STM32CubeProgrammer'
-------------------------------------------------
Enter Y for Yes, N for No:
y
--------------------------------------------------------
[x] Include optional pack 'STM32TrustedPackageCreator'
--------------------------------------------------------
Enter Y for Yes, N for No:
y
Selected Packs [Core Files, STM32CubeProgrammer, STM32TrustedPackageCreator]
Press 1 to continue, 2 to quit, 3 to redisplay
1
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
STM32CubeProgrammer Package installation
??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
====================
Installation started
Framework: 5.2.2-b7986 (IzPack)
Platform: debian_linux,version=4.14.130MV-socfpga-r2,arch=unknown,symbolicName=null,javaVersion=11.0.25
[ Starting to unpack ]
[ Processing package: Core Files (1/3) ]
[ Processing package: STM32CubeProgrammer (2/3) ]
------------------------------------------------------------------------------------------------------------------------------------------------------
Execution Failed
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32CubeProgrammerLauncher': No such file or directory
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32CubeProgrammer': No such file or directory
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32_Programmer_CLI': No such file or directory
chmod: cannot access '/usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/util/../bin/STM32_Programmer.sh': No such file or directory
Continue Installation?
------------------------------------------------------------------------------------------------------------------------------------------------------
Enter Y for Yes, N for No:
2025-01-24 07:52 AM
Hi @tanz,
Thanks for sharing the details.
STM32CubeProgrammer (Including the installer) runs on JRE 8 (Not 11), which is bundled in the installer.
=> For supported platforms, there should be no issues if there's no Java instance in the environment variables.
However, one important note to keep in mind is that the tool isn't tested on Debian (And guaranteed to work only on Ubuntu® and Fedora® as mentioned in UM2237 page 12).
What I suggest to do is to uninstall any Java versions and try running this CLI after extracting the package:
jre\bin\java -jar SetupSTM32CubeProgrammer-X.Y.Z.exe
If this doesn't work I suggest changing to an officially supported Linux distribution.
Aziz