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
(Category) (Category) eCos FAQ :
Miscellaneous
Questions that don't fit anywhere else!
Subcategories:

Answers in this category:
(Answer) Where can I get hold of printed documentation?
(Answer) How to determine the size of eCos applications
(Answer) Where's the Memory Layout Tool?
(Answer) My simple program should sleep, but it just hangs

(Answer) (Category) eCos FAQ : (Category) Miscellaneous :
Where can I get hold of printed documentation?

Suitable PDF files are available online. The HTML versions of the documentation are included in the main release files, and are also available separately. eCos documentation is not available in hard copy at present.


(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
(Answer) (Category) eCos FAQ : (Category) Miscellaneous :
Where's the Memory Layout Tool?
The original ConfigTool (which ran only on Windows) had a feature called the
Memory Layout Tool which helped describe the memory regions, etc, for a given
platform.  With the change to the new ConfigTool (now written using WxWindows
and running on Linux as well as Windows), support for the MLT has not yet been
implemented.

Sorry, but there is no schedule for when this will be added, so in the meantime
there are two arrproaches for creating & maintaining MLT files:
  * Find a copy of the old ConfigTool [hard, cumbersome]
  * Hand edit your config files.  While this is tedious, it's not difficult.
    Start by copying known working files and edit them, trying to keep things
    synchronized (i.e. the .h and .ldi files reflect what's in the .mlt file)

Volunteers to restore this functionality will be gladly received!
garyATmlbassocDOTcom
(Answer) (Category) eCos FAQ : (Category) Miscellaneous :
My simple program should sleep, but it just hangs
This simple little program may not work.

  #include <stdio.h>
  int main(void) {
    printf("Hello, world!  Now sleeping for 5 seconds.\n");
    cyg_thread_delay(5*100);
    printf("Back from the dead :-)\n");
  }

Why?  Because "cyg_thread_delay()" takes a cyg_tick_count_t argument, which
is typically a "long long" value.  The compiler doesn't know this and without
any sort of prototypes and/or casts, it will send the wrong sort of value
to cyg_thread_delay().  In most cases, this will cause an arbitrarily long
delay!

Solution?  Simply add this line:
  #include <cyg/kernel/kapi.h>
This will define the native eCos kernel API, as well as prototypes for
all of the kernel functions.  et voila!
Previous: (Category) Contributing back to the eCos community
Next: (Category) Questions not covered you would like answered
This document is: http://ecos.sourceware.org/fom/ecos?file=73
[Search] [Appearance] [Show Top Category Only]
This is a Faq-O-Matic 2.719.

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