[ECOS] [redboot] Compiling & Linking Apps.

David Fernandez dfernandez@cct.co.uk
Mon Mar 20 13:00:00 GMT 2006

On Mon, 2006-03-20 at 05:38 -0700, Gary Thomas wrote:
> On Mon, 2006-03-20 at 12:02 +0000, David Fernandez wrote:
> > 	Hi there,
> > 
> > 	I'm trying to compile applications to run in the redboot environment;
> > but I couldn't find any good way in the eCos distribution.
> > 
> > 	Following the eCos documentation in chapter 13 it seems that the
> > Makefile there tries to link the entire redboot again with for example,
> > hello.c (and there is a problem with -finit-priority that the redboot
> > makefiles leave in ECOS_GLOBAL_CFLAGS in
> > <INSTALL_DIR>/include/pkgconf/ecos.mak).
> > 
> > 	Should I write my own linker script & makefile, or is there anything in
> > eCos sources to achieve that?
> > 
> > 	I've been looking to be able to use the C library in the applications
> > too... but, as redboot does not provide a dynamic linker I was wondering
> > if could it be relatively straightforward to modify language/c/... to
> > get virtual vectors for all or some of the libc functions and modify the
> > exec command to relocate elf objects.
> You're looking at this the wrong way - RedBoot provides a bootstrap
> environment, suitable for downloading (and otherwise managing) *user*
> applications.  It is a special eCos program, using it's own template,
> etc.
> User applications on the other hand, are built separately.  This
> often includes the basic C libraries, etc, based on the template
> chosen.  Once this application is built, it can be downloaded and
> run _using_ RedBoot.
> Look at some simple examples:
>   http://www.mlbassoc.com/examples

Ok, I'll ask it this other way: Does eCos sources include just a C
library with stdio working through the redboot HAL, and with heap
support?, How do I get it built?, Can I link an application easily with
that library into an elf file that I can load and execute from redboot?

My intention is to modify redboot to get something more enhanced but
without having multithreaded kernel.

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

More information about the Ecos-discuss mailing list