This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Error building from CVS sources


On Tue, Oct 18, 2005 at 06:34:38PM +0200, Andrew Lunn wrote:
> The configtool requires a lot of black magic and the right phase of
> the moon to compile. Combining that with a 64bit machine is probably
> just too much for you as an eCos beginner. I suggest you keep with
> ecosconfig. ecosconfig is what most of the power users use anyway.

Fair enough.  I do have a 32-bit chroot environment, and I tried
running the pre-compiled ecos2.0 binary version, but it wants
libpng.so.2 and I have only libpng.so.3.  I could probably figure out
how to get the older version installed, but is there a more up-to-date
precompiled version?  If not, I'll just keep going with ecosconfig.
That's probably where I'll end up in any case.

> Also i suspect you have something wrong with your configuration of
> eCos. It is not normaly to compile the cygmon package.
> 
> How exactly did you configure eCos for building redboot? 
> 
> There is instructions on how to do this at:
> 
> http://ecos.sourceware.org/docs-latest/redboot/rebuilding-redboot.html#AEN2606

Ah, looking at the page, I see that the part I missed was the import
of the redboot_RAM.ecm file.  Adding that (using pid as the target,
though that is not my ultimate target), the old errors are gone but I
now get errors in main.c:

 In function 'cyg_start':
/home/rnortman/src/tinytim/bl2/redboot/ecos/packages/redboot/current/src/main.c:397: error: invalid lvalue in assignment
/home/rnortman/src/tinytim/bl2/redboot/ecos/packages/redboot/current/src/main.c: In function 'do_go':
/home/rnortman/src/tinytim/bl2/redboot/ecos/packages/redboot/current/src/main.c:597: error: invalid lvalue in assignment

These are both invocations of the HAL_THREAD_INIT_CONTEXT macro, and
both referencing the symbols workspace_end as the first argument.
Looking at the definition for this macro in
packages/hal/arm/arch/current/include/hal_arch.h, I think it's most
likely that the assigment to workspace_end is the problem.  In the
macro invocation, workspace_end is being cast to CYG_ADDRWORD.  This
cast is expanded in the macro definition, and apparently the compiler
doesn't like seeing a cast on the left side of an assignment.  I
removed the cast, and this turned the error into a warning (assignment
makes pointer from integer without a cast).  The build then proceeds
normally.

Of course, looking at the results in install/bin, I see that
redboot.bin is approximately 72k.  I'm not sure that my application
can spare that much for the bootloader -- I've got 256kB of Flash and
64kB of RAM, total.  Perhaps I'm barking up the wrong tree here, or
perhaps I just need to dig in and trim the thing down to what I need.
How small can RedBoot get?  My target is an arm7tdmi, and I expect to
use Thumb mode to cut down on code size.  (Specifically, I'm using an
Atmel AT91SAM7X256 on a custom-designed board.  I expect to have to
write my own HAL, of course, but I just used the existing pid target
to get this far.)

Thanks for the help,

Randall

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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