eCos Home

RedBoot Home


About eCos

Supported Hardware

Downloading and Installation

Documentation

FAQ

Mailing lists

Problems

Licensing

Anonymous CVS

Contributions and Third Party Projects

eCos
(Answer) (Category) eCos FAQ : (Category) Miscellaneous :
How to determine the size of eCos applications
A common question asked is "how big is an eCos application", or "why is
'hello world' 2MB?"  Here's a recent discussion which should help.


On Tue, 2003-10-07 at 08:23, James Yates wrote:
> Can anyone tell me what they think should be the approximate footprint 
> size of a basic eCos kernel built on an SH or i386 platform. I am in 
> the process of porting to a new SH2 processor and target platform, but 
> when I build my eCos library libtarget.a comes out at 2924kB. This sounds 
> excessively large to me but I am new to eCos so have no idea of what it 
> should be.

You can't tell anything from the size of libtarget.a - it contains 
*everything* in the kernel, along with massive amounts of debug
information.  Also, the size of your resulting eCos application
will vary with a number of factors, not the least of which are
all of the possible configuration parameters which are under your
control.

The size of an actual kernel+application could be as small as
50KB (not much there, really) up to maybe 200KB if you include
network stacks and such.

There really is no one answer for your question - you'll just
have to see how it plays out.  Just don't forget to look at the
real sizes, not file sizes, as there will be a vast difference
between the two.  Here's an extreme example - a PowerPC based
system, including the VNC server:
  [gthomas@hermes download]$ ls -l vnc-test 
  -rwxr-xr-x    1 gthomas  wheel     5682765 Sep  1 19:33 vnc-test
  [gthomas@hermes download]$ powerpc-eabi-size vnc-test 
     text    data     bss     dec     hex filename
   346184       0  660376 1006560   f5be0 vnc-test
  [gthomas@hermes download]$ ls -l lib/libtarget.a 
  -rw-r--r--    1 gthomas  wheel    14179440 Sep  1 19:33 lib/libtarget.a

With this setup, my libtarget.a is over 14MB! but the resulting
program is ~350KB of code.
garyATmlbassocDOTcom
Previous: (Answer) Where can I get hold of printed documentation?
Next: (Answer) Where's the Memory Layout Tool?
This document is: http://ecos.sourceware.org/fom/ecos?file=91
[Search] [Appearance]
This is a Faq-O-Matic 2.717.

Send any queries about the contents of this FAQ to the ecos-discuss mailing list
Send any operational queries about this FAQ to the eCos maintainers