Skip to main content
godlyblade
Associate II
December 6, 2019
Solved

How to run STM32CubeProgrammer on MacOS Catalina 10.15.1 (19B88)

  • December 6, 2019
  • 13 replies
  • 10023 views

I have installed STM32CubeProgrammer V2.2.1 (https://www.st.com/en/development-tools/stm32cubeprog.html) on my MacBook without problems.

When I try to run the application, the programmer icon appears in the dock for about half a second and disappears immediately.

So I tried to open the application via terminal:

Last login: Fri Dec 6 15:40:05 on ttys000
➜ ~ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.221-b11, mixed mode)
➜ ~ java -version
java version "13.0.1" 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
➜ ~ sudo open /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app
Password:
LSOpenURLsWithRole() failed with error -10810 for the file /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app.

And I can see error code -10810...

What can I do now?

Best regards!

This topic has been closed for replies.
Best answer by godlyblade

Okay, its quite easy to get it to work (tested with macOS Catalina 10.15.1 (19B88))

Please see my post at SO!

1. To be sure you use the right java version deinstall all java versions first

~ java -version 
No Java runtime present, requesting install.

2. Now install " jdk-8u231-macosx-x64 "

3. After that the terminal should look like this

~ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

4. Go to the directory where the STM32CubeProgrammer installer is located. For example

~ cd /Users/myName/Desktop/en

5. Install the STM32CubeProgrammer

en sudo java -jar SetupSTM32CubeProgrammer-2.2.1.exe

6. The result should be

Command line arguments: 
====================
Installation started
Framework: 1.6.0_65-b14-468 (Apple Inc.)
Platform: mac_osx,version=10.15.1,arch=x86,symbolicName=null,javaVersion=1.8.0_231
Installation finished

7. Now you can open the programmer app

Hope this helps!

Best Regards!

13 replies

godlyblade
godlybladeAuthorBest answer
Associate II
December 7, 2019

Okay, its quite easy to get it to work (tested with macOS Catalina 10.15.1 (19B88))

Please see my post at SO!

1. To be sure you use the right java version deinstall all java versions first

~ java -version 
No Java runtime present, requesting install.

2. Now install " jdk-8u231-macosx-x64 "

3. After that the terminal should look like this

~ java -version
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)

4. Go to the directory where the STM32CubeProgrammer installer is located. For example

~ cd /Users/myName/Desktop/en

5. Install the STM32CubeProgrammer

en sudo java -jar SetupSTM32CubeProgrammer-2.2.1.exe

6. The result should be

Command line arguments: 
====================
Installation started
Framework: 1.6.0_65-b14-468 (Apple Inc.)
Platform: mac_osx,version=10.15.1,arch=x86,symbolicName=null,javaVersion=1.8.0_231
Installation finished

7. Now you can open the programmer app

Hope this helps!

Best Regards!

HNaja.5
Associate
March 16, 2020

unfortunately i have this problem from V1 with CubeProgrammer and IDE , not with CubeMX

the ONLY way to get it started is to execute binary file using Terminal and

“cd TO CUBEPROGRAMMER BIN DIR�?

“java -jar CUBEPROGRAMMER�?

FSANS.1
Visitor II
April 23, 2020

Update: Tested on Mac Mini OS X El Capitan v10.11.6

DO NOT run the installer app named SetupSTM32CubeProgrammer-2.4.0.app

remove previously installer version of STM32CubeProgrammer from le App directory

preliminary: install of javaVersion=1.8.0_251

reboot

then, instead of running installer .app, the install of STM32cubeProgrammer should be proceeded by running under java : SetupSTM32CubeProgrammer-2.4.0.exe in the console (note : invoke the .exe not the .app file) by:

$ sudo java -jar SetupSTM32CubeProgrammer-2.4.0.exe

 

result:

a GUI window of the installer opens :

-> proceed to install

at the end of install the following message appears in the terminal console

Command line arguments: 

====================

Installation started

Framework: 1.6.0_65-b14-466-11M4802 (Apple Inc.)

Platform: mac_osx,version=10.11.6,arch=x86,symbolicName=null,javaVersion=1.8.0_251

Installation finished

now STM32CubeProgrammer launches correctly from Launchpad.

Best Regards

Fred

kj.obara
Associate III
May 6, 2020

Hi everyone,

Could I ask your opinion of an identical error I'm having in Catalina 10.15.4?

I have installed the newest JDK 1.8.0_251 but I already had JDK 11.0.6 which I need for another app.

So to be sure I installed it the following way:

~$ ▶ where java8
java8: aliased to /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/java
 
~$ ▶ sudo /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/java -DjavaVersion=1.8.0 -jar ~/Downloads/en-4/SetupSTM32CubeProgrammer-2.4.0.exe
Command line arguments:
====================
Installation started
Framework: 1.6.0_65-b14-468 (Apple Inc.)
Platform: mac_osx,version=10.15.4,arch=x86,symbolicName=null,javaVersion=1.8.0_251
Installation finished

But when I try to run the app it closes within seconds (it is not blocked by system at least it doesn't mention it under Security settings) and I also tried running it this way:

~$ ▶ java8 -DjavaVersion=1.8.0 -jar /Applications/STMicroelectronics/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32CubeProgrammer

But this ends up with an error "CubeProgrammer_API or one of its dependencies is missing. Please try reinstalling the program or check your java architecture."

So what am I doing wrong? Is there a conflict between JDK 11 and JDK 8 that causes STM32CubeProgrammer to crash?

I know godlyblade wrote to uninstall all versions of Java, but I do need Java 11. Is there any way around it?

Plus, Java 11 is also installed here:

~$ ▶ ll /usr/bin/java
lrwxr-xr-x 1 root wheel 74B 7 Oct 2019 /usr/bin/java@ -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java

 And Oracle says specifically NOT to remove it as it's part of macOS system software: https://www.java.com/en/download/help/mac_uninstall_java.xml

Thank you in advance.

Chris

kj.obara
Associate III
May 6, 2020

Actually, please scratch my last comment.

I couldn't remember which app I use needed Java 11, so I decided the get rid of all the JDKs.

Then I noticed my question about /usr/bin/java is stupid, since Apple just left a hook with a message showing how to install Java for yourself.

So, now I installed JDK 1.8.0_251 from scratch and STM32CubeProgrammer runs normally. Yaaay! Thanks so much guys!

But if any of you knew how to manage to have JDK 11 and JDK 8 side by side and not trip Cube Programmer then that would help a lot. In the meantime I hope the app that needed JDK 11 was just something I installed and didn't use much...

Again, many thanks!

AVoel.1
Associate III
March 1, 2021

@Pascal Schröer​ 's answer was good but incomplete. The install process also seems to use a shell script which tries to copy the jre from an odd location

#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DIR_APP="$( cd "$( dirname "$DIR/../../.." )" && pwd )"
cp -R "$(PWD)/../../../jre" "$DIR/../STM32CubeProgrammer.app/"

That step on line 4 fails and the program won't run. However, the jre folder is in the download folder and simply copying that jre folder into the STM32CubeProgrammer.app folder solves the problem. I sure wish that Mac support was more on the ball, although I'm grateful that I can get most things working without having to fire up Windows.

kuberaspeaking
Visitor II
March 17, 2021

This does the trick even for the MacOS Big Sur. Thanks @AVoel.1​ !

EZori.1
Visitor II
July 31, 2021

Hi

cannot inststall on mac osx big sur

Getting admin@MacBook-Pro-admin en % ls

SetupSTM32CubeProgrammer-2.8.0.app jre

SetupSTM32CubeProgrammer-2.8.0.exe

admin@MacBook-Pro-admin en % sudo java -jar SetupSTM32CubeProgrammer-2.4.0.exe

NS.123
Associate
August 12, 2021

Hi All,

I ran into the same problems on Big Sur plus some others.

As @AVoel.1​ stated, it's necessary to copy the jre included in the download. But also is required to use it.

What worked for me was:

1: Copy the jre folder into the .app dir:

$ sudo cp -R jre /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/

2: Execute the Application on its path using the new jre. This way both jre and missing dependencies errors are solved.

cd /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin
 
$ ../../../jre/bin/./java -jar STM32CubeProgrammer

Hope this helps!

AVoel.1
Associate III
August 12, 2021

I didn't need to perform this last step, and I'm on the latest Big Sur. I wonder why. I just started the App like any other app in the Applications folder after copying the jre.

Maybe it is because I installed it on Catalina and it simply kept working when I updated to Big Sur?

NS.123
Associate
August 12, 2021

I don't know. But cubemx worked for me as you described for cubeprogrammer. Not the same luck with cubeprogrammer 2.8.

eos1d3
Associate II
September 2, 2021

en.stm32cubeprg-mac_v2-8-0_v2.8.0 still does not work for Big Sur.

During installation, an error message occurred showing JRE not found.