cancel
Showing results for 
Search instead for 
Did you mean: 

Could not update ST-Link firmware with latest STLinkUpgrade on macOS Catalina with Java 14 because libusb not found.

SElin.1
Associate

Here is an error:

 java -jar STLinkUpgrade.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/yes/Downloads/stsw-link007/AllPlatforms/native/mac_x64/libSTLinkUSBDriver.dylib: dlopen(/Users/yes/Downloads/stsw-link007/AllPlatforms/native/mac_x64/libSTLinkUSBDriver.dylib, 1): Library not loaded: @rpath/libusb-1.0.0.dylib
  Referenced from: /Users/yes/Downloads/stsw-link007/AllPlatforms/native/mac_x64/libSTLinkUSBDriver.dylib
  Reason: image not found
	at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
	at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2452)
	at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2508)
	at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2704)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2637)
	at java.base/java.lang.Runtime.load0(Runtime.java:745)
	at java.base/java.lang.System.load(System.java:1871)
	at com.st.stlinkinterface.e.a(SourceFile:127)
	at com.st.stlinkupgrade.app.b.a(SourceFile:62)
	at com.st.stlinkupgrade.app.MainApp.main(SourceFile:16)

I also tried to replace provided libusb with installed with brew without luck. So how can I upgrade firmware? Am I missing something?

4 REPLIES 4
SElin.1
Associate

Looks like ST-Link upgrade doesn't work with Java 14, if you have error above just downgrade java to 11.x

towynlin
Associate III

I am getting the same error. I tried running Java 11.0.8 and Java 8u261, and neither changed anything. Same error. My recently arrived STLINK-V3SET is running firmware V3J1M1B1S1, which is very old. Other suggestions?

towynlin
Associate III

I was eventually able to upgrade the firmware by running the windows ST-LinkUpgrade.exe from a Windows 10 VirtualBox VM. I found no way to successfully run the Java jar.

Koenraad
Associate

I had the exact same issue, using Java 8 worked for me.

Might be related to this: https://github.com/AdoptOpenJDK/openjdk-build/issues/1211

Simply downgrading to Java 11 did not work for, but maybe downgrading to 11.0.3 might also work.