Skip to main content
Senior
Oct 19, 2026 2:23 PM UTC
Solved

STM32CubeIDE v2.2: ST-LINK/H563 Debug Problem

After upgrading from CubeIDE v1.17 to v2.2 I have problems debugging my H563 custom board:

  1. When I hit a breakpoint, sometimes I cannot Resume/Step Over/Step In.
  2. When running, sometimes I cannot Terminate or Disconnect and must relaunch the IDE

Did not have these problems with CubeIDE v1.17. Versions with CubeIDE v2.2:

  • gdb 7.14
  • ST-Link V3J17M11

I would like to run the CubeIDE v1.17 gdb but see no way to edit the GDB server command line options.

Anyone else encounter this?

mccabehmBest answer
Senior
Oct 27, 2026 4:53 PM UTC

Experienced same problem with G491 on custom board. Resolved by:

  1. Unchecking IHREN on option bytes User Configuration
  2. Enable Debugger Configuration Device Settings “Debug in low power modes”
  3. Enable Debugger Configuration Device Settings “Suspect watchdog counters while halted”

Could perhaps be resolved by some subset of the above, but I am sticking with all for now.

6 replies

Andrew Neil
Super User
Oct 19, 2026 2:52 PM UTC

Have you checked for differences between the build settings  - particularly optimisation?

 

What ST-Link is it?

Is it genuine?

 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
mccabehmAuthor
Senior
Oct 20, 2026 9:59 PM UTC

Same optimizations. I tried changing optimizations: no help.

Using STLINK-V3.

Pavel A.
Oct 19, 2026 10:48 PM UTC

> gdb 7.14

This is strange.  I don’t have 1.17 handy but in CubeIDE 1.15 the gdb version is 13.2.90 (in toolchain v. 12.3.rel1.20240306-1730),  in 2.x the version should be even greater.

Are you sure you’re using correct gdb ?

 

mccabehmAuthor
Senior
Oct 20, 2026 10:07 PM UTC

Console output from launching v2.2 debug session (gdb 7.14):



STMicroelectronics ST-LINK GDB server. Version 7.14.0
Copyright (c) 2026, 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
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.23.0
-------------------------------------------------------------------



Log output file: C:\Users\hmm\AppData\Local\Temp\STM32CubeProgrammer_a14424.log
ST-LINK SN : 003F00423431511837393330
ST-LINK FW : V3J17M11
Board : STLINK-V3MINIE
Voltage : 3.25V
SWD freq : 8000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x484
Revision ID : Rev X
Device name : STM32H56x/573
NVM size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0xE4
SFSP Version: v2.5.0
Debug in Low Power mode enabled



Opening and parsing file: ST-LINK_GDB_server_a14424.srec


Memory Programming ...
File : ST-LINK_GDB_server_a14424.srec
Size : 167.77 KB
Address : 0x08010000


Erasing memory corresponding to segment 0:
Erasing internal memory sectors [8 28]
Erasing memory corresponding to segment 1:
Erasing internal memory sector 255
Download in Progress:


File download complete
Time elapsed during download operation: 00:00:00.892



Verifying...




Time elapsed during verifying operation: 00:00:00.455


Download verified successfully


Console output from launching v1.17 debug session (gdb 7.9):



STMicroelectronics ST-LINK GDB server. Version 7.9.0
Copyright (c) 2024, 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
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.18.0
-------------------------------------------------------------------



Log output file: C:\Users\hmm\AppData\Local\Temp\STM32CubeProgrammer_a58088.log
ST-LINK SN : 003F00423431511837393330
ST-LINK FW : V3J17M11
Board : STLINK-V3MINIE
Voltage : 3.25V
SWD freq : 8000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x484
Revision ID : Rev X
Device name : STM32H56x/573
Flash size : 2 MBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0xE4
SFSP Version: v2.5.0
Debug in Low Power mode enabled

Opening and parsing file: ST-LINK_GDB_server_a58088.srec


Memory Programming ...
File : ST-LINK_GDB_server_a58088.srec
Size : 25.74 KB
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.165



Verifying ...




Download verified successfully


 

mccabehmAuthor
Senior
Oct 26, 2026 10:37 PM UTC

Updated firmware on STLINK-V3MINIE to lastest.

Turned on debug logging. I see endless repetition of

ST-LINK device status: RESET_MODE
ST-LINK device status: RUN_MODE
ST-LINK device status: RESET_MODE
ST-LINK device status: RUN_MODE
.
.
.

when trying to step into a function, return from a function, step over, etc.

mccabehmAuthorBest answer
Senior
Oct 27, 2026 4:53 PM UTC

Experienced same problem with G491 on custom board. Resolved by:

  1. Unchecking IHREN on option bytes User Configuration
  2. Enable Debugger Configuration Device Settings “Debug in low power modes”
  3. Enable Debugger Configuration Device Settings “Suspect watchdog counters while halted”

Could perhaps be resolved by some subset of the above, but I am sticking with all for now.