I am unable to upload any sketches to the (starting with the bare bones empty functions sketch or blink sketch) Arduino Mega 2560. machine is running OS X 10.10.2 "Yosemite". Arduino is 1.6.4. When the IDE is trying to send the sketch to the board, the port is " /dev/cu.xrusbmodem1d121". The errors displayed are:
Sketch uses 642 bytes (0%) of program storage space. Maximum is 253,952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8,183 bytes for local variables. Maximum is 8,192 bytes.
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
Using the same Arduino Mega 2560's on the same USB cabling, etc. I CAN upload to them from a Virtual Machine (Parallels) running MS Windows 7 in the same computer. Changing whether the Arduino is mapped into the VM is done as usual -- the USB device in the menu is mapped into the VM has the expected effect. The device to Parallels is called , "Vendor 2341 - Communication"
Uploading the same sketches to an older Arduino Mega 1280 and Uno works fine.
I have tried: different USB cables, different USB connectors on the computer or bypassing external hubs, Also: 2 Arduino Mega 2560's from different batches.
I've tried rebuilding the kernel cache, but that made no difference to the problem.
On my copy of OS X 10.10.3 the device names are all /dev/cu.usbmodemXXXX. I wonder if the 'xr' on the front of your device name means that something strange is up. Maybe a third-party USB driver has been installed??
Good News: I can confirm now that my system is fixed and operating normally now. The Arduino Mega2560 can now be flashed. I'll describe the fix in case anyone else encounters this problem.
As johnwasser suggested it turns out that an added driver had changed the Arduino's device link from /dev/cu.usbmodemxxxx to /dev/cu.xrusbmodemxxxx.
The offending driver is for an Exar brand chip in another usb-connected device. The Stanford Quake Catcher Network (QCN), shipped a O-Navi earthquake sensor that plugs into USB and it needed its own driver installed: ExarUSBCDCACM.kext
The installer of the driver was shipped in a file called O-Navi_32_64bit_Package_1.03.pkg.
Since there is no uninstaller for this driver, the fix I came up with is to manually remove ExarUSBCDCACM.kext from boot volume's S/L/E directory and rebuilding the kernel cache (i.e. Maintenance in Kext Wizard) The device name has now reverted to its original cu.usbmodem.... name as is normal, and this has made things work normally now.
The Arduino Mega 2560 now can be programmed. Hooray!
P.S. I was able to break open the o-navi device from Stanford/QCN. The chip inside is an Exar XR21V1410. The driver QCN supplied is version 1.03. The Exar web site has a newer driver, v 1.04. Here is the page with the driver https://www.exar.com/common/content/default.aspx?id=10296
I haven't tried this newer driver to see if it allows the Arduino Mega 2560 to be flashed or not.