cancel
Showing results for 
Search instead for 
Did you mean: 

Debugging with GDB server localhost doesn't work

MMain.1
Associate II

STM32CubeIDE for MAC Version: 1.12.0

Just installed the tools and connected an STM32 Nucleo 144 for the first time.

After connecting it, a ST-Link upgrade window popped up about updating the firmware of the board which I did. Got the Upgrade successful message, but if I open this window again and choose the Open in update mode, the following option still shows up and lets me upgrade again.

0693W00000bhQI5QAM.png 

After creating a test project, when I try to start Debugging, it fails due to no connection to port 61234. I'm using the Autostart Local GDB Server option.

I tried changing the port number and also the ST-Link Open OCD but still can't get the debugger to work

[0.000] initConfigParams():  Configuration flags start
[0.000] initConfigParams():   external-init                  false
[0.000] initConfigParams():   pend-halt-timeout              (null)
[0.000] initConfigParams():   halt                           false
[0.000] initConfigParams():   config-file                    ""
[0.000] initConfigParams():   persistent                     false
[0.000] initConfigParams():  +log-file                       "/Users/Michael/Desktop/Embedded udemy/MCU1-Course/MCU1/001HelloWorld/Debug/st-link_gdbserver_log.txt"
[0.000] initConfigParams():  +log-level                      31
[0.000] initConfigParams():  +port-number                    61234
[0.000] initConfigParams():  +verbose                        true
[0.000] initConfigParams():   refresh-delay                  15
[0.000] initConfigParams():  +verify                         true
[0.000] initConfigParams():  +swd                            true
[0.000] initConfigParams():  +swo-port                       61235
[0.000] initConfigParams():   cpu-clock                      8000000
[0.000] initConfigParams():   swo-clock-div                  128
[0.000] initConfigParams():   initialize-reset               false
[0.000] initConfigParams():   debuggers                      false
[0.000] initConfigParams():   serial-number                  ""
[0.000] initConfigParams():  +apid                           0
[0.001] initConfigParams():  +attach                         true
[0.001] initConfigParams():   shared                         false
[0.001] initConfigParams():   erase-all                      false
[0.001] initConfigParams():   memory-map                     ""
[0.001] initConfigParams():   ext-memory-loaders             false
[0.001] initConfigParams():   extload_init                   (null)
[0.001] initConfigParams():   extload                        (null)
[0.001] initConfigParams():  +stm32cubeprogrammer-path       "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_2.0.600.202301161003/tools/bin"
[0.001] initConfigParams():   temp-path                      ""
[0.001] initConfigParams():   preserve-temps                 false
[0.001] initConfigParams():   frequency                      0
[0.001] initConfigParams():   licenses                       false
[0.001] initConfigParams():   ignore-rest                    false
[0.001] initConfigParams():   version                        false
[0.001] initConfigParams():   help                           false
[0.001] initConfigParams():  Configuration flags end
[0.001] init():  STMicroelectronics ST-LINK GDB server. Version 7.3.0
Copyright (c) 2023, STMicroelectronics. All rights reserved.
[0.011] openDevice():  COM frequency = 4000 kHz
[0.011] openDevice():  Target connection mode: Attach
[0.018] readFromTarget():  Reading ROM table for AP 0 @0xe00fdfd0
[0.042] reset_hw_wtchpt_module():  Hardware watchpoint supported by the target 
[0.057] initContext():  ST-LINK Firmware version : V2J41M27
[0.057] initContext():  Device ID: 0x449
[0.061] initContext():  PC: 0x0
[0.070] Device_GetStatus():  ST-LINK device status: RUN_MODE
[0.071] initContext():  ST-LINK detects target voltage = 3.24 V
[0.072] initContext():  ST-LINK device status: RUN_MODE
[0.072] initServerContext():  ST-LINK device initialization OK
[0.072] pollAndNotifyRun():  Stm32Device, pollAndNotify running...
[0.076] updateState():  SwvSrv state change: 0 -> 1
[0.076] WaitConnection():  Waiting for connection on port 61235...
[0.077] WaitConnection():  Waiting for connection on port 61234...
[2.268] stop():  Stopping port 61234
[2.268] WaitConnection():  Received stop for port 61234, not accepting new connections.
[2.268] deInit():  GdbSrv, deInit entry.
[2.268] deInit():  GdbSessionManager, deInit entry.
[2.343] deInit():  GdbSessionManager, deInit exit
[2.343] deInit():  SwvSrv deInit entry
[2.343] stop():  Stopping port 61235
[2.448] WaitConnection():  Received stop for port 61235, not accepting new connections.
[2.448] deInit():  SwvSrv deInit exit
[2.448] closeDevice():  Stm32Device, closeDevice() entry
[2.449] pollAndNotifyRun():  Stm32Device, pollAndNotify stopped
[2.455] closeDevice():  Stm32Device, closeDevice() exit
[2.455] deInit():  Stm32Device, deInit success
[2.455] deInit():  GdbSrv, deInit exit.

3 REPLIES 3
Wijeden RHIMI
ST Employee

Hello @MMain.1

It's the same problem when using Windows or it occurs only on Mac ?

Wijeden

MMain.1
Associate II

Only on Mac

MMain.1
Associate II

Hi, is there anything I can check to try to fix it?

My personal computer is the Mac with the issue, so I would really like to solve this

Thanks