Page 1 of 1

Unable to Debug

Posted: Fri Nov 30, 2018 4:17 am
by geethakrishnan
Dear Sir,

I was trying to launch the debug session from Truestudio.
But I was getting the following error message.

Failed to execute MI command:
target extended-remote localhost:61234

Error message from debugger back end:
Remote communication error. Target disconnected.: No error.


Can anybody help in figuring out the problem.

with regards,
Geetha

Re: Unable to Debug

Posted: Tue Dec 04, 2018 6:30 am
by Georgy.Moshkin
Does stand-alone ST-LINK utility work if you press connect button? Are you using custom board or some standard discovery-style board?
Try to generate blank project in STM32CubeMX, select SYS->debug->Serial Wire, enable SYS_JTCK_SWCLK and SYS_JTMS_SWDIO pins, and try to build and debug this blank project.

Re: Unable to Debug

Posted: Tue Dec 04, 2018 9:32 am
by geethakrishnan
I could connect through ST-LINK Utility. And able to download. Now it is working fine. It is a custom board

Re: Unable to Debug

Posted: Tue Dec 04, 2018 11:13 am
by Niconol
Hi,

I got this same issue today, but it works fine yestarday.

I'm working on linux, I don't find where I can launch ST-LINK utility, but I can't download a .bin (it works by a simple drag-and-drop yesterady)

I can try a new empty project, but where can I find "select SYS->debug->Serial Wire", in CubeMx ?

Code: Select all

STMicroelectronics ST-LINK GDB server. Version 5.0.2
Copyright (c) 2018, 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

Target no device found

Error in initializing ST-LINK device.
Reason: No device found on target.


with regards

Nicolas

Re: Unable to Debug

Posted: Wed Dec 05, 2018 3:11 am
by Georgy.Moshkin
Niconol wrote:I can try a new empty project, but where can I find "select SYS->debug->Serial Wire", in CubeMx ?

in "Pinout" tab, there is a large tree list of all peripherals (Configuration,MiddleWares,...,ADC1,ADC2,...SPI1,...,SYS,....).
You can find "SYS" somwhere in the middle of this list:
swd.png

Re: Unable to Debug

Posted: Wed Dec 05, 2018 2:02 pm
by Niconol
It was alreadylike that.
No difference after rebuil all.

Code: Select all

Failed to execute MI command:
target extended-remote localhost:61234

Error message from debugger back end:
localhost:61234: Connexion terminée par expiration du délai d'attente.