Eclipse IDE for RTEMS?
Thomas Rauscher
trauscher at loytec.com
Fri Sep 26 15:55:38 UTC 2003
On Tue, 16 Sep 2003, Rosimildo da Silva wrote:
> Thomas Rauscher wrote:
>
> >On Mon, 15 Sep 2003, Michael Kelly wrote:
> >
> >
> >
> >>Hi all,
> >>
> >>The Eclipse IDE is getting a lot of press and looks pretty nice.
> >>There were several articles in todays EE Times about it. I was
> >>wondering if anyone has set Eclipse up to build and debug RTEMS.
> >>
> >>Michael
> >>
> >>
> >>
> >
> >We are quite happy with Eclipse.
> >
> >You can use Eclipse with minor modifications for cross-development.
> >The CDT (C/C++ Development Tools) project provides anything needed to edit
> >C/C++ files, build projects and start an external debugger (using the gdb
> >machine interface).
> >
> >You need to provide:
> >- A Makefile for your project (should be there anyway)
> >- A gdb-script invoked when a debugging session starts.
> >
> >Best regards,
> >Thomas
> >
> >--
> >Dipl.-Ing. Thomas Rauscher Tel.: ++43 1 402 08 05 15
> > Fax: ++43 1 402 08 05 99
> >LOYTEC electronics GmbH E-mail: trauscher at loytec.com
> >Stolzenthalergasse 24/3, A-1080 Wien Web: http://www.loytec.com
> >
> >
> >
> >
> A little "HOW-TO" document this, could be very helpful, since Eclipse is
> a nice IDE, as long as you have a very fast PC. But, if you are using
> GCC, you probably have it.
>
> Rosimildo.
>
Please try the following (applies to Eclipse 2.1.1).
1) IMPORTANT: 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
cpu="native"
into
cpu="native,mycpu1,mycpu2"
where mycpu1, mycpu2, ... are the cpu names used by GDB, e.g.
"arm,i386,..."
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.
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:
Main Tab
Select your project
Select an application (does not matter because the application
is selected by the .gdbinit script, but Eclipse requires to
set it)
Debugger
Select GDB Debugger or GDB Cygwin Debugger
GDB Debugger: Set path to mytarget-gdb
GDB Command File: Path to .mygdbinit
Click Apply
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 debugger
script. The target should break in main() and you should be able to
debug now.
Let me know, if this works for you.
Best regards,
Thomas Rauscher
--
Dipl.-Ing. Thomas Rauscher Tel.: ++43 1 402 08 05 15
Fax: ++43 1 402 08 05 99
LOYTEC electronics GmbH E-mail: trauscher at loytec.com
Stolzenthalergasse 24/3, A-1080 Wien Web: http://www.loytec.com
More information about the users
mailing list