[ECOS] [redboot] Compiling & Linking Apps.
Gary Thomas
gary@mlbassoc.com
Mon Mar 20 12:38:00 GMT 2006
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
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
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