[En-Nut-Discussion] How do I find out how much RAM and FLASHis free.

Cosmin Buhu lists at byteworks.ro
Tue Nov 2 17:15:16 CET 2004


    There is also the avr-size utility in WinAVR distribution. Try it on the
generated
elf file.

Regards,
Cosmin


----- Original Message -----
From: "Ole Reinhardt" <ole.reinhardt at kernelconcepts.de>
To: "Ethernut User Chat (English)" <en-nut-discussion at egnite.de>
Sent: Tuesday, November 02, 2004 5:43 PM
Subject: Re: [En-Nut-Discussion] How do I find out how much RAM and FLASHis
free.


Hello,

> I haven’t done anything special with all my strings and constant data to
put
> them in program space yet.  But before I do so I want to find out how much
> RAM is being taken up.

You can't do so that easy. You can take a look to the .bss and .data
segments to see the space occupied by global variables.

Next you can try to calculated how much stack space your code will use
in maximum, but this depends very much on your code and if you use
recursion.

If you use malloc or NutHeapAlloc you have to take care about how much
memory you use dynamicaly.

The easyest way to find out if there is some external ram left is to use
NetHeapAvail() to find out how much heap memory is still left.

The flash space needed you can simply find out by generating a
target.bin file and have a look to the filesize.

Hope this will help you,

Ole Reinhardt


--
kernel concepts    Tel: +49-271-771091-14
Dreisbachstr. 24   Fax: +49-271-771091-19
D-57250 Netphen    E+ : +49-177-7420433
--


_______________________________________________
En-Nut-Discussion mailing list
En-Nut-Discussion at egnite.de
http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list