[ECOS] User libraries

Gary Thomas gary@mlbassoc.com
Wed Apr 16 11:19:00 GMT 2008


Steven Clugston wrote:
> Hi
> 
> I would like to be able to create and link in some of my own generic
> library code into an eCos app.
> I am slightly phased by this due to the custom linker script that is
> used by eCos. 
> 
> Basically I want create static '.a' type libraries that may make use of
> the C library and POSIX compat packages.
> The only specific instrinstructions I've been able to find are from the
> ref manual.
> 
> To quote the eCos reference manual:
> 
> " If you put some of your source in libraries, you will have to
> explicitly
> include those libraries in the linking instruction.
> 
> You also need to link to the GNU C Compiler runtime support library
> (libgcc.a).
> You should not link to the standard C++ library. 
> This can be achieved with the -nostdlib option.
> You should only link to libtarget.a and libgcc.a using the linker script
> target.ld
> provided with eCos. The command line for linking should look like
> 
> gcc [options] [object files] -Ttarget.ld -nostdlib "
> 
> Is there anything else I need to be mindful of?
> 
> Does anybody have an example Makefile or can suggest how I can modify
> the ecos examples makefile to do this?

Try looking at http://www.mlbassoc.com/examples/build_httpd.html

-- 
------------------------------------------------------------
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