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.
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.
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.
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?