trauscher at loytec.com
Thu Oct 14 07:30:00 UTC 2004
> -----Original Message-----
> From: Steve Holle [mailto:sholle at link-comm.com]
> Sent: Wednesday, October 13, 2004 4:19 PM
> To: rtems-users at rtems.com
> Subject: Eclipse
> I'm interested in info on using Eclipse with the CDT plugin as a
> cross-development platform on a W2K system using MinGW and
> GDB connected to
> the Eclipse debugger. This seems like an intriguing
> configuration. Just
> doing research at the moment.
I'm using Eclipse for cross development. Maybe my experiences
can help a little bit.
For using make, the CYGWIN/MINGW binaries should be in the
PATH variable. This should be all.
Debugging needs some more setup.
NOTE! This is for Eclipse 2, CDT 1.x.
Remote debugging (e.g. ARM/RDI) seems to be broken in
Eclipse3/CDT 2.0.x, as the debugger dialogs do not allow to select
platforms! The CDT CVS Head version works again (I think it will
become CDT 2.1).
So there are three options: a) Stick with Eclipse2, b) compile CDT on
own or c) download a patched CDT version from www.zylin.com.
Debugging needs some more setup. Following steps must be done
to get Eclipse working with GDB:
1) Cross-Debug Workaround for the GDB/MI interface. (Found
in the Eclipse news groups.)
In file plugins/org.eclipse.cdt.debug.mi.core_1.0.0/plugin.xml
change the lines
where mycpu1, mycpu2, ... are the cpu names used by GDB, e.g.
2) Write a debugger script .gdbinit that contacts your target and
loads the symbol table or a program. It should do something like
target <connect options>
load <my program name>
<whatever else is needed to get the board running>
Of course this script is highly target and application dependent.
I let my application Makefile generate it automatically.
The script should also disable the run command, like this
Run is disabled for this target
Then start your debugger
mytarget-gdb -x .mygdbinit
and test that you can debug your target this way.
3) Configure an Eclipse Debugging session
Create a new Debugging Session and name it.
Change the following tabs:
Select your project
Select an application (does not matter because the application
is selected by the .gdbinit script, but Eclipse requires to
Select GDB Debugger or GDB Cygwin Debugger
GDB Debugger: Set path to mytarget-gdb
GDB Command File: Path to .mygdbinit
4) Start the session
Power on the target.
Click "Debug" or select your Configuration from the Bug Icon.
Eclipse now should start the selected gdb with the selected
script. The target should break in main() and you should be able to
If loading the application to the target takes more than 10 seconds,
you must change the following settings.
In dialog Window->Preferences->C/C++->Debug->GDB MI
Set 'Debugger timeout' to an appropriate value
I hope, this helps.
LOYTEC electronics GmbH
trauscher at loytec.com
Networks under control!
LOYTEC and NEC Electronics Join Forces in Building Automation!
More information about the users