AW: [En-Nut-Discussion] noinit
Oliver Schulz
Oliver.Schulz at bong.de
Tue Jan 13 08:49:56 CET 2004
Hi Alexander,
in the current official release version 3.3.2 of Nut/OS on www.ethernut.de the .noinit section is not supportet by Nut/OS initialization functions. Thus if you use the .noinit section, it is simply overwritten by some heap memory.
Please use the current development from CVS, where this issue is already fixed.
BTW, this works only with avr-gcc compiler.
Regards,
Oliver.
> -----Ursprungliche Nachricht-----
> Von: Alexander Baranov [mailto:Baranov at intech21.com]
> Gesendet: Montag, 12. Januar 2004 21:13
> An: en-nut-discussion at egnite.de
> Betreff: [En-Nut-Discussion] noinit
>
>
> Hi, all.
> My question is a little dummy and offtopic, but I rely
> upon your good
> humor.
> I need to count number of resets. So, I decided to create a noinit
> variable
> like that:
>
> unsigned char reboot_number __attribute__ ((section (".noinit")));
>
> In the beginning of each main{} I increment it and fprintf to uart0. I
> expected that it would show incremented value after each
> reset, but it
> is
> always the same - 157. Please, point me my mistake.
>
> Thanks,
> Alexander Baranov
> Intech21, Inc.
> 50 Glen Street,
> Glen Cove, NY, 11542
> www.intech21.com
>
> _______________________________________________
> 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