Hi all,
I have a bunch of 1024 byte blocks of data that I store in PROGMEM that look like this:
static const uint8_t frame0[] PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x7F,0x04,
0x08,0x10,0x7F,0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,
/////// snip ////////
0x7F,0x08,0x14,0x22,0x41,0x00,0x7F,0x49,0x49,0x49,0x41,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
I load 120 of these into a MEGA2560 (total sketch size about 130K - most of it being PROGMEM).
Using "pgm_read_byte_far" I can read the bytes from any of these arrays just fine. BUT, if I have a program (sketch) that tries to read these sequentially, it won't run (doesn't seem to start).
So I tried loading a smaller number of arrays. It seems that if the total sketch size is under around 75K, it works... any larger and it won't start.
AVRDUDE uploads and verifies the whole sketch just fine, but it won't run. Even manually hitting reset after the load doesn't start the program.
Any ideas why the code loads just fine, but won't run if it's over around 75K when I a 256K MEGA?
Thanks.