In Eclipse, how to load executable to remote ARM based embedded target while remote debugging

1.4k views Asked by At

I build a "hello world" program in Eclipse CDT with cross development plugin for an ARM Cortex-A8 based board. I define arm-none-linux-gnueabi compiler for cross development and when I transfer my output binary file to the board with a USB, it works ok. I connect to the board with ssh and execute commands.

Through ssh, I run the following command:

gdbserver :2345 mydebugexecutable

Process NeonDenemeler_debug created; pid = 1692

Listening on port 2345

"mydebugexecutable" is the executable which is cross compiled on my host pc (Ubuntu) in Eclipse CDT with debug setting. I create a debug configuration just as described in http://linuxtortures.blogspot.com.tr/2012/06/cross-compiling-and-cross-debugging-c.html

To summarize the procedure, I created a new C/C++ Remote Debug cofiguration, set debugger to "arm-none-linux-gnueabi-gdb" instead of "gdb" and set connection settings to ip and port of my remote target. Everything works ok when I launch that debug configuration, since the gdbserver on board waits for packets from port 2345.

However, my problem is, when I change my source and compile again, is there a way to load binary through gdb from host to the target by Eclipse? I could not manage to find an option such as "load executable" etc. I make my changes and build, but always the old executable runs on the target. One of my companions performs the same remote debugging process by using QT successfully, this means "arm-none-linux-gnueabi-gdb" has that remote executable loading feature.

1

There are 1 answers

0
bbouzan On

The thing is that you are using a "Manual Remote Debugging Laucher" configuration (according to the link you posted). By Manual it means that the application is copied to the target and started by the user.

All you have to do is to stick with the Debug configuration of Figure 10, which is the default one ("Automatic Remote Debugging Laucher"). The Debug session will copy the file to the target and start the debuggin automatically, just like as if it was locally. For this to work you just have to make sure you first created a working Remote Connection on "Remote System Explorer" perspective, and assigned it to your Debug configuration (Connection drop down menu).

Hope it helps!