cancel
Showing results for 
Search instead for 
Did you mean: 

Target disconnected error

ItzNicolo
Associate

Hi.

I have recently encountered a problem that I'm not capable of solving in for a few hours now.

I'm using STM32F042K6T6 as a uC and, when I try to debug my projet, it shows me the following errors:

Failed to execute MI command:
target remote localhost:2331

Error message from debugger back end:
Remote communication error. Target disconnected.: No error.
Failed to execute MI command:
target remote localhost:2331

I'm trying to fix those problems for a few hours, but with no succes.

Can someone help me solve me this?

Also I'm using J-LINK as a debugger.

Best regards

 

2 REPLIES 2
Rim LANDOLSI
ST Employee

Hello @ItzNicolo and welcome to the community,

 

Could you, please, provide the debug configuration and the GDB server log? This will help us to analyze the problem further. Also, check that the J-Link is correctly connected to the board. This knowledge base link may help.

 

Thanks,

Rim

Ok, here is my debug configuration:

For GDB Connection Settings:

1. Autostart local GDB server

2. Host name or IP address: localhost

3: port number: 2331

My Debug Probe is SEGGER J-LINK

For GDB Server Command Line Options:

1. Interface: SWD

2. Initial Speed: 4 MHz without specific J-LINK S/N

3. Device: STM32F042K6T6

4. Reset strategy: Type 0: Normal

5. JTAG Scan Chain: Auto with no position and IRPre

For Serial Wire Viewer:

1. Core Clock is disabled

2. Limit SWO clock is disabled

3. RTOS Kernel Awareness is disabled

For Misc

1. No script file used

2. Live expressions and Flash download verification are enabled