I'm working with version 1.6.5 on windows XP pro. I've just discovered that I can no longer upload to Megas (code compiles ok, but just hangs on upload, no error messages)
I've tried 3 different megas, two different USB leads and all the USB slots on my laptop. I think it's not a code issue since it effects all my old libraries and sketches, and I don't think it's a fault with the arduino software since I can still compile and upload to duemilanove's.
When I plug the mega's into the computer it beeps and the device appears in control panel/system/hardware/device manager/ports - so the computer obviously can 'see' the devices.
Everything so far is pointing to this being a problem with the driver, except for one thing - I can still upload some very very basic sketches i.e. blink.
I've tried re-installing the device drivers, I've installed the latest version that comes with arduino 1.6.5 (driver version 1.2.2.0 dated 15 jun last year) plus I've tried re-installing the arduino software (several times) I've also tried re-installing some older versions of the driver that were left over from previous version of arduino.
All to no avail - I still get the exact same problems as before, maybe it's not a driver problem? maybe it's something else? Maybe there's some other driver setting that needs tweaking?
Remove the three !!! characters in a row from the sketch you are trying to upload
it's not that old classic! (that's got me several times in the past)
The problem occurs with all but the very simplest sketches, and doesn't occur on the Duemilanove.
I have re-installed everything from scratch onto a virgin machine and have still have the same error, so Im begin to thing that somehow I've manged to damage three megas at the same time. As soon as the shops open I will go and buy a new one and see if that works.
I suggest use a working Arduino as an ISP programmer and burn a fresh bootloader on the non-working Megas and also burn a fresh USB-to-serial program on the ATmega16U2 chip (if your Megas have that chip).
When you do the burn bootloader, go into preferences and check show verbose upload. Then you will have the command lines you can modify for setting the fuses and uploading the USB-to-serial program. You can do it via the command line as shown in step 1 of this Instructable, or go through the whole Instructable.