Array size limit

I am trying to use a large array with the Artemis Arduino Core and when I define my array to have more than 255 elements (e.g a 256 element array of int), the code freezes up when it tries to use the array.

With 255 elements or less the code runs fine.

My guess is that the array structure is only allowing an 8 bit index for some reason. If so, has anyone found a way around the 255 array index limit?

Is there something else I may be missing?

Thanks,

jbernard

Ooops!! - found the problem, my array index was using byte, changing this to int fixes the problem.

Ok, I was able to make two 350 element arrays [one is float and one is int] (total of 2100 bytes).

But the code freezes up when I try to make larger arrays (e.g. 500 elements, with total size of 3000 bytes of RAM).

With its 384kB of RAM, the Artemis module should be capable very large arrays (at least to the limit of the compiler used in the background).

Anyone find a similar problem and or discover a solution?

Thanks,

-jbernard

Update: if I define the arrays as global variables, I can make them large.

In previous post, the arrays were defined locally (within loop{}), and there appears to be a limit to the size of a locally defined array.