Mega 2560 Progmem limitation?

hello, i'm working on a system with a large T6963C LCD and an arduino board.
I'm facing an issue with the program memory storage of the icons (bitmap in uchar arrays)
over a certain limit I get this error:

d:/electronique/softwares/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6/crtm2560.o: In function __vector_default':** **(.vectors+0xa0): relocation truncated to fit: R_AVR_13_PCREL against symbol __vector_40' defined in .text section in d:/electronique/softwares/arduino-1.0.5/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/lib/avr6/crtm2560.o

I've allready made some search and I know that it seems to be caused by the CALL/JMP and LJMP/LCALL instructions (relocation of the vector table) but i've not find a real workaround.
any idea?
IDE 1.0.5

example of my code:

#include <avr/pgmspace.h>

prog_uchar welcomebmp[] PROGMEM = {
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x07,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x07,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
0x3F,0x3F,0x3F,0x3F,0x3F,0x07,0x3F,0x3F,0x3F,0x3F,0x3F,0x3F,
};

thank you :slight_smile:

Only have 3 bytes different out of 132 - can you code change your code for patterns like that to indicate all bytes are 0x3F, and only bytes x,y,z are 0x07? Save a lot of room.

I don't know how to solve the larger problem of going over 64K or 128K, whatever the issue is.

Nice wiring job, looks very neat.

these data are directly sent to the LCD to have a fast display.
but even with this gain and after i think 5 icons the problem will occur!
it occur after near 970 bytes!

CrossRoads:
Nice wiring job, looks very neat.

thank you :slight_smile:

Just 970 bytes - that is odd.
Sure it's not a code error somewhere in the 8th array? That's what usually get me - some unintended comma or a value or something.

no it depends of my main program size :wink:
for example I have two arrays. if I remove one byte from the first one to have a working output and put it in the other array the problem occurs too. It's the sum of the code

If I can't find a solution I will restart my project under Codevision I think...

I have tried with the 1.0.0 IDE like explained here:
https://code.google.com/p/arduino/issues/detail?id=1071

and the compilation works fine

after further tests: replacing the java core files (LIB directory) from the 1.0.0 in the 1.0.5 solve the problem.
so the origin of the problem is not from AVR-G++ etc....

Cool, so it was just the development environment then.

yes! :slight_smile:
now i'm working on the code for the speed/fog control/light dimming <-> DMX bridge

It's a linker bug...fixed in newer compilers.

ok thank's
i've finished a basic version of the program because I must use my system next weekend. all works fine after some problems from the LCD library who change my triac gate control pin level when working with the LCD. but with a scope I've seen the problem.