[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: [avr-gcc-list] Potential bug with large array of uint16_t in Flashwi
Haase Bjoern (PT-BEU/EMT) *
AW: [avr-gcc-list] Potential bug with large array of uint16_t in Flashwith ATMega128 and avr-gcc 3.4.3
Wed, 4 Jan 2006 16:56:39 +0100
>It gives me the following error message:
>../tux.c:4: error: size of variable 'tuxlogo' is too large
>The problem disappears if the array index is lower then 16383. I would
>expect that the index could be as large as 32767, as the index of an
>array is defined as int, and an int on AVR architecture is 16 bit
>The flash is pretty empty and the array should fit comfortably into
>the lower 64kb of the flash.
Actually, you could probably not use *all* of the 64k. You have to
consider the reset vector, ram initialization data and global
constructor / destructor code that resides in the lower page, IIRC.
>Is this a bug and will it be corrected in future releases ?
Probably, I'll have a look when I find time. Actually, such kind of
check should be done, IMO, by the linker and not the compiler.
- AW: [avr-gcc-list] Potential bug with large array of uint16_t in Flashwith ATMega128 and avr-gcc 3.4.3,
Haase Bjoern (PT-BEU/EMT) * <=