[En-Nut-Discussion] Problem with Ethernut Startup
harald.kipp at egnite.de
Tue Jun 24 21:03:25 CEST 2003
You can check the .map file.
If globals and local statics are explicitly initialized,
they are in the data segment, otherwise they belong to bss.
static int bar = 0;
as this will put two bytes in the data segment and waste
a two byte copy in flash memory for initialization.
static int bar;
will put the variable in bss, which is automatically cleared
At 19:40 24.06.2003 +0200, you wrote:
> > The short answer is to never use large static structures. Allways use
> > malloc. Check the MAP file to make sure that the statics are only taking
> > a <3K of SRAM.
>Sounds a bit stupid, but how do I see the size of statics? Is it the bss
>En-Nut-Discussion mailing list
>En-Nut-Discussion at egnite.de
More information about the En-Nut-Discussion