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

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

[avr-gcc-list] Help on Large Structures


From: Pieter Potgieter
Subject: [avr-gcc-list] Help on Large Structures
Date: Wed, 18 Jul 2001 11:48:53 -0400

Hi folks
I want to declare a structure which looks like this

struct DataFlash
{
  BYTE firmware[0x8000];
};

When the size of the array is bigger than 32k the compiler give me the
following 
message:

'inc/ExtMemAlloc.h:138: size of array `firmware' is too large'

The reason I want to have a structure this big ( its actually 256k ) is
to be able 
to declare a pointer of this type, and then use this pointer to do the
resolving of the addresses of the members when I want to write to the
DataFlash.
Any suggestions on how to get past this, maybe a compiler setting? Or is
it a new undocumented feature?  
Another question is whether the sizeof operator will return the correct
value?

My Compiler flags is set to the following:
CPFLAGS = -Os -mcall-prologues -Wall -Wstrict-prototypes
-Wa,-ahlms=$(<:.c=.lst)
and I am using a Mega103

Thanx
Pieter Potgieter



reply via email to

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