avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] Potential bug with large array of uint16_t in Flash with


From: Markus Rudolf
Subject: [avr-gcc-list] Potential bug with large array of uint16_t in Flash with ATMega128 and avr-gcc 3.4.3
Date: Mon, 2 Jan 2006 09:02:24 +0100

I have trouble with following code on a ATmega128.

---------- <tux.c> -----------
#include <avr/io.h>
#include <inttypes.h>
#include <avr/pgmspace.h>
const uint16_t tuxlogo[176*132] PROGMEM = {
   0x4352,
   0x4351,
   ...
   };
---------- </tux.c> ----------

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 signed.

The flash is pretty empty and the array should fit comfortably into
the lower 64kb of the flash.

Is this a bug and will it be corrected in future releases ?

Markus

   





reply via email to

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