This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Making an Ecos Kernel suitable for Hello World (minimalist) situations.
- From: "Warren Postma" <warren dot postma at adaptivenetworks dot on dot ca>
- To: "Ecos Mailing List" <ecos-discuss at sources dot redhat dot com>
- Date: Tue, 5 Nov 2002 17:20:55 -0500
- Subject: [ECOS] Making an Ecos Kernel suitable for Hello World (minimalist) situations.
I built a default Nano target environment using the graphical build tools.
When I build the usual hello world C program, I get a 3.2 megabyte
monstrosity.
arm-elf-gcc \
-T/nano_install/lib/target.ld \
-Wl,--gc-sections -Wl,-static \
-g -O2 -nostdlib \
-L/nano_install/lib \
-I/nano_nstall/include \
hello.c -o hello.exe
Most of that is obviously ECOS. Out of that, how do I find out how much
space the EXE is actuall taking on the target, and could I estimate how much
is HAL, TCPIP, PCI libs, and so on?
So I did a minimal build, and relinked with "nano_mini_install/lib", and I
got a very respectable 108118 byte executable. Now, how would I find out
how much of that EXE is actually flat space?
Unfortunately, minimal is not enough for a working printf(), which I
consider rather essential. Attempts to debug the 110K hello.c crash, so I
assume that the printf() call is not working, and yet no link errors were
made. However the nano_mini.ecc file doesn't appear to include the mini c
libraries.
What do I have to type to add the C libraries into minimal? And is minimal
really minimal or can I remove something else?
Also, does anyone know how to build something Even More Minimal than the
Minimal Template? All I need is a working Nano Target (I assume the HAL is
100% necessary), and printf() support.
Regards,
Warren
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss