This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Default CME555 too big


RE: Too big
Interesting.  I ran powerpc-eabi-size on my hello.elf program that was about
1 MB, and it printed out the following:

% powerpc-eabi-size hello
	text		data	bss	dec	hex	filename
	52040		0	16420	68460	10b6c	hello

Which does seem to indicate a much smaller executable.  I compiled eCos
without the "-g" flag, and a huge portion of that 1 MB went away.  So I
guess I shouldn't be having trouble fiting stuff into external RAM.

RE: gdb
Ack, sorry, yes, I run the load command as well:

(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x0000bbe0 in ?? ()
(gdb) load
Loading section .text, size 0xa29c lma 0x406000
Loading section .rodata, size 0x1568 lma 0x4102a0
Loading section .data, size 0x990 lma 0x411808
Start address 0x406000, load size 49556
Transfer rate: 30496 bits/sec, 505 bytes/write.
(gdb) where
#0  0x0000bbe0 in ?? ()
(gdb) jump _start
Continuing at 0x406018.
Interrupted while waiting for the program.
Give up (and stop debugging it)? (y or n) y
(gdb) where
No stack.


I tried both "jump <insert likely sounding function>" and "continue", but I
never get any output after that point (asides from the one random time it
stopped at a breakpoint).

Any thoughts?

Thanks for the "powerpc-eabi-size" tip; that explains some things.

-Eric



-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: Tuesday, June 08, 2004 4:19 PM
To: Eric Castle
Cc: Bob Koninckx; Ecos-Discuss
Subject: Re: [ECOS] Default CME555 too big


> However, when we built the eCos library (using the CME555 template and the
> default package) and made the example programs, they came in around 1 MB,
> much too big to run from external RAM.  Is there a different package we
> should be using here to build the library?

I presume the 1MB is the size of the elf file and not the binary. Run

powerpc-eabi-size(1) on the elf to find out the size of the binary.

> But downloading that to RAM via gdb hasn't produced anything.  Generally
we
> do the following:
>
> % powerpc-eabi-gdb hello
>
> (gdb) set remotebaud 38400
> (gdb) target remote /dev/ttyS0
> (gdb) continue

Err, what about the load command?

        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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]