I am using Mega 2560 , Windows 7 and ArduinoIDE 1.6.5
All hardware and software uploads fine and works fine (!) whenever I upload and run any examples or my own previous version of code.
Now, after making many changes to my previously ran code, I compiled with no errors and trying to upload - it freezes at about 80% and never finishes.
Now after I try to reset the board and to upload something else - upload does not start : reporting the communication error ... this is understandable as previous upload was partially done... bootloader does not start... only after I power OFF/ON again (USB OFF/ON), I can upload anything else... but not my new code!
Strange as it seems - this happens only to this my updated code... as if the upload "knows" the code it is uploading
Power checked: precise 5.00v on the board bus drawn from USB, no fluctuations.
all hardware connections stay the same between running examples and running my code (RTC module, MicroSD card, audio buzzer and few of my modules connected to Mega by galvanically isolated I2C interface),
sizes of the program code 28k (well under 256k for Mega) and RAM used 1.5KB (under 8KB RAM space).
What else there to check?
Did anything like this happen before ?
Am I in a Twilight Zone?