[En-Nut-Discussion] noinit

Alexander Baranov Baranov at intech21.com
Mon Jan 12 21:13:05 CET 2004


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




More information about the En-Nut-Discussion mailing list