Project

General

Profile

Debugging ARM in Eclipse

Added by Mary Frantz over 11 years ago

From the wiki page on "Debugging ARM apps with Eclipse":

On eclipse, you will need to setup a new debug configuration. In the debug configuration dialog you'll need to perform the following steps:

Change the debug application from "gdb" to "arm-angstrom-linux-gnueabi-gdb"
Select the session type to be gdbserver (a remote session).
When gdbserver is selected, an additional configuration tab should be present for "connection type". On that tab, you'll need to change the connection from serial to "TCP", set the localhost to the IP address of the target and update the port number to the one you selected when you launched the gdbserver.
create (in your root project directory) a ".gdbinit" file according to the info shown below

This is not matching up with what I see on Eclipse. I open up a dialog using Run->Debug Configurations..
Select C/C++ Remote Applications and click on the 'new' icon.

Under the Main tab:

There is a "Connection" entry with a "New" button. Click on the "New" button. Another dialog ... but nothing to select from. I try entering "TCP", but it does not accept this. Only the "Cancel" button is available. So there does not seem to be a way to tell it to use TCP and give the ip address.
Project: Hello_DSP
C/C++ Application: Debug/Hello_DSP
Remote Absolute File Path for C/C++ Application: /home/mitydsp/workspace/Hello_DSP/Debug/Hello_DSP

Is this the path to the executable on the development host or on the mitydsp target?

Under the Debugger tab:

Main:
Debugger: remote gdb/mi
GDB debugger: arm-angstrom-linux-gnueabi
GDB command line: .gdbinit
Protocol: Default

Shared Libraries:
nothing

Gdbserver Settings:
Gdbserver name: gdbserver
Port number: 12345

Also from "Debugging ARM apps with Eclipse"

gdbinit settings
The following settings are needed in the .gdbinit file in order to correctly map ARM system shared libraries when remote debugging on a linux platform with the MityDSP-L138 cross tools installed.

set solib-absolute-prefix /usr/local/angstrom/arm/arm-angstrom-linux-gnueabi
set can-use-hw-watchpoints 0

I am using MDK_2012-08-10, toolchain 4.5.4. Should the first line be:
set solib-absolute-prefix /usr/local/oecore-i686/sysroots/armv5te-angstrom-linux-gnueabi

How do I get the connection set up? Have I even started in the right place?

Mary


Replies (1)

RE: Debugging ARM in Eclipse - Added by John Pruitt over 11 years ago

I have added text to the http://support.criticallink.com/redmine/projects/arm9-platforms/wiki/Debugging_ARM_Apps_with_Eclipse wiki page to reflect what the screens look like when using Code Composer 5.0. The original text was for an older version of eclipse.

The setting for solib-absolute-prefix should be a directory that contains a directory structure similar to your target system. When gdbserver on the target indicates that it has loaded a shared library with a specific path (e.g. /lib/someLibrary), the debugger will look for a file on the host named ${solib-absolute-prefix}/lib/someLibrary and try to load symbols for that library. The directory named in the prefix is essentially a shadow directory of the target filesystem. You can make your own shadow directory of the target file system in order to add additional libraries. You can also use the Shared Library tab on the Debug Configuration dialog to specify the same information.

If you are not using Code Composer 5, you might consider trying it.

Hope this helps.

    (1-1/1)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)