Hi
I have a problem with some constant lookup tables. I am using Arduino-0012 (same problem on 0011) with a Diecimila board.
I am declaring around 500 bytes worth of constants in a number of separate arrays like this:
const byte someLookup[] = { 1, 4, 6, ...... };
const byte secondLookup[] = { 6, 5, 4, 12, 4, ... };
Each array is around 30 to 70 bytes long.
The program compiles down to 10588 (of 14336) using agv-gcc version 4.3.0. I am targetting an ATmega168.
When accessed, some of the array data appear to return the wrong values (!) If I re-organise the source code by swapping around the order in which they are declared, then the problem goes away from the original array, but appears in a different array. I therefore assume that their is some sort of location related problem.
Since we don't have access to the makefile within Arduino, I cannot find a way to generate listing or map files so that I could manually check what is going on by reading though the assembler listings.
Has anyone else had similar problems, or know how to generate listing/map files?
Thanks