[ECOS] eCos package trimming.....

Andrew Lunn andrew.lunn@ascom.ch
Thu Jan 31 10:25:00 GMT 2002


On Thu, Jan 31, 2002 at 10:18:19AM -0800, Nilesh Tarale wrote:
> Hi,
> I want to trim the ecos packages so that the
> libtarget.a file size should reduced.
> i had remmoved the math library through the ecosadmin
> tool by following 
> command...
>      thcsh ecosadmin.tcl remove libm
> 
> We are writing our own networking package with our own
> requirment whose size may be around 1Mb..
> 
> Now i wanted to trim the LIBC package. I had deleted
> some of the source files from LIBC and removed the
> entries from the .cdl file for deleted source files..
> The original size of the libtarget.a file of
> eCos-1.3.1 without networking package was 2.9Mb..
> Which i had reduced to 1.9Mb.
> 
> But is there any standerd tool to trim (reduce the
> size of package) the package?
> If there is any.. please guide..
> 
> Thanx & regards,
> Nilesh Tarale

The size of the executable and the size of the library only have a
loose connection. The linker only pulls in bits of the library it
needs. If you didn't need any of the libm, it would not be linked into
your application, except maybe a very small amount of initialization
code. Removing libm only had the effect of removing the initialization
code, if there was any, in your application.

So, first off use the size command, eg arm-elf-size on the
application. This will give you the real size that has to go into
flash.

Next get the linker to produce a map. From this you can see what
functions are actually in your application. You can then asses each
function and decide do i really need this? Why has it been
included? How do i get rid of it?

          Andrew




More information about the Ecos-discuss mailing list