There are two of these particular kinds of limits that can be at fault in this case.
1) We are restricted to declaring a maximum of 256 bytes of global and static variables within any single .c file. So an array of 256 bytes by itself will actually fit, but the same array plus one byte more, e.g.,
char myarray[256];
char onetoomany;
will cause it to bomb. Easy work arounds include using smaller arrays of course, moving the array to the Program memory if it will never change and th values can all be preset, a la
rom const char myarrary[256]={0,1,2,3,4,...255};
or moving the 256 byte array to a dummy .c file and referencing it locally as an "extern".
2) Each of our routines within a .c file is limited to no more than 120 bytes of local variables, so char myarray[120]; would be it.
e.g., these represent the maximums and not one byte more:
Code:
/************
* my_routines.c
************/
char myglobal[256];
void myroutine()
{
char mylocal[120];
...
}