This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: eb40a target submitted
On Mon, 2002-07-22 at 12:13, Tim Drury wrote:
>
> > >
> > > 2. When building the tests, the resulting elf image is not runnable
> > > by redboot. It has to be converted to srecs first. Here is how
> > > I built the tests:
> >
> > What's the problem? What errors are you getting?
> >
> > If arm-elf-objcopy can read the file, GDB should be able to as well,
> > since they use the same library for reading ELF images.
>
> It's not gdb reading it, it's redboot. Redboot (ROMRAM) appears
> to load the elf image, but 'g' does nothing. Looking at my (kick ass!)
> logic analyzer, it's caught in a tight loop of running off in the sticks
> then jumping back into the exception hander code in low memory.
> I can look into this deeper if necessary.
>
This sounds like a problem with the RedBoot ELF loader. It works fine
for me, so some investigation would be nice/warranted.
> > > A few things I love to see here: a) what is the proper way to
> > > make the process create srecs instead of elf images?
> >
> > Why would you want to do this? It seems to me that effort should be
> > spent figuring out what problems you are having with GDB.
>
> Well for one, the srecs are much smaller than the elf files so they load
> much faster at 38kbaud. But mainly because of the problem I'm having
> with elf images.
>
Wrong - it may look that way, but most of the ELF image is symbolic
debug information and is never loaded by RedBoot. The binary (ELF) data
will actually be less than 1/2 the amount necessary for the ASCII hex
(SREC) format.
> >
> > > b) can we have each test end by returning to redboot so the
> > > target board doesn't have to be reset after each run?
> >
> > You could easily define it to work this way. All tests go to
> > 'cyg_test_exit()', which is currently defined as a hard loop.
>
> I'd like to do this. What I'm afraid of doing is making a change to the
> entire ecos tree and screwing someone up. Can I do this in such a
> way that only the eb40a (or at91) targets do this? Or would anyone
> care whether I make the change to the entire tree?
>
All you have to do is define the macro CYGHWR_TEST_PROGRAM_EXIT, somewhere
in your HAL .h files. Look at .../infra/current/src/tcdiag.cxx
> > > c) can we automate this in Linux?
>
> The running of _all_ the test cases. I've been really spoiled with java
> and junit. junit defines a interface that all your test cases must implement,
> then running junit's test runner program executes all your test cases
> for you. I'm looking at some c-equivalent programs right now, but that
> won't help the test cases that have already been written.
These tests were all written for just such a framework. Too bad it's
not in the public CVS.
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss