Mega 2560 out of range error

I've just got myself an Arduino Mega 2560, since my code was too large, so had to retire the Mega 1280.

Now when I try to upload the code I get this error:

Asli.cpp.o:(.progmem.gcc_sw_table+0x2): warning: internal error: out of range error core.a(HardwareSerial.cpp.o):D:\arduino-0023\hardware\arduino\cores\arduino/HardwareSerial.cpp:177: warning: internal error: out of range error core.a(HardwareSerial.cpp.o):(.rodata._ZTV14HardwareSerial+0x4): warning: internal error: out of range error

I've got at least 50 of these errors.

I am also using the SoftwareSerial library in my code.

Any help is appreciated.

Thanks.

Code?

Is there a reason you are using SoftwareSerial?

I am using an LCD. The 4d Systems 3.2" LCD in fact.

Code has been the same as before when I tried on Mega 1280. Nothing has changed.

So why are you using SoftwareSerial? You have four hardware serial ports. There are restrictions to using SoftwareSerial on a Mega. You can only use certain pins.

Have you read http://arduino.cc/forum/index.php/topic,97455.0.html

When you post a question on the Programming Questions forum, you are supposed to post your code. That way, we don't have to ask you to post your code.

Ok,

Apparently we need to pass a --relax flag when building for the atmega2560. When building with normal version of Arduino when the sketch goes beyond 128k, we get this error.

There is a "relax version" as they call it laying around for whomever that would like to use it.

Thanks for the help.

When building with normal version of Arduino when the sketch goes beyond 128k, we get this error.

Since the Mega 2560 has 128K of Flash memory, how does --relax accomplish anything? Does it perform some magic to shrink your bytes to 4 bits or something?