avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] file length problem with atmega128


From: Josh Thompson
Subject: Re: [avr-gcc-list] file length problem with atmega128
Date: Sat, 8 Feb 2003 00:10:33 -0500
User-agent: Mutt/1.3.28i

> > > Are you sure it's the size of the binary?  I'd rather suspect
> > 
> > How would I tell this, and what should I be looking for?
> 
> Try using 'avr-size' on your ELF output file.  For example, on one of
> my programs it produces:
> 
>       % avr-size m128diag.elf
>          text    data     bss     dec     hex filename
>         16884     218     957   18059    468b m128diag.elf
> 
> This program uses 16884 bytes of flash, and 218+957=1175 bytes of RAM.
> 
> This is a good starting point, but does not take into account any RAM
> usage due to function calls (stack variables), or dynamic memory due
> to using malloc(), etc.  Thus, while informative, it should be treated
> as a lower bound for RAM memory usage and give you a rough idea of
> your actual RAM requirements at the time your program starts into it's
> 'main()' entry point.

I think this is my problem.  I misread the docs thinking it said the
atmega128 has 64K of RAM onboard rather than being able to address that
much but only having 4096 onboard (am I right on this?).  My data region
was in the upper 3000s when my uip file was getting over about 12KB.

I have a fair amount (more that 4096 bytes) of data I need to be able to
reference.  However, it is const data.  Is there any way I can get it in
the text region of the chip rather than the data region and then use a
pointer to reference it (or something like that)?


Thanks,
Josh


P.S.  If I'm asking too many simple questions, please direct me to some
docs where I can educate myself.  :)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]