[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Potential bug with large array of uint16_t in Flashwi

From: Markus Rudolf
Subject: Re: [avr-gcc-list] Potential bug with large array of uint16_t in Flashwith ATMega128 and avr-gcc 3.4.3
Date: Wed, 4 Jan 2006 18:06:45 +0100

>>The flash is pretty empty and the array should fit comfortably into
>>the lower 64kb of the flash.
HBPBE> Actually, you could probably not use *all* of the 64k. You have to
HBPBE> consider the reset vector, ram initialization data and global
HBPBE> constructor / destructor code that resides in the lower page, IIRC.

I'm shure it's the compiler that simply checks the index
of the array and if it's greater than half of the maximum positive
int_16 value (16384 or so) it refuses to compile. The array occupies
46464 Bytes in Flash, and it fits easily into the 64KB, even with IRQ
vectors and c runtime stuff.

That's why I originally switched from an 8bit array
to an 16bit array, because with the 8bit array I will exceed the
index int_16 limit of 32768 with my index of up to 46463, but 16 bit with
half the index must work.

HBPBE> Probably, I'll have a look when I find time.

Thanks !


reply via email to

[Prev in Thread] Current Thread [Next in Thread]