cancel
Showing results for 
Search instead for 
Did you mean: 

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

godlyblade
Associate III

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!

1 ACCEPTED SOLUTION

Accepted Solutions
godlyblade
Associate III

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!

View solution in original post

20 REPLIES 20
godlyblade
Associate III

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

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
Associate

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

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

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

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

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

@AVoel.1​ @kuberaspeaking​ Hello Mate, I'm having this issues as you described, When the installation is about to finish It gives me that error: "Could not find jre folder". Although when I downloaded the en folder from the STM website, it came with jre folder, STM32CubeProgrammer.exe and STM32CubeProgrammer.app, what should I do?

I have continued the installation with the erro, then inserted jre folder into STM32CuberProgrammer folder, but when running the app opens and closes

I have exactly the same issue, and solved by going to /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/

And right click STM32CubeProgrammer.app click on Show packages content, and paste the are folder