[En-Nut-Discussion] How to calculate Memory size
Ovidiu
ovidiu256 at gmail.com
Tue May 8 14:43:57 CEST 2007
On 4/26/07, MUHAMMAD AZEEM AZAM <muhammadazeemazam786 at yahoo.com> wrote:
>
> HI
> I know about AVR-Size but how to use it. Do i have to use it an MAKE
> File.
> I am working in AVR Studio.
> Thanks
> Bye
Yup, you need to modify your makefile (or better take it from another
project)
---------------------------------------------------------
SIZE = avr-size
#change the all: in your makefile as you see fit (add sizebefore and
sizeafter to your existing all:)
all: begin gccversion sizebefore build sizeafter finished end
build: elf hex eep lss sym
elf: $(TARGET).elf
hex: $(TARGET).hex
eep: $(TARGET).eep
lss: $(TARGET).lss
sym: $(TARGET).sym
HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf
MSG_SIZE_BEFORE = Size before:
MSG_SIZE_AFTER = Size after:
sizebefore:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE);
$(ELFSIZE); echo; fi
sizeafter:
@if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE);
echo; fi
-----------------------------------------------------------
I hope is enough info...
Ole Reinhardt <ole.reinhardt at kernelconcepts.de> wrote:
> Hi,
>
> > I have to claculate the "program and data memory" of microcontroller
> while running my TCP and UDP Server on CHARON-II board.
> > AVR Studio is calculation it for the simple LED blinking Program but
> i am unable to calculate for my TCP/UDP Servers.
> > Do i have to make changes in MAKE File.
>
> The avr-size tool should do the job. You'll get information about the
> code and data / bss segment size. For shure this tool can not calculate
> dynamic memory usage. But you can easily use NutHeapAvailable to see how
> much ram is available to any point.
>
> Best regards,
>
> Ole Reinhardt
>
> --
> kernel concepts GbR Tel: +49-271-771091-14
> Inh. Faerber & Kirchner Fax: +49-271-771091-19
> Sieghütter Hauptweg 48 Mobil: +49-177-7420433
> D-57072 Siegen UstID: DE 205 648 898
>
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>
> ---------------------------------
> Ahhh...imagining that irresistible "new car" smell?
> Check outnew cars at Yahoo! Autos.
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
More information about the En-Nut-Discussion
mailing list