2021-10-06 07:53 AM
Hi!
I am following the instructions of this wiki page:
I have the DK2 connected to my system using the USB OTG port.
The boards dip switches are in the correct position.
I copied the udev rules to /etc/udev/rules.d/.
Pressing "Connect" results in following error:
16:44:36 : STM32CubeProgrammer API v2.8.0
16:50:03 : USB speed : High Speed (480MBit/s)
16:50:03 : Manuf. ID : STMicroelectronics
16:50:03 : Product ID : DFU in HS Mode @Device ID /0x500, @Revision ID /0x0000
16:50:03 : SN : 003300293030510D32313933
16:50:03 : FW version : 0x0110
16:50:03 : Device ID : 0x0500
16:50:03 : Error: CUBEPROGRAMMER_ERROR_NOT_SUPPORTED
What am I doing wrong?
Thank you in advance,
Gunther
Solved! Go to Solution.
2021-10-06 11:14 PM
Hi Kevin,
Good morning!
The issue is rather trivial. If you change to its bin folder before starting it 2.8.0 works.
cd ~/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-2.8.0/bin
./STM32CubeProgrammer &
If it is started from another path , the app returns this error and connect fails:
STM32MPU-Tools/STM32CubeProgrammer-2.8.0$ ./bin/STM32CubeProgrammer
jar:file:/home/glaure/Development/SW_APP/nexio_stm/STM32MPU-Tools/STM32CubeProgrammer-2.8.0/bin/STM32CubeProgrammerLauncher!/fxml/Config.fxml
Error occurred while parsing external Loader list
An error occurred.
java.io.FileNotFoundException: /home/glaure/Development/SW_APP/nexio_stm/STM32MPU-Tools/STM32CubeProgrammer-2.8.0/version (Datei oder Verzeichnis nicht gefunden)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at com.st.updaterManager.Utility.getProgrammerVersion(Utility.java:178)
at com.st.updaterManager.Utility.setIniParameters(Utility.java:331)
at com.st.controllers.MainWindowController.initialize(MainWindowController.java:900)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at com.st.app.Main.start(Main.java:52)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:769)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$10(GtkApplication.java:245)
at java.lang.Thread.run(Thread.java:748)
1.0.0
It was just coincidence that 2.7.0 worked on my first try. The STM32CubeProgrammer startup script is missing the prefix $DIR variable to start the jre.
If this is fixed, it fails the same way as 2.8.0, when started from other working directories.
Hope that helps when you try to fix this issue.
Bye Gunther
2021-10-06 08:03 AM
If I additionally connect the ST-LINK USB cable, the STM32CubePorgrammer app crashes:
libusb: error [udev_hotplug_event] ignoring udev action bind
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f440cd934bd, pid=150847, tid=0x00007f43e28f8700
#
# JRE version: OpenJDK Runtime Environment (8.0_265-b01) (build 1.8.0_265-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.265-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libCubeProgrammer_API.so+0xac4bd] USBInterface::connect(QString, unsigned char, bool)+0x17d
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/glaure/Development/SW_APP/nexio_stm/hs_err_pid150847.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
./STM32MPU-Tools/STM32CubeProgrammer-2.8.0/bin/STM32CubeProgrammer: Zeile 4: 150847 Abgebrochen (Speicherabzug geschrieben) $DIR/jre/bin/java -jar $DIR/STM32CubeProgrammerLauncher
2021-10-06 08:14 AM
I have more information:
STM32CubeProgrammer-2.7.0 works, but STM32CubeProgrammer-2.8.0 does not.
But 2.7.0 still crashes when ST-LINK is also connected.
2021-10-06 09:10 AM
Hello @GLaure ,
I recently reinstalled my Ubuntu 20.04 and I encountered the same issue with exactly the same error. And it was also working with the version 2.7.0.
To correct the error, I removed the folder and made again the installation. I had surely made a manipulation error
rm -rf ~/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-2.8.0/
Extract again the zip file of the STM32CubeProgrammer-2.8.0
unzip en.stm32cubeprg-lin_v2-8-0_v2.8.0.zip
Start the setup script:
./SetupSTM32CubeProgrammer-2.8.0.linux
Run the binary:
./STM32CubeProgrammer &
Please can you remove and install again your STM32CubeProgrammer-2.8.0 and tell me how it is behaving?
We will investigate the STLink issue later if you still have this problem.
Thanks,
Regards,
Kévin
Edit: A sentence was missing
2021-10-06 11:14 PM
Hi Kevin,
Good morning!
The issue is rather trivial. If you change to its bin folder before starting it 2.8.0 works.
cd ~/STM32MPU_workspace/STM32MPU-Tools/STM32CubeProgrammer-2.8.0/bin
./STM32CubeProgrammer &
If it is started from another path , the app returns this error and connect fails:
STM32MPU-Tools/STM32CubeProgrammer-2.8.0$ ./bin/STM32CubeProgrammer
jar:file:/home/glaure/Development/SW_APP/nexio_stm/STM32MPU-Tools/STM32CubeProgrammer-2.8.0/bin/STM32CubeProgrammerLauncher!/fxml/Config.fxml
Error occurred while parsing external Loader list
An error occurred.
java.io.FileNotFoundException: /home/glaure/Development/SW_APP/nexio_stm/STM32MPU-Tools/STM32CubeProgrammer-2.8.0/version (Datei oder Verzeichnis nicht gefunden)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.util.Scanner.<init>(Scanner.java:611)
at com.st.updaterManager.Utility.getProgrammerVersion(Utility.java:178)
at com.st.updaterManager.Utility.setIniParameters(Utility.java:331)
at com.st.controllers.MainWindowController.initialize(MainWindowController.java:900)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2548)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
at com.st.app.Main.start(Main.java:52)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$8(LauncherImpl.java:769)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$7(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$5(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$6(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$10(GtkApplication.java:245)
at java.lang.Thread.run(Thread.java:748)
1.0.0
It was just coincidence that 2.7.0 worked on my first try. The STM32CubeProgrammer startup script is missing the prefix $DIR variable to start the jre.
If this is fixed, it fails the same way as 2.8.0, when started from other working directories.
Hope that helps when you try to fix this issue.
Bye Gunther
2021-10-07 01:40 AM
Hi @GLaure ,
Thank you for your help on this issue.
You are right, I was able to reproduce the problem on my Ubuntu. I even reproduced the crash related to ST-link if I run the STM32CubeProgrammer from the folder just before bin, the folder STM32CubeProgrammer-2.8.0.
I will make a ticket to our developer team to talk about this problem.
Thanks again,
Regards,
Kévin