That is correct, there is a bug in the avr 4.3.x compiler. It is supposedly fixed in 4.4.0 and later. I hope to have the new version of the compiler tested by the end of the week.
That is correct, there is a bug in the avr 4.3.x compiler. It is supposedly fixed in 4.4.0 and later. I hope to have the new version of the compiler tested by the end of the week.
There seems to be a major bug in 4.5.0 and 4.5.1 to do with the initialization of global class variables that is not present in 4.3.x. It manifests itself most obviously in the failed initialization of multiple instances of HardwareSerial on the mega in even the smallest projects:
I can confirm that the bug is present in 4.5.0/4.5.1 on Windows (mingw compiled gcc, avr-libc 1.7.0).
After refactoring the HardwareSerial instances to be dynamically initialized I found other cases in my project where this bug caused crashes. I would advise staying away from 4.5.0+ until this bug is fixed.
I would assume the latest version of the bootloader should be the one in the latest version of the Arduino IDE. Arduino as supported the Atmega2560 since the release of the UNO and MEGA2560... release 20 I think? You can either load it directly from the latest version of the Arduino IDE or you can find the hex file in the same place as the other bootloaders within the Arduino IDE directory structure.
seems straightforward, I am assuming that after following the instructions, and wiring my target board according to the first example in the arduinoISP tutorial
A couple of weeks ago Mark suggested to me that the compiler issues with the 2560 are not as great as we had thought. the tests referred to above filled the lowest 64K of static memory (where your program and PROGMEM data go) with a huge amount of PROGMEM data. I checked out the issue with a program (a very atypical program that I generated using another program) that uses no PROGMEM data. It compiled loaded and ran OK. I have seen programs based on this work up to about 110K so far.
Most address information generated by the compiler is 16 bits and so is limited to addressing 64K. The compiler, however creates a 'trampoline' table in the lower 64K that is a list of long JMP instructions to addresses higher in the static RAM. I think the test that used a huge amount of PROGMEM data and failed put so much data in the low 64K that the trampoline table would not fit there. I know Mark's been working on this and is probably considerably more knowledgeable than I am about it.