How to upload firmware to reprap printer?
There are mainly three reasons for that:


Arduino studio settings should be: 


Board: Mega 2560 and
Programmer: AVR ISP 
and valid COM port, please see below:






Please close all slicer's instances (Cura, Slic3r, Repetiter)  and host servers and other software that communicate with the printer as they lock the COM port;
Please check that the appropriate usb2serial drivers are installed and working - the best way is to start the serial monitor from the Arduino Studio Tools menu and see if there are any.