Page 1 of 1

Unable to connect in debug mode

Posted: Thu Aug 26, 2021 1:47 pm
by romanluba
Hello everyone,

as a preface im using a SB70LC, running the 2.9.2 NNDK, and most of my program is using the SDK and not changing much.
I attempted to follow the steps mentioned in the Getting Started Guide chapters 5 and 8 to get my debugger to work. I have my SB70LC connected to the dev board that comes with it.

I have:
- set up a static IP for my windows machine and entered it under Debug Configuration ->Debugger -> Host IP
- I have set a static gateway and mask on my local machine
- I used IP Setup to change IP, Mask and gateway on the netburner

For a debug build to build I have to flash a previous Release build into it, prior to attempting to run the debug function. When the debug function runs successfully, aka no issues with the build, it does not change to the Debug view in NBEclipse.

I can not find my netburners via NBFind, never could have. I usually use the link local address given to it when a netburner connects (169.254.x.x) to telnet into the Release build, but I'd like to use the debug functionality and can't see how I can do it. My next step will be trying a router in a closed network.

Best,
Roman

p.s. Tom if you see this, we talked a long time ago about a weird bug with the netburner DHCP, I'd love to chat with you about the fix we found for it

Re: Unable to connect in debug mode

Posted: Thu Aug 26, 2021 2:19 pm
by romanluba
I'm getting some 'target selection failed' messages when I try to program a debug build after a release build.

Re: Unable to connect in debug mode

Posted: Thu Aug 26, 2021 4:36 pm
by TomNB
Hello Roman,

From your description it sounds like your configuration may not be correct. The IP address specified in the debugger host field should be your SB70LC, not your PC. So what is happening is when you try to connect to the target/host, it is trying to connect to your PC, not the SB70LC.

A gateway on the PC will not come into play. Both your PC and the SB70LC must be on the same subnet. The debugger will not work through a router/gateway to a different subnet. Also, this will mean you cannot download code to the device either - the download will attempt to use your pc address.

It seems your using AutoIP addresses (link local is IPv6). That should be fine. What is the IP address and mask of both the PC and SB70LC?

If find cannot locate the device it could be because:

- You are using a virtual machine and the routing will not work
- You have a firewall or antivirus blocking the pacets
- You have multiple network interfaces on the same subnet, like a wifi and wired ethernet, and the routing is picking the alternate interface.

The best case would be to have both your pc and the SB70LC on a wired network with DHCP or know static IP addresses.

If you would like to contact me, please send an email to sales@netburner.com to my attention in the subject. I would be happy to discuss the dhcp behavior you mention.

Have a great day,

Tom

Re: Unable to connect in debug mode

Posted: Thu Apr 21, 2022 11:43 am
by petaluma007
I am using NANO54415 and having the same problem described in the OP. The error that I got is shown below. Attempted to Telnet to host 192.168.1.166 and port 2159 was unsuccessful. Any idea?

telnet 192.168.1.166 2159
Connecting To 192.168.1.166...Could not open connection to the host, on port 2159: Connect failed

Error in final launch sequence:

Failed to execute MI command:
-target-select remote 192.168.1.166:2159
Error message from debugger back end:
192.168.1.166:2159: The system tried to join a drive to a directory on a joined drive.
Failed to execute MI command:
-target-select remote 192.168.1.166:2159
Error message from debugger back end:
192.168.1.166:2159: The system tried to join a drive to a directory on a joined drive.
192.168.1.166:2159: The system tried to join a drive to a directory on a joined drive.

Re: Unable to connect in debug mode

Posted: Thu Apr 21, 2022 5:17 pm
by TomNB
Hello,

Can you answer the questions from the previous post?

What is the IP address and mask of both the PC and SB70LC?

If find cannot locate the device it could be because:

- You are using a virtual machine and the routing will not work
- You have a firewall or antivirus blocking the pacets
- You have multiple network interfaces on the same subnet, like a wifi and wired ethernet, and the routing is picking the alternate interface.
- Your application does not call the init gdb function.

If you follow the debug sections in the NBEclipse Getting Started Guide, on which step does it fail?

The best case would be to have both your pc and the SB70LC on a wired network with DHCP or know static IP addresses. What are your results in this configuration?