[ELDK] Using ELDK with Eclipse IDE

Michael Walton mike at farsouthnet.com
Wed Nov 28 16:34:01 CET 2007


Hi all

I've been using various ELDK versions with various Eclipse versions for
several years now. It integrates very easily, and provides the following
features that I find useful:

 - C/C++ indexing, cross-referencing, syntax highlighting, completion etc.
 - build, parse the error output and mark up the source code with the
error/warning messages
 - cross debug using gdbserver, with full source code integration

The only problem I've struggled with is the thread awareness during
debugging. It seems to be broken on certain Eclipse versions (e.g. Europa).

Basic steps I use to get this working are:

1. Get a current version of Eclipse with CDT (C/C++ Development Tools)
2. Run Eclipse from your normal ELDK shell environment - i.e. with
CROSS_COMPILE and PATH set up correctly
3. Create a C project in Eclipse, accepting the defaults, pointing to an
existing source tree
4. Edit the project properties as required:
  a) change the C/C++ Build->Builder settings (typically you would uncheck
"Generate Makefiles automatically" and enter the required Build directory)
  b) change the Tool settings if required, from native compilers to
cross-compilers (I use a hand-coded Makefile, so I don't have to set up the
compilers etc.)
  c) (optional) change the Includes (under Paths and Symbols) - this helps
the indexer work correctly
5. You should now be able build a project from the IDE via its Makefile
6. To debug
  a) deploy the binary on the target (I use NFS)
  b) run the binary under gdbserver on the target
  c) create a new C/C++ Local Application debug configuration in Eclipse
  d) in the Debugger tab select gdbserver, enter the required gdb tool (e.g.
ppc_85xx-gdb)
  e) in the Connection tab (under the Debugger tab), set up TCP or serial
remote gdbserver connection to the target
  f) launch the new Debug configuration - it should connect to the waiting
gdbserver and take over control of the target

Note: these are just the basics, there are many possible pitfalls along the
way - but in my experience it is a worthwhile exercise for those of you out
there who, like me, are not vi/emacs gurus.

Regards

Mike Walton
Far South Networks
www.farsouthnet.com




More information about the eldk mailing list