Try this
Short the RST pin to GND on the Arduino whilst the code is compiling. When you see the "Uploading" message remove the short to GND
Try this
Short the RST pin to GND on the Arduino whilst the code is compiling. When you see the "Uploading" message remove the short to GND