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]

User libraries


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?

Thanks,

Steven Clugston

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