RAMPS and Arduino Mega 2560 uploading problems

Greetings all, VERY NEW to Arduino, I am...

Please forgive me if this question came in some other form, I tried to search to find the answer to my problem assuming it's already here.
My problem basically is, I have a RAMPS 1.4 board and an Arduino 2560. I am trying to connect them together to power a CNC machine I hope to build. While I can get the Blink and Fade sketches to work, when I try to upload the (recommended) Marlin sketch, I get timeout or programmer problems (see attached screenshot).
I don't know if I am using the wrong sketch and if I am, I don't know where I can find the correct sketch. What I am trying to do basically as I said is to use the RAMPS board to drive a CNC machine. Can anyone out there assist me, or point me in the right direction? Your guidance would be most appreciated. Thanks in advance.

Depending on what you're building, it might be worthwhile to write your own CNC code.
This is what I have done for all of my RAMPS 1.4 projects.

When you attempt to upload this code, is it being powered externally? (eg. through the green power connector) It's a known problem with some arduino boards that they cannot be connected to external power while being connected (I've never had this problem on the Mega2650 + RAMPS setup, but you might as well try it :slight_smile: )

What I'm saying is, attempting to upload the sketch in the attachment (on just the Arduino, not connected to the RAMPS board) results in an error.
I have the Arduino connected to my Mac via USB cable. Is it necessary to connect the 9VDC power supply to the Arduino as well, or just leave it powered by the USB cable?
Also, I will eventually have to have my own code, but until I learn to do that (as I said, I'm a total newbie to Arduino), I have to rely on existing code. My problem at the moment seems to be in getting code uploaded to the Arduino so that I can use it with the RAMPS board.