cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeProgrammer - Segmentation fault (SIGSEGV) when trying to connect to a STM32MP157F-DK2 via SWD/JTAG

krjdev
Associate II

When I try to connect to a STM32MP157F-DK2 board via SWD/JTAG, STM32CubeProgrammer aborts with a segmentation fault on my host system (openSUSE Leap 15.2).

I get the following error message, when I start STM32CubeProgrammer within a shell:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fee0c8259fe, pid=14499, tid=0x00007fee00ee6700
#
# 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+0x5b9fe]  connectStLink+0x2ee
#
# Core dump written. Default location: /usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/core or core.14499
#
# An error report file with more information is saved as:
# /usr/local/STMicroelectronics/STM32Cube/STM32CubeProgrammer/bin/hs_err_pid14499.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.
#
./STM32CubeProgrammer: line 4: 14499 Aborted                 (core dumped) $DIR/jre/bin/java -Djdk.gtk.version=2 -jar $DIR/STM32CubeProgrammerLauncher

I also own a NUCLEO-H745ZI-Q board, but no issues with STM32CubeProgrammer

with this target board.

Has somebody noticed the same issue?

I use the latest version 2.9.0.

Also asked this on the StackExchange site for Electrical Engineering:

https://electronics.stackexchange.com/questions/609893/stm32cubeprogrammer-segmentation-fault-sigsegv-when-trying-to-connect-to-a-s#609893

1 ACCEPTED SOLUTION

Accepted Solutions
Houda GHABRI
ST Employee

Hi @SFuch.1​ 

You are right, even if SWD is not supported for MP1 CubeProgrammer should not crash.

So I submitted a ticket internally to add a warning message to inform the user that SWD is not supported and Cubeprogrmmer still works fine instead of crashing.

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

Houda

View solution in original post

6 REPLIES 6
Olivier GALLIEN
ST Employee

Hi @krjdev​ ,

STM32CubeProg connection with SWD/JTAG is not supported for STM32MP1.

It only support UART and USB connection.

See STM32CubeProgrammer - stm32mpu

So probably point to a bad exception management in this context, maybe linked to your host openSUSE Leap 15.2 .. don't know if this is fully compatible with Ubuntu version on which STM32CubeProg is validated.

Are you using GUI or CLI ?

Olivier

Olivier GALLIEN
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

Hi @Community member​ !

Okay, thanks for the information, that SWD/JTAG isn't supported on STM32MP1 MPU's.

Normally i use the GUI. Also tried it with CLI, but STM32CubeProgrammer aborts with the same issue:

$ ./STM32_Programmer_CLI -c port=SWD
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.9.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 066EFF323637414257034539
ST-LINK FW  : V2J39M27
Board       : --
Voltage     : 3.23V
SWD freq    : 4000 KHz
Connect mode: Normal
Reset mode  : Software reset
Device ID   : 0x500
Revision ID : Rev Z
Segmentation fault (core dumped)

AFAIK, openSUSE Leap is based on the commercial Linux distribution SUSE Linux Enterprise.

Should use the same Kernel version and base libraries as SUSE Linux Enterprise. Currently also use the same repositories for updating.

It's might not an fatal issue, because it's only affects, when a user try to connect via SWD/JTAG.

On none-STM32MP1 devices connecting via SWD/JTAG works:

$ ./STM32_Programmer_CLI -c port=SWD
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.9.0                  
      -------------------------------------------------------------------
 
ST-LINK SN  : 003A00243137511439383538
ST-LINK FW  : V3J8M3
Board       : NUCLEO-H745ZI-Q
Voltage     : 3.27V
SWD freq    : 24000 KHz
Connect mode: Normal
Reset mode  : Software reset
Device ID   : 0x450
Revision ID : Rev V
Device name : STM32H7xx
Flash size  : 2 MBytes
Device type : MCU
Device CPU  : Cortex-M7/M4
BL Version  : 0x90

SFuch.1
Associate III

I can verify that a SIGSEGV also occurs when trying to connect on Ubuntu 20, and the STM32CubeProgrammer crashes fatally.

Even though SWD may not be supported there should be an error message saying so, and the program should stay alive.

SFuch.1
Associate III

Another very surprising error:

Using Ubuntu 20 and two screens, if I have the STM32CubeProgrammer on my second screen the button where I can select SWD, UART or USB is highlighted when I move the mouse there, but not clickable. If I move the window to my first screen it can be clicked normally.

Screen 1 is an external 3840x2160 pixel, to the right of which I have the laptop internal screen of 1920x1080 pixel, similar to this arrangement:

########################
#                      #
#       Screen 1       #############
#                      # Screen 2  #
####################################  

Houda GHABRI
ST Employee

Hi @SFuch.1​ 

You are right, even if SWD is not supported for MP1 CubeProgrammer should not crash.

So I submitted a ticket internally to add a warning message to inform the user that SWD is not supported and Cubeprogrmmer still works fine instead of crashing.

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

Houda

Hi @Houda GHABRI​ !

Many thanks for the creation of a (internal) support ticket. :grinning_face:

I will select your answer as the best.

Kind regards,

Johannes K.