cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE doesn't connect to debugger. How can I fix this? I am using the STM32H747-Disco board.

SPate.4
Associate II

This is what my console says when I try to debug:

Info : default port : 7184

Info : Remote address: 127.0.0.1

Info : stlinkserver already running, exit

STMicroelectronics ST-LINK GDB server. Version 5.7.0

Copyright (c) 2020, STMicroelectronics. All rights reserved.

Starting server with the following options:

       Persistent Mode           : Disabled

       Logging Level             : 1

       Listen Port Number        : 61234

       Status Refresh Delay      : 15s

       Verbose Mode              : Disabled

       SWD Debug                 : Enabled

       InitWhile                 : Enabled

Waiting for debugger connection...

Debugger connected

Debugger connection lost.

Shutting down...

3 REPLIES 3
ChahinezC
Lead

Hello @SPate.4​​,

I recommend you checking the "debugger" section in the "Debug Configuration", you can use the “Scan�? option to detect the ST-Link on your board.

The STM32CubeIDE user guide and the STM32 microcontroller debug toolbox application note can help you solve your issue, you can check the 3.3 of UM2609 and 4.2.4 of AN4989 sections.  

Please keep us informed.

Chahinez.

Had it connected previously and then stopped?

This is one of the user experience areas where it should work out of the box, and offer to resolve ​or diagnose the issue.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
OAshr.1
Associate

Hello all ..

I just started using STMCubeID with my Lora-E5 Development kit board and I picked a GPIO_IOToggle example from the SDK to run. I have already connected the STLink and I was also able to get it scanned in the debugger configuration (Run -> Debugger Configuration), as shown below:

0693W00000BaBWYQA3.png 

The "Build (Ctrl+B)" is successful. But when I try to run it (Run -> Run), I am getting the below logs, indicating the error "stlinkserver already running, exit" .. Below are the logs:

 
STMicroelectronics ST-LINK GDB server. Version 5.8.0
Copyright (c) 2020, STMicroelectronics. All rights reserved.
 
Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled
        InitWhile                  : Enabled
 
Info : default port : 7184
Info : Remote address: 127.0.0.1
Info : stlinkserver already running, exit
Waiting for debugger connection...
Debugger connected
      -------------------------------------------------------------------
                        STM32CubeProgrammer v2.7.0-RC1                  
      -------------------------------------------------------------------
 
Info : default port : 7184
Info : Remote address: 127.0.0.1
Info : stlinkserver already running, exit
Info : default port : 7184
Info : Remote address: 127.0.0.1
Info : stlinkserver already running, exit
ST-Link Server is running on port : 7184
Info : default port : 7184
Info : Remote address: 127.0.0.1
Info : stlinkserver already running, exit
ST-LINK SN  : 54FF71067285495553412267
ST-LINK FW  : V2J37S7
Info : default port : 7184
Info : Remote address: 127.0.0.1
Info : stlinkserver already running, exit
Board       : --
Voltage     : 3,20V
SWD freq    : 4000 KHz
Connect mode: Under Reset
Reset mode  : Hardware reset
Device ID   : 0x497
Revision ID : Rev Z
Device name : STM32WLxx
Flash size  : 256 KBytes
Device type : MCU
Device CPU  : Cortex-M4
 
 
 
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_QY232Y.srec
  File          : ST-LINK_GDB_server_QY232Y.srec
  Size          : 7328 Bytes
  Address       : 0x08000000 
 
 
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 3]
Download in Progress:
 
 
File download complete
Time elapsed during download operation: 00:00:00.352
 
 
 
Verifying ...
 
 
 
 
Download verified successfully 
 
 
Info : default port : 7184
Info : Remote address: 127.0.0.1
Info : stlinkserver already running, exit
Debugger connection lost.
Shutting down...
 

I am using CubeIDE in Linux (Ubuntu 20.04) and the IDE version is "1.6.1"

How can I resolve this issue??