Stephanie,
There are a couple of things you can do to fix this problem. As Matt mentioned, you can’t have a single array greater than 256 bytes in data memory. In fact, unless to tell the compiler otherwise, you can’t have more than 256 bytes of static variables defined in any file. From your error, it looks like you are initializing the variable list. If you do not need to write to these variables (read-only) then you can define them as “rom”. This places them in program (flash) memory with your code as shown below. You can access them identically to a data variable except you no longer have the 256 byte limit. (Note that if you use pointers, you need to define the pointer as rom as well)
// Data Memory (this generates the error):
static unsigned char myvariable[8,34];
// Program Memory (this will work):
rom unsigned char myvariable[8,34];
If you need to write to these variables, then you will have to make sure that no variable array is greater than 256 bytes. So you could either shorten the array, or split it into multiple arrays. Then you need to tell the compiler to place them into different sections similar to the following. In this example, the array is split into 2 parts of [4,34].
// file global variable split into 2 sections
#pragma udata vararray1
unsigned char myvariable1[4,34];
#pragma udata vararray2
unsigned char myvariable2[4,34];
#pragma udata
The #pragma statement tells the compiler to split the variables into two sections (“udata” indicate an uninitialized data array, “vararray1” is just a unique name for the section - use “idata” instead of “udata” if you are initializing the array with values). These sections can then be placed into different 256 byte memory banks. The “rom” qualifier is the way to go if you don’t need to write to the variables as it is an easy change and should require modification to your program as long as you do not use pointers (otherwise define the pointer as rom as well like: rom unsigned char *varpointer)
Mike