This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Configtool building and code size
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- To: Robert Cragie <rcc at jennic dot com>
- Cc: ECOS <ecos-discuss at sources dot redhat dot com>
- Date: Mon, 4 Aug 2003 12:19:03 +0200
- Subject: Re: [ECOS] Configtool building and code size
- References: <NMEDLDELHPEFHOMFIJBHMEHLCNAA.rcc@jennic.com>
> The reason I built the configtool is to try to get the code size down for
> OpenRISC implementation.
The CLI based tool is just as good for such optimizations.
> My really simple program:
>
> <hello.c>
> int my_bss;
> int my_data = 2;
> const int my_rodata = 4;
>
> int main(int argc, char **argv)
> {
> int i = 1;
> int j = 2;
> return i + j;
> }
> </hello.c>
>
> built with:
>
> or32-elf-gcc -g -I../install/include hello.c -L../install/lib -o
> hello -Ttarget.ld -nostdlib
>
> ends up this big:
>
> text data bss dec hex filename
> 82440 2632 14832 99904 18640 hello
Well, for this application all you really need is the HAL. So rename
main to cyg_start, and do
ecosconfig new openrisc minimal
ecosconfig tree
make
etc.
You should really be asking yourself the question "What do i require
from eCos for my application". Once you know that, you can decide
which packages to include and which to leave out.
Andrew
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss