From: "Socrates Socrates" <socrates.socrates@gmail.com>
To: "Socrates Socrates" <socrates.socrates@gmail.com>,
ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] Huge memory footprint for a simple "hello world"
Date: Tue, 06 Jun 2006 13:58:00 -0000 [thread overview]
Message-ID: <c3d1d81f0606060657j33087f78sa353f03d5b189076@mail.gmail.com> (raw)
In-Reply-To: <20060606133735.GH15066@lunn.ch>
Thanks Andrew,
Certainly I am new to embedded systems indeed. I now run:
/arm-elf-ld -nostartfiles -nodefaultlibs -nostdlib -s -static
-L/opt/ecos/gnutools/arm-elf/arm-elf/lib
-L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
-Ttarget.ld
So the size is now down to (~91k):
-rwxr-xr-x 1 socrates socrates 91364 Jun 6 14:07 test
which I think is still big in my opinion.
-b option: The upload always fails until I use the -r option which
forces me to use the -b option.
How do I go about getting a succesful upload without using the -r and
hence -b option?
Thanks once again.
Regards;
Soc
On 6/6/06, Andrew Lunn <andrew@lunn.ch> wrote:
> On Tue, Jun 06, 2006 at 02:03:05PM +0200, Socrates Socrates wrote:
> > Hi All
> >
> > AIM:
> > I am using the EB40 board and I am trying to test a simple "hellow
> > world" application.
> >
> > Problem:
> > The memory footprint of the application is too big to fit into the
> > available RAM. The failure happens during uploading of the
> > application.
> >
> > Here's more information of my steps:
> >
> > 1. I used "ecoconfig EB40" to setup and build redboot for the EB40 board.
> > 2. I used "arm-elf-gdb redboot.elf" , tar rdi /dev/ttyS0, set
> > $cpsr=0xd3, load, cont, Crtl Z, minicom
> > 3. RedBoot> load -b -m xmodem -b 0x02033428 # My notes:
> > 0x02033428 is the lower range of the available RAM as reported by
> > 'version' command on RedBoot
> > 4. I comppile and link my test app
> > /opt/ecos/gnutools/arm-elf/bin/arm-elf-gcc -c -o test.o -Wall
> > -I/home/socrates/work/atmel/020606-ARM/install/include test.c
> > /opt/ecos/gnutools/arm-elf/bin/arm-elf-ld -nostartfiles -nostdlibs
> > -L/opt/ecos/gnutools/arm-elf/arm-elf/lib
> > -L/opt/ecos/gnutools/arm-elf/lib/gcc-lib/arm-elf/3.2.1/ -o test test.o
> > -T/home/socrates/work/atmel/020606-ARM/install/lib/target.ld
> >
> > socrates@would:~/work/atmel$ ls -l test*
> > -rwxr-xr-x 1 socrates socrates 322442 Jun 6 12:06 test
> > -rw-r--r-- 1 socrates socrates 138 Jun 6 11:35 test.c
> > -rw-r--r-- 1 socrates socrates 880 Jun 6 12:06 test.o
> >
> > Here's is my test.c file:
> > *************************************************************************
> > #include <cyg/infra/diag.h>
> >
> > char *RedBoot_version = "aslkjdahlsdfjk";
> >
> > int main(void)
> > {
> > diag_printf("HELLO WORLD\n");
> > return 0;
> > }
> > **************************************************************************
> >
> >
> > I'd really appreciate your help.
> >
> > Oh, I am very very new to EB40 or ecos for that matter.
>
> And also probably very new to embedded systems and how compilers work.
> This is a FAQ. Read the documentation about arm-elf-size and what an
> ELF file is. The test executable contains all the debugging
> information and lots of other things which are not used on the target.
> gdb knows this and will download just what is needed.
>
> Also, don't use -b 0x... eCos is not position independent. The image
> has to go where the image expects to go.
>
> Andrew
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
next prev parent reply other threads:[~2006-06-06 13:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-06 12:03 Socrates Socrates
2006-06-06 13:38 ` Andrew Lunn
2006-06-06 13:58 ` Socrates Socrates [this message]
2006-06-06 14:05 ` Andrew Lunn
2006-06-06 14:19 ` Socrates Socrates
2006-06-06 14:54 ` Andrew Lunn
2006-06-07 8:50 ` Socrates Socrates
2006-06-07 8:58 ` Andrew Lunn
2006-06-07 9:40 ` Socrates Socrates
2006-06-07 9:53 ` Andrew Lunn
2006-06-07 10:28 ` Socrates Socrates
2006-06-07 11:11 ` Andrew Lunn
2006-06-07 11:48 ` Socrates Socrates
2006-06-07 11:54 ` Andrew Lunn
2006-06-08 12:28 ` Socrates Socrates
2006-06-08 12:35 ` Andrew Lunn
2006-06-08 12:48 ` Socrates Socrates
2006-06-08 12:55 ` AW: " Ram Sudhir Tadavarthi
2006-06-07 11:57 ` Gary Thomas
2006-06-07 12:09 ` [ECOS] Python under eCos Evgeny Belyanco
2006-06-07 12:15 ` Gary Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c3d1d81f0606060657j33087f78sa353f03d5b189076@mail.gmail.com \
--to=socrates.socrates@gmail.com \
--cc=ecos-discuss@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).