Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Remote debug with RaspberryPi(Raspberry )
Remote debug with RaspberryPi [message #1842616] Fri, 25 June 2021 14:47 Go to next message
Robert Ty is currently offline Robert TyFriend
Messages: 20
Registered: June 2012
Junior Member
Hello ,

I know that the problem I have is possibly not an Eclipse problem , but I hope that
someone who uses Eclipse CDT Cross compiler and debugger with RaspberryPi can help .

I'm able to generate a running program for the RPi4B using Eclipse with GCC Cross Compiler
on a Windows 10 PC. There is no problems with debugging (Eclipse Cross debugger and
gdbserver via ssh), as long as no display is involved.
I'm using gtk+3 for a kind of GUI. However, as soon as gtk functions are executed , the debugger stops
with the message :

cannot open display:

I found a lot of solutions for similar problems on the WEB, but with nothing I tested I was successful.

The code is working if I start the program via the RPi4B console. So I assume it has something to do
with the rights to access the display of the RPI4B via the remote debugger.
Or is there something in Eclipse debug settings I forgot to use?

Can anybody try to help please?

Thank you.
Re: Remote debug with RaspberryPi [message #1842642 is a reply to message #1842616] Sat, 26 June 2021 07:21 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
Do you have X-windows running on the Raspberry Pi?
Here's a topic on getting X11 forwarding to work with Raspberry Pi and Windows.
https://superuser.com/a/1332739

This may also help
https://superuser.com/questions/310197/how-do-i-fix-a-cannot-open-display-error-when-opening-an-x-program-after-sshi

[Updated on: Sat, 26 June 2021 07:24]

Report message to a moderator

Re: Remote debug with RaspberryPi [message #1842643 is a reply to message #1842642] Sat, 26 June 2021 08:26 Go to previous messageGo to next message
Robert Ty is currently offline Robert TyFriend
Messages: 20
Registered: June 2012
Junior Member
Thanks for trying to help.

I already found these hints on the web and I tried it without success. Unfortunately some
of the proposed X11 settings are not accepted by ssh for unknown reasons.

I'm not sure, but I think I do not need the X11 stuff at all, because I just want
to show the GUI on board display where it should be displayed, not on the
Windows host.
But I'm new with RPI and Linux, I could be wrong.

[Updated on: Sat, 26 June 2021 09:50]

Report message to a moderator

Re: Remote debug with RaspberryPi [message #1842645 is a reply to message #1842643] Sat, 26 June 2021 12:20 Go to previous message
Robert Ty is currently offline Robert TyFriend
Messages: 20
Registered: June 2012
Junior Member
Problem fixed!

I found another hint here in this forum which I could use and eventually fix the problem.
I set X11forwarding off on ssh settings of RPi4B and export DISPLAY=":0.0" in Eclipse
"Commands to set before execution" in the debugging configuration.

Now it works as expected.
Previous Topic:BLDC
Next Topic:Build project from GUI using imported build tree from docker
Goto Forum:
  


Current Time: Fri Apr 26 18:52:24 GMT 2024

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

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

Back to the top