This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Testsuite questions


> I finished porting gcc so that I can run C
> programs on our embedded system.  Through

Excellent.   Do you plan to contribute the port back?
	http://gcc.gnu.org/contributewhy.html

> the process of writing and running programs we have been discovering
> the inevitable bugs.  I was hoping to find some C code that I could
> use to test the port and get a higher level of assurance that I have
> properly configured the gcc tools.  I figured that the testsuite would
> be the right place to look.

Yes, that's an excellent start.

The tricky part of doing this on embedded systems is that you have to
either wire startup code and support libraries for an eval board or
something else using your processor that supports something resembling a
boot monitor or more robust OS or you have to write an opcode simulator
for it.   See the 'sim' module in GDB for details on the latter.   It's
not for the faint of heart.

The former tends to be pretty ill documented.  I had a reason to learn
the fringe of it a few years ago and I found the best way was to start
with a target that's known to work such as the (MIPS eval boards) and
beat on them until a 'make check' works.  You'll have to visit the
bowels of newlib, libgloss, and dejagnu to extract the needed clues.
Once you've made it work on something that vaguely resembles your
hardware, _then_ go about telling it how to talk to your boot monitor,
how to reset it, how to run code, and so on.

The testsuite is hugely valuable and I imagine it's even more so for a
new processor.  Unfortunately, a recepie for this is hard to find and
it's very easy to "ping-pong" between groups on this subject.  "That's
a DejaGNU question."  "That's a libgloss question."  "That's target
defined." "I don't know where to ask, but it's not a GCC question." and
so on...

If you can describe the environment you're hoping to use to run the
binaries (eval board over serial connection, simulators, etc.), perhaps
we can better help.

RJL

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]