defining big types on avr-gcc

Robert Dell dellr@mac.com
Wed Aug 4 10:55:00 GMT 2010


Massimiliano Cialdi wrote:
> I use avr-gcc 4.4.4:
>
> Using built-in specs.
> Target: avr
> Configured with: ../gcc-4.4.4/configure --target=avr
> --enable-languages=c,c++ --disable-nls --disable-libssp --with-dwarf2
> --prefix=/usr/local/cross-gcc-avr-4.4.4 --disable-threads --with-gnu-as
> --with-gnu-ld
> Thread model: single
> gcc version 4.4.4 (GCC)
>
>
>
> and my target is an ATMega32
>
> I tried to define a type (only define, without allocate any variable):
>
>
>
> typedef struct dummy
> {
>   uint8_t data[9000];
> } dummy_t;
>
> typedef struct big_dummy
> {
>   dummy_t bigdata[4];
>   dummy_t singledata;
> } big_dummy_t;
>
>
>
> I never allocate any big_dummy_t object. I use big_dummy_t only as
> placeholder (I use offsetof() macro), only to calculate offsets of
> object placed into a big extern serial flash memory.
>
> I get the error from gcc:
>
> error: size of array 'bigdata' is too large
>
> it is 36000 bytes, bigger than 32KB.
>
>   
odd, i tested that with the macintosh osx 10.4.11 using a quad core g5
 machine and gcc version 4.0 and apple's xcode frontend and it compiled 
and linked with 0 errors.



More information about the Gcc-help mailing list