Eclipse C and Remote Debugging

Simon, you’ve been at this since last year. SO why don’t you get a book on GCC and start reading ?

Either that, or ask this question on the eclipse forums. This is a GCC / Eclipse question more than anything else.

I know C and C++ very well…I’ve been developing in it since the 80’s.

What I find difficult is the lack of complete information, is it to much to expect that having bought the hardware for the software and documentation to be complete?

Sorry, I’m so fed up with dead ends…and pissy people with atitudes, that instead of offering help, make wise cracks.

Eclipse isn’t the problem, the set-up of the toolchain is.

Sorry, I guess you can tell, I’m a bit tired and just want to make some progress on the project, instead of battling with the set-up.

You can always ssh in and build on the target. That's just the way
i've always done it.

Regards,

true, is it to much to ask to use an IDE?

I have it all working for Java, would just like to do the same for C.

Frankly, when developing for embedded platforms, yes, IDEs are too much to ask for. 90% of embedded programming today is done with command-line tools as it has been for decades. Once in a while someone builds an IDE, but they are invariably so limited in application as to be more or a straightjacket than a real tool. The amount of work it takes to produce a truly useful IDE makes sense only if you’re developing on a commercial platform with millions of credit-card holding users. So if you want to develop for Windows, Android, and such, good IDEs are available. If you’re programming a custom board, well, better get used to building your own tools.

I’ve been writing software for various embedded platforms for a long time, MSP430, Echelon, PIC’s. In the case of MSP430, the development suite was based on Eclipse. When writing software for PC104 platforms using QNX, the IDE was Momentics, which is eclipse.

The assumption always seems to be that you are talking to someone who hasn’t coded much before, I’m 44. I’ve been coding professionally since 1985.

I can follow instructions as well as the next person, unfortunatley a lot of the information online is incomplete or the guides are lacking.

I have no doubt you are correct, much documentation is atrocious. I’m even more experienced than you (I’m 50, been programming since 1979), but I spend a lot of time on Google hunting down undocumented software features. Like everything else, documentation requires resources to create, and often those resources just aren’t there, especially in the free/open source world.

I’ve been writing software for various embedded platforms for a long time, MSP430, Echelon, PIC’s. In the case of MSP430, the development suite was based on Eclipse. When writing software for PC104 platforms using QNX, the IDE was Momentics, which is eclipse.

The assumption always seems to be that you are talking to someone who hasn’t coded much before, I’m 44. I’ve been coding professionally since 1985.

I can follow instructions as well as the next person, unfortunatley a lot of the information online is incomplete or the guides are lacking.

I use Eclipse and Code Composer Studio all the time and they work just fine. I haven’t used GDBServer for a long time so it is difficult to advise you how to get this working. Currently I use Lauterbach JTAG tools for kernel code debugging and these tools are amazing because of their Linux Kernel Awareness. However, previously I used Ronetix PEEDI JTAG tools which make JTAG look like GDBServer. So my suggestion is to look at the support docs on the Ronetix website as they explain how to setup Eclipse to work with GDBServer. If this doesn’t work, then there is possibly some incompatibility between the version of Eclipse and GDBServer.

Regards,
John

Simon, you may think I’m trying to be a smart ass but I’m not. Using Code Composer studio, and various other IDE’s for various platforms does not mean you understand how to setup / use a GCC toolchain from the command line. Which is really what you need to know to understand to use these properly.

All I have seen you say so far is that you have java GDB ( not even remotely the same thing ) working, and that you’ve been programming in C / C++ since the 80’s. Personally, I have been programming C / C++ since the early 90’s, and never really truely used a GCC toolchain until I cut my teeth on it with the MSP430 launchpad.

My point ? Just because you may know gcc, and g++ does not mean you understand the whole GCC toolchain. Again, there are books on the subject . . .

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-lin
ux-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

This is a pathing issue, eclipse does not know where to find the toolchain binaries. I dont use Eclipse personally but perhaps for each binary you need a proper fully qualified path to each binary? More information required.

http://www.amazon.com/The-Art-Debugging-GDB-Eclipse/dp/1593271743

??

Hi 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.

Which is?

Can you cross debug with gdbserver/cross-gdb without Eclipse?

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

If you want a free and open “out of the box” solution for the BBB you might want to have a look at the Yoctoproject [1] and there at the ADT[2] (not to be confused with the Android stuff).
You should find enough information there to get you started.

Regards,

Robert

[1] https://www.yoctoproject.org/
[2] https://www.yoctoproject.org/tools-resources/projects/application-development-toolkit-adt

Have orderred this one:

http://www.amazon.co.uk/GDB-Pocket-Reference-OReilly/dp/0596100272/ref=sr_1_1?ie=UTF8&qid=1401554600&sr=8-1&keywords=gdb

I set up a similar development environment for someone a few months ago. I just posted a pdf document with the steps on my blog

http://blog.embeddedcoding.com/2014/06/beaglebone-black-remote-debug-with.html

I used a Debian Wheezy host instead of Ubuntu but it might still be helpful to look through the eclipse setup. I did use Robert Nelson’s BBB debian/linaro setup.

Aaron

Can this be of any help?

http://www.youtube.com/watch?v=wpg61xG9Egc

It’s an interesting video by Derek Mollow titled

Beaglebone: Java Setup (JRE), Eclipse and Remote System Explorer (RSE)

I’ve back tracked quite a bit, uninstalled eclipse and toolchain and started over. I have the Java remote debugging working, the C remote debugging is still a problem…I’m confused by what is being reported:

Last login: Wed Jun 4 18:32:57 2014 from big-mumma.local
echo $PWD’>’
chmod +x /home/debian/helloWorldC;gdbserver :2345 /home/debian/helloWorldC;exit
root@beaglebone:~# echo $PWD’>’
/root>
root@beaglebone:~# chmod +x /home/debian/helloWorldC;gdbserver :2345 /home/debia n/helloWorldC;exit
Process /home/debian/helloWorldC created; pid = 2678
Listening on port 2345
Remote debugging from host 192.168.1.100
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
Listening on port 2345

I’ve no idea where the address 192.168.1.100 is coming from, the remote connection to the beaglebone is configured and working on 192.168.1.161.

Also, on a SSH console on the Beaglebone Black, I can see that both gdbserver and my test application are running, if I then kill the gdbserver, up pops:

Killed
logout
!!!Hello World!!!

In the eclipse console on ubuntu.

Having thought about what is happening over night…I still don’t understand why Remote debugging from host is 192.168.1.100 ???

I run Ubuntu 14.04 in Virtualbox on my Windows 7 x64 development system. The I/P addresses for the various components are as follows:

Ubuntu, 10.1.174.100
Windows 7, 192.168.1.100
Beaglebone Black, 192.168.1.161

Eclipse is running in Ubuntu and I use the Remote tools to connect to the Beaglebone Black from eclipse. I have succesfully configured eclipse to allow remote debugging of Java applications on the Beaglebone Black and this works very nicely.

C/C++ is the problem, why is it reporting the Windows 7 I/P?

Does this help shed any light on what the problem is?

Thank you,

Hi

I must admit I haven’t but I will try tonight.