Eclipse C and Remote Debugging

I have Eclipse Kepler running on Ubuntu 14.04 x64, I can build and remote debug Java applications on the Beaglebone Black, but for some reason I cannot remote debug C applications.

I can compile a C application and I can see that it is transferred to the Beaglebone Black, I can even run it from an SSH terminal on the Beaglebone Black. But trying to remote debug always fails with a GDB error.

The console reports that GDB will reconnect, however it never does.

I’ve tried following numerous videos on YouTube, however none of them have resolved this issue.

In the end I decided to build and compile on the Beaglebone Black directly, however now I get an error saying GLIBC_2.17 libc.so.6 not found…sorry if my post isn’t very detailed, I’m at work now without access to all the information.

Can anyone point me in the right location to resolve either the remote debugging or the GLIBC_2.17 error? I have already spent a very long time trying to find answers myself.

Thank you,

Kind Regards,
Simon

I have Eclipse Kepler running on Ubuntu 14.04 x64, I can build and remote debug Java applications on the Beaglebone Black, but for some reason I cannot remote debug C applications.

I can compile a C application and I can see that it is transferred to the Beaglebone Black, I can even run it from an SSH terminal on the Beaglebone Black. But trying to remote debug always fails with a GDB error.

The console reports that GDB will reconnect, however it never does.

I’ve tried following numerous videos on YouTube, however none of them have resolved this issue.

In the end I decided to build and compile on the Beaglebone Black directly, however now I get an error saying GLIBC_2.17 libc.so.6 not found…sorry if my post isn’t very detailed, I’m at work now without access to all the information.

Can anyone point me in the right location to resolve either the remote debugging or the GLIBC_2.17 error? I have already spent a very long time trying to find answers myself.

You need GDBServer installed on your BBB. You launch GDBServer on your BBB with IP of host and specify the port number for the host to connect to. In Eclipse, I don’t recall the exact command, but it is something like gdb remote . There are plenty of example on Google.

https://www.google.com/search?q=eclipse+gdbserver+remote+debug&oq=eclipse+gdbserver&aqs=chrome.1.69i57j0l5.16411j0j7&sourceid=chrome&es_sm=119&ie=UTF-8

Regards
John

Hi John, Thank you for the reply, perhaps I wasn’t very clear. GDB Server is installed on the Beaglebone Black and I see the process running, it just fails to connect.

I will post more detail when I get home tonight. I’ve tried using the default port 2345 and also found a post suggesting 3333, neither worked.

I’m still looking for a solution and getting more and more frustrated by what seems to be a very steep up hill battle.

There are quite a few sites linking to http://www.angstrom-distribution.org/toolchains/

This link is invalid and results in a 404. The toolchains that I did manage to track down are not all complete, some have a gdb in the archive, others don’t.

Can someone point me in the direction of a complete toolchain with instructions on how to install it correctly?

Thank you,
Simon

I’m still looking for a solution and getting more and more frustrated by what seems to be a very steep up hill battle.

There are quite a few sites linking to http://www.angstrom-distribution.org/toolchains/

I think you are going to find it harder and harder to get support for Angstrom. It has been over a year since I’ve used Angstrom so I don’t every remember how to get some things working. I would recommend that you make the move to Debian as we are much more able to help with the OS we currently use.

Regards,
John

What happened to Angstrom? What do new Beaglebone Blacks ship with?

I’ve already invested a bunch of time into the Angstrom set-up getting mySQL server configured in MMM mode replicating between two beaglebone blacks with my own floating IP address manager.

I remember someone saying that GDB for the BBB ( perhaps the whole ARCH ) Does not work properly. This was last year though.

Which port are you using for the C GDBServer ? From what little you describe it almost sounds like a connection issue, because of too low a port, and a possible myriad of other things.

Giving us the EXACT error message as given to you on the command line would certainly help some But as John said, you may want to consider moving to Debian just because most people are using it now, or will be.

New Bealgebone Black ship with Debian starting with REV C. Also Debian users seem to be more active in this group.

What happened to Angstrom? What do new Beaglebone Blacks ship with?

I've already invested a bunch of time into the Angstrom set-up getting mySQL
server configured in MMM mode replicating between two beaglebone blacks with
my own floating IP address manager.

Linux is linux, shouldn't be that hard to port that to debian. But no
one is forcing you to switch either.

Regards,

Robert, I agree, but default it seemed the tools used in Angstrom are different and create more headache for people like me who have been using Debian for years. Many things like dropbear, instead of openssh-server for instance can be a PitA to get used to. Especially when you already have experience with other tools. Not to mention the fact that the whole Angstrom experience for me personally felt very shoddy.

Needless to say Angstrom lasted about a week on my own BBB until i found your instructions last year. Been running debian ever since.

I’ll give Debian a go. Just find it hard to start over again, feels like so many steps backward in order to do what should have been possible from the start.

Laughs, i forgot about all the "dropbear" problems. It seemed like it
was everyday with messages, just delete this file on the microSD and
boot.

Regards,

Well, one of the goals of the debian images, was to make things as
back-ward compatiable with Angstrom as possible.

So although some "tools" have different names, the experience should mirror
Angstrom's default install.

I've tried to post the main differences in experience here:

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#FAQ

Regards,

Thank you, I’ll look into it and give it a go.

Are they’re any shortfalls to be aware of, anything that isn’t supported?

Simon, one benefit is that Debian is very well documented. But also you have different versions so you need to pay attention to that.

Something like google search “Debian wheezy how to x.y.z” works very well for 99% of the questions you’ll have.

Thank you, will do.

Well, right now we support more devices and capes out of the box then the
last official Angstrom release, but if you notice something we broke kernel
wise just ping us. We tried to test everything, but everyone has unique
hardware.

Otherwise the biggest change, it's a "armhf" ("gnueabihf") based system, so
your "gnueabi" compiler won't work. (Well i did had the 'armel' library) so
"hello world" "gnueabi" applications will run, but nothing more complex
then that.

Regards,

Thank you Robert, I’ve now reflashed both my Beaglebone Blacks with Debian and have downloaded the linaro toolchain, so far everything has gone really well…about to set-up eclipse on my ubuntu virtualbox and then try remote debugging.

Can you suggest a good site for setting up eclipse with the Linaro toolchain, I’ve got the toolchain installed on ubuntu 14.04 in:

/home/simon/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux

In eclipse, I have created a C Project and in the Properties under C/C++ Build, Settings, I have the Cross Settings, Prefix set to:

arm-linux-gnueabihf-

Path set to:

/home/simon/gcc-linaro-arm-linux-gnueabihf-4.8-2014.03_linux/bin

Cross GCC Compiler, Command set to gcc
Cross GCC Linker, Command set to gcc
Cross GCC Assemlber, Command set to as

When I build the project I get:
/bin/sh: arm-linux-gnueabihf-gcc: command not found HelloWorldBBB C/C++ Problem

Anyone? Please?