cancel
Showing results for 
Search instead for 
Did you mean: 

Linux - STM32CubeProgrammer 2.8.0 crashes clicking connect

KBell.1
Associate

I'm running Ubuntu 21.04 and have set the env variable to force use of X11:

GDK_BACKEND=x11

The utility runs and can discover connected ST-Link devices, but when I click connect button the tool crashes in the connectStLink function:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f2873aa90a3, pid=64882, tid=0x00007f2862a73640
#
# 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+0x500a3]  connectStLink+0x293

18 REPLIES 18

Java: write once, crash everywhere.

I've seen problems with 2.8.0 (ST-LINK firmware is up-to-date) crashing when attempting to connect while the target processor is being held in reset. I believe earlier versions would just complain but 2.8 catches fire. Progress!

YYoon.2
Associate

Only solution for me on Ubuntu 21.04 is to remove whole directory of STM32CubeProgrammer then install 2.7.0 then it works.

JCGobbi
Associate

The solution to this problem was found installing the STM32CubeProgrammer v.2.7.0 and trying to connect. The message was "Error: Unable to list supported devices", and the solution is to run the application from inside the "STM32CubeProgrammer/bin" folder. The only difference with v.2.9.0 is that the application gets out, but the error is the same.

You only need to add the instruction "cd $DIR" in the file "STM32CubeProgrammer/bin/STM32CubeProgrammer" as showed bellow:

#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
export LD_LIBRARY_PATH=$DIR/../lib:$LD_LIBRARY_PATH
cd $DIR
$DIR/jre/bin/java -jar $DIR/STM32CubeProgrammerLauncher

If the application don't connect yet, you must connect with the option "Reset mode : Hardware reset".

I tested with 3 boards with ST-Link v.2.1 and v.3.0 and all connected.

Good luck!

Maurício Pena
Associate

In my case, a Blue Pill board, I had to press and hold its reset button to get it connected...

Just4Fun
Associate

I can confirm that 2.8.0 simply crash when the "Connect" button is pressed and the ST-Link is without any MCU connected to it. If there is an MCU connected to the ST-Link it works normally.

Tested with Linux Mint 20.2 and a clone ST-Link V2 dongle with an old FW (ST-LINK FW : V2J34S7).

Regards

CSolo.2
Associate

The same for me. Crashes during the connect. v 2.9.0

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007faaa89f8281, pid=66190, tid=0x00007faa581fb700
#
# 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+0x73281]  GetDeviceGenInf(TargetInterface*)+0x21
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# 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.
#

SFuch.1
Associate III

Still the same error.

Houda GHABRI
ST Employee

Hello @SFuch.1​ ,all,

Thanks for your feedbacks.

I confirm there is issue with the new Version of Ubuntu 21.10 , it is already raised internally and fixed.

The fix will be available in the next CubeProgrammer version 2.10.0 scheduled soon.

 Internal ticket number: 115515 (PS: This is an internal tracking number and is not accessible or usable by customers). 

Houda

Edit: I am working with an MPU and have just discovered the prgorammer does not support swd interface for mpu. I would however suggest that the program should'nt crash.

I am running version 2.10.0 and am running into the same problem. Has this been addressed in 2.10.0 or are we still waiting for a patch?