Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Remote Debug Startup with Linux on iMX8M(Problem starting remote Debug in early stage of development)
Remote Debug Startup with Linux on iMX8M [message #1821081] Wed, 05 February 2020 10:24 Go to next message
Gordan Rancic is currently offline Gordan RancicFriend
Messages: 7
Registered: January 2020
Junior Member
Hi to all,

I am new to Eclipse, so probably my question is obvious. I am about to use Eclipse to develop an application (in ANSI C) for ARM iMX8M target board where Linux is running. For that purpose, I created a new C project "Hello World", configured Eclipse to use GCC, compile my HelloWorld (it worked), copied it manually (outside from Eclipse) to my target board and executed it: I got "Hello World" on the terminal. This far is OK.

Now, I would like to debug it from Eclipse. I created a new Debug Configuration, set parameters (presume to be correct) according to the parameters from my target, but when I try to Debug, I got the message on the IDE window:

"Error during file upload.
java.io.IOException: inputstream is closed
java.io.IOException: inputstream is closed
java.io.IOException: inputstream is closed"

I checked my host firewall, and everything is enabled for Eclipse and Java regaring my target. I suppose the problem is not in firewall.

Any suggestion? Thank you in advance.
Re: Remote Debug Startup with Linux on iMX8M [message #1821096 is a reply to message #1821081] Wed, 05 February 2020 14:56 Go to previous messageGo to next message
Helen Keller is currently offline Helen KellerFriend
Messages: 173
Registered: June 2019
Senior Member
If you are brave , or foolish - take your pick , explore TCF.
After few months of frustration - TCF is an orphaned application in my opinion - using crosscompiler (X86 - ARM) on PC / Raspberry Pi actually works BETTER than futzing with Eclipse "locally" .
Unfortunately I have to do BOTH - local and remote / embedded ....
Re: Remote Debug Startup with Linux on iMX8M [message #1821134 is a reply to message #1821096] Thu, 06 February 2020 08:27 Go to previous messageGo to next message
Gordan Rancic is currently offline Gordan RancicFriend
Messages: 7
Registered: January 2020
Junior Member
Dear Helen,

Thank you for your reply. I am using Eclipse on PC machine under Windows with a cross compiler GCC for ARM, and that is not the issue. The problem is the remote debug from Windows+Eclipse on remote target ARM+Linux. As I explained before, it seems that Eclipse (Java) is not able to transfer the executable from the PC to the target, and successively launch it with gdb for debug... I am probably missing some configuration on Eclipse.

Moreover, there were a huge development on Eclipse to make it confortable for different environments; if nobady will try to use it founding problems, all that job will become unusefull.

Someone else has the similar expericence with Eclipse+Windows+GCC --> ARM+Linux remote debug?
Re: Remote Debug Startup with Linux on iMX8M [message #1821188 is a reply to message #1821134] Thu, 06 February 2020 18:44 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
The remote debugging feature is actually a gdb function.
AFAIK it wants to interact with gdbserver running on your target machine.
But apparently there are other debugging stumps available.

If you can't run gdbserver on your target then maybe you can find another way.
Try googling remote gdb debug without gdbserver
Here's one response:
https://stackoverflow.com/questions/81194/how-to-do-remote-debugging-with-eclipse-cdt-without-gdbserver
and another:
https://developers.redhat.com/blog/2015/04/28/remote-debugging-with-gdb/

Note that these seem to assume the target is running an OS like linux.
Re: Remote Debug Startup with Linux on iMX8M [message #1821191 is a reply to message #1821188] Thu, 06 February 2020 19:18 Go to previous messageGo to next message
Gordan Rancic is currently offline Gordan RancicFriend
Messages: 7
Registered: January 2020
Junior Member
Hi David,
By opening "cmd" terminal on the PC and loging to my remote target, I don't have any problem to launch gdbserver. The issue is do it from Eclipse! Entire procedure requested to be done for remote debugging, when done manually from cmd prompt on PC (copy file from the host to the target, launch debugger and debug manually) is working well. It should be enabiled on Eclipse. That is the problem.
On my ARM target is running Linux.
Thank you anyway.
Re: Remote Debug Startup with Linux on iMX8M [message #1821192 is a reply to message #1821191] Thu, 06 February 2020 19:36 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Well, I don't know then.
It works for me.
I did have a problem initially when the remote firewall blocked the port.

index.php/fa/37312/0/
Re: Remote Debug Startup with Linux on iMX8M [message #1821194 is a reply to message #1821192] Thu, 06 February 2020 20:20 Go to previous messageGo to next message
Gordan Rancic is currently offline Gordan RancicFriend
Messages: 7
Registered: January 2020
Junior Member
I checked the firewall before posting my first message, and Eclipse and Java access are enabled correctly. According to error message, I do not even arrive to launch debugger: the error regards file (executable) upload from Eclipse to the target.
Manually, from a terminal "cmd" on the Windows host, it works, using:
"scp TestApp root@192.168.254.2://home/root/TestApp/TestApp"
but when Eclipse should do it, it fails, telling me
"java.io.IOException: inputstream is closed"
seems that tunnel from Eclipse to the Target is closed.
Re: Remote Debug Startup with Linux on iMX8M [message #1821196 is a reply to message #1821194] Thu, 06 February 2020 21:46 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
As I said, it works for me.
Apparently, the Eclipse parameters aren't correct despite what you believe.
You haven't told us exactly how you set up the Launcher then still
it may not be possible to diagnose the problem without even more detailed info.

You could try disabling the upload (checkbox at bottom of the Debugger tab in the launcher)
and maybe change the DSF launcher to manual remote.

If you have RSE installed you may be able to test your connection with it.
You may be able to just use the TM Terminal (if installed)

This may help but it's a little old:
https://stackoverflow.com/questions/43687189/eclipse-remote-debugging-cdt-tutorial

FWIW: in my case there are TWO firewalls: one on the host and the other on the remote.
Both had to be configured.
But since you can do this from a terminal then it's probably not an issue for you.

[Updated on: Thu, 06 February 2020 21:51]

Report message to a moderator

Re: Remote Debug Startup with Linux on iMX8M [message #1821206 is a reply to message #1821196] Fri, 07 February 2020 08:11 Go to previous messageGo to next message
Gordan Rancic is currently offline Gordan RancicFriend
Messages: 7
Registered: January 2020
Junior Member
Hi David,
Thank you very much for your support and time dedicated to this. I will dig more deep and give you the feedback. Probably not before next Tuesday.
Keep running!
Re: Remote Debug Startup with Linux on iMX8M [message #1821228 is a reply to message #1821206] Fri, 07 February 2020 12:50 Go to previous messageGo to next message
Tauno Voipio is currently offline Tauno VoipioFriend
Messages: 743
Registered: August 2014
Senior Member
If I were you, I'd start by making the debugging environment run outside of Eclipse, from the console.

Please get the GDB manual from <https://www.gnu.org/software/gdb/documentation/>, and read the remote debugging section.
Your situation differs from a basic remote debugging, as the host computer (PC) and the debugging target (iMX8M) are of different architectures. You need a cross-debugger which is PC code but interprets the target as ARM. AFAIK, there are two such in your case: gdb-multiarch and arm-linux-gnueabihf-gdb (or some like it).

You need to have the GDB stub running in the target Linux before attempting to connect with GDB remote access. It were a gross security hole in the target if you could trigger the stub from the network directly.


--

Tauno Voipio
Re: Remote Debug Startup with Linux on iMX8M [message #1821232 is a reply to message #1821228] Fri, 07 February 2020 14:35 Go to previous messageGo to next message
Gordan Rancic is currently offline Gordan RancicFriend
Messages: 7
Registered: January 2020
Junior Member
Hi Tauno,

Thank you very much for advise. I will be able to check everything on Monday, so I will post results as soon as I will have any kind of update.
Re: Remote Debug Startup with Linux on iMX8M [message #1832202 is a reply to message #1821232] Fri, 11 September 2020 11:28 Go to previous message
Phil Martin is currently offline Phil MartinFriend
Messages: 1
Registered: September 2020
Junior Member
Do you ever find the cause of this problem?
- I seem to have exactly the same problem!
- it's to do loading the file to the remote device...

Previous Topic:Indexer Problem with Arduino files
Next Topic:Need help making interface look like C language
Goto Forum:
  


Current Time: Mon Dec 30 17:15:13 GMT 2024

Powered by FUDForum. Page generated in 0.04260 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top