2026-05-12 6:11 AM
Hello,
I'm using a NUCLEO-C5A3ZG. Not sure it's the right place to write but my goal is to setup the debugger using the STM32CubeCLT_1.21.0 Package under a VSCode environment (already using cortex-debug extension for other projects).
I am able to reach the target using the embedded stlink for example with a reading of the flash :
/c/Program Files (x86)/ST/STM32CubeCLT_1.21.0/STM32CubeProgrammer
$ ./bin/STM32_Programmer_CLI.exe -c port=SWD freq=1000 mode=UR -r32 0x08000000 10
-------------------------------------------------------------------
STM32CubeProgrammer v2.22.0
-------------------------------------------------------------------
ST-LINK SN : 005100353235511237333439
ST-LINK FW : V3J17M10
Board : NUCLEO-C5A3ZG
Voltage : 3.29V
SWD freq : 1000 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x45A
Revision ID : Rev Z
Device name : STM32C59x/5A3
NVM size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0x100
Debug in Low Power mode enabled
Reading 32-bit memory content
Size : 12 Bytes
Address: : 0x08000000
0x08000000 : 20000480 0800137D 080012B5However when i try to use the GDB Server it fails with :
/c/Program Files (x86)/ST/STM32CubeCLT_1.21.0/STLink-gdb-server
$ ./bin/ST-LINK_gdbserver.exe --swd --halt -l 31
STMicroelectronics ST-LINK GDB server. Version 7.13.0
Copyright (c) 2026, STMicroelectronics. All rights reserved.
Starting server with the following options:
Persistent Mode : Disabled
Logging Level : 31
Listen Port Number : 61234
Status Refresh Delay : 15s
Verbose Mode : Disabled
SWD Debug : Enabled
COM frequency = 24000 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 8000 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 3300 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 1000 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 200 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 50 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
COM frequency = 5 kHz
Target connection mode: Default
Target connection failed. Try connecting under reset
Target connection failed
Target unknown error 32
Error in initializing ST-LINK device.
Reason: Unknown. Please check power and cabling to target.I tried in a linux environment, same behavior.
I checked the correct behavior on an other nucleo board NUCLEO-H7A3ZI & it is ok.
Thank's for your help.
Solved! Go to Solution.
2026-05-12 6:50 AM
Hello,
This device has the CPU core on access port 1 so you should add "-m 1" in your args.
Rgds,
Laurent
2026-05-12 6:50 AM
Hello,
This device has the CPU core on access port 1 so you should add "-m 1" in your args.
Rgds,
Laurent
2026-05-12 7:28 AM
Thank you very much !
Just for my understanding, as it's not a multicore device, what's the explanation for this change ?
2026-05-12 7:58 AM
Have a look in the Reference Manual on "Debug support (DBG)" chapter and then Access Ports :
There are two access ports (AP) attached to the DP.
• System debug access port (AP0): Enables access to the DBGMCU and the system ROM table via an APB bus.
• Cortex-M33 debug access port (AP1): Enables access to the debug and trace features integrated in the Cortex-M33 processor core via its internal AHB bus.