2021-04-19 03:55 PM
In the CubeIDE I have a simple program just to get familiar with the IDE. I have connected the STM32L476 and as the run / debug process starts I see the message below. When the console indicates debugger connected The LED on the ST-Ling part goes green and blinks then turns red and finally the message on the console indicated that the connection is lost. I found a similar question and followed all the suggestions but no success. I appreciate any help.
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
Waiting for debugger connection...
Debugger connected
Debugger connection lost.
Shutting down...
2021-04-20 01:19 AM
Is it allowed debugger port on MCU?
CubeMX, Categories->SYS->Debug
2021-04-20 08:22 AM
Yes, I am using the USB connector on the ST-Link side of the Nucleo module. i also have the jumpers set for that connector and not the CN4 for SWD.
I reviewed all the jumper settings even reviewing the schematics to be sure I understand their usage.
It does appear that the ST-Link is trying to connect and possibly even connecting as the COM LED (LD1) actually blinks green for a second or two and then goes Red with the console message "Connection Lost".
2021-04-20 09:09 AM
When trying to download a program to the Nucleo and getting the message connection lost, is there any way to get a log of what was going on up to the failed connection? That might be helpful to diagnose the problem.
2021-04-20 10:15 PM
I thought the software configuration. Debug port has its own settings. Try to open MCU configuration in CubeMx and see, if debug is setting and how is setting. You can find it in section Categories->SYS->Debug
2021-04-21 07:15 AM
Yes, debug is set for serial wire.
2021-05-30 06:37 PM
I had the same problem. My solution was pressing the reset button multiple time on the board while the debug initiates.
2021-05-31 01:14 AM
Hi,
About Categories->SYS->Debug. CubeIDE actually does not care about this setting. When we launch debug the IDE itself will try to configure the debug regardless of what is set in Categories->SYS->Debug. Some other IDEs/tools may need to set these options correctly. But not in CubeIDE.
So for sure something else is incorrect there. I cannot see that CubeProgrammer is called at all to carry out any flash load operation.
Is the debug configuration setup to load the binaries?
To help you please do this:
Please feed us with this info and let's see if we can make some progress..