public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] eCos kernel image size
@ 2003-08-28  2:48 Satish Kumar
  2003-08-28  3:35 ` Gary Thomas
  0 siblings, 1 reply; 3+ messages in thread
From: Satish Kumar @ 2003-08-28  2:48 UTC (permalink / raw)
  To: ecos-discuss

Hi,
    i have this basic doubt i guess..i m interested in knowing 
the eCos basic kernel image size..i only see a ecos library build
and when i try compiling the hello.c program with the above ecos 
library using arm-elf-gcc..my hello.bin is something around 780 kb, 
which is just too large..now this library contains default package.

 i m just interested in knowing only the eCos kernel image size 
with out the C library..!! how to know this kernel size..?

thanks
satish

-- 
Satish Kumar <satish@bvt.sc.sanyo.co.jp>


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] eCos kernel image size
  2003-08-28  2:48 [ECOS] eCos kernel image size Satish Kumar
@ 2003-08-28  3:35 ` Gary Thomas
  2003-09-02  3:02   ` Jonathan Larmour
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Thomas @ 2003-08-28  3:35 UTC (permalink / raw)
  To: Satish Kumar; +Cc: eCos Discussion

On Wed, 2003-08-27 at 20:48, Satish Kumar wrote:
> Hi,
>     i have this basic doubt i guess..i m interested in knowing 
> the eCos basic kernel image size..i only see a ecos library build
> and when i try compiling the hello.c program with the above ecos 
> library using arm-elf-gcc..my hello.bin is something around 780 kb, 
> which is just too large..now this library contains default package.
> 
>  i m just interested in knowing only the eCos kernel image size 
> with out the C library..!! how to know this kernel size..?

You're not looking at the size of the program, just the size of
the ELF image!  The ELF image contains *LOTS* of debug information
which makes it appear quite large.  In reality, the kernel itself
is quite small.  What you need to do is use the "size" utility to
determine the actual memory requirements.

For example, a "hello" application built with the default template:
[gthomas@hermes t]$ ls -l hello
-rwxr-xr-x    1 gthomas  wheel     1643945 Aug 27 21:33 hello
[gthomas@hermes t]$ powerpc-eabi-size hello
   text    data     bss     dec     hex filename
  52940       0   16300   69240   10e78 hello

From this, you can see that the ELF file is 1.6MB, but the actual
executable image is only 52KB of TEXT + 16KB of DATA.

If you include things like the TCP/IP stack, then things are a bit
larger, but still quite reasonable:
[gthomas@hermes tests]$ ls -l vnc-test 
-rwxr-xr-x    1 gthomas  wheel     5678228 Aug 27 12:19 vnc-test
[gthomas@hermes tests]$ powerpc-eabi-size vnc-test 
   text    data     bss     dec     hex filename
 345912       0  993892 1339804  14719c vnc-test

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] eCos kernel image size
  2003-08-28  3:35 ` Gary Thomas
@ 2003-09-02  3:02   ` Jonathan Larmour
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Larmour @ 2003-09-02  3:02 UTC (permalink / raw)
  To: Satish Kumar; +Cc: eCos Discussion

Gary Thomas wrote:
> On Wed, 2003-08-27 at 20:48, Satish Kumar wrote:
> 
>>Hi,
>>    i have this basic doubt i guess..i m interested in knowing 
>>the eCos basic kernel image size..i only see a ecos library build
>>and when i try compiling the hello.c program with the above ecos 
>>library using arm-elf-gcc..my hello.bin is something around 780 kb, 
>>which is just too large..now this library contains default package.
>>
>> i m just interested in knowing only the eCos kernel image size 
>>with out the C library..!! how to know this kernel size..?
> 
> 
> You're not looking at the size of the program, just the size of
> the ELF image!  The ELF image contains *LOTS* of debug information
> which makes it appear quite large.  In reality, the kernel itself
> is quite small.  What you need to do is use the "size" utility to
> determine the actual memory requirements.
> 
> For example, a "hello" application built with the default template:
> [gthomas@hermes t]$ ls -l hello
> -rwxr-xr-x    1 gthomas  wheel     1643945 Aug 27 21:33 hello
> [gthomas@hermes t]$ powerpc-eabi-size hello
>    text    data     bss     dec     hex filename
>   52940       0   16300   69240   10e78 hello
> 
>From this, you can see that the ELF file is 1.6MB, but the actual
> executable image is only 52KB of TEXT + 16KB of DATA.

And just to be clear: that's just the default configuration, which still 
has plenty of bells and whistles that you wouldn't need (certainly not for 
hello world :-)). And judicious use of the eCos Configuration Tool (or 
editting of ecos.ecc) will make that footprint smaller. *Much* smaller.

Jifl
-- 
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-09-02  3:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-28  2:48 [ECOS] eCos kernel image size Satish Kumar
2003-08-28  3:35 ` Gary Thomas
2003-09-02  3:02   ` Jonathan Larmour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).