Problem debugging on J-Link with MCUXpresso

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem debugging on J-Link with MCUXpresso

Jump to solution
4,167 Views
ortonmc2
Contributor II

I am trying to debug on a target in MCUXpresso v11.4.0 using a Segger J-Link Plus. My host is a Debian VM. I am able to flash the target, so it appears the probe and target are working properly. However, when I try to open a debug session, I get an error box:

Error in final launch sequence:

Failed to execute MI command:
-target-select remote localhost:2331

Error message from debugger back end:
Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+
Failed to execute MI command:
-target-select remote localhost:2331

Error message from debugger back end:
Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+
Remote replied unexpectedly to 'vMustReplyEmpty': PacketSize=4000;qXfer:memory-map:read-;QStartNoAckMode+;hwbreak+;qXfer:features:read+

The target CPU is LPC55S69.

Can anyone give me a hint how to solve this?

Thanks

-Mark-

Tags (3)
0 Kudos
1 Solution
4,156 Views
ortonmc2
Contributor II

I found the problem. Apparently the default GDB timeout is too short for my probe/target, and GDB was timing out. I increased the timeout and now I can connect.

For anyone else who has this problem, the GDB setting is Window->Preferences->C/C++->Debug->GDB->Remote timeout.

View solution in original post

5 Replies
4,157 Views
ortonmc2
Contributor II

I found the problem. Apparently the default GDB timeout is too short for my probe/target, and GDB was timing out. I increased the timeout and now I can connect.

For anyone else who has this problem, the GDB setting is Window->Preferences->C/C++->Debug->GDB->Remote timeout.

3,826 Views
hamedelahi
Contributor I

Thank you so much for your help. I set it to 15 seconds and debugging works currently in Ubuntu on Virtualbox.

0 Kudos
4,160 Views
converse
Senior Contributor V

Looks like something is blocking local network access. As you are running in a VM, check the network stack is running, or how it is being routed by the VM host. Also make sure there is no firewall preventing access.

0 Kudos
4,159 Views
ortonmc2
Contributor II

The J-Link is connected over USB, so network access doesn't enter into it.

0 Kudos
4,156 Views
converse
Senior Contributor V

You have misconfigured something then, because the debugger is trying to connect over a network. This is the meaning of “remote localhost:2331” (connect to tcp port 2331 on the localhost)

0 Kudos