Problem verifying Marlin firmware for Mega 2560

I purchased a Mega 2560 with RAMPS 1.4 board to replace the Melzi on a TronXY X3A 3d Printer. Hooked the Arduino up to my PC (Windows 10 Pro Version 1709, Build 16299.334), installed the Arduino IDE (1.8.5)`` and downloaded the latest Marlin firmware (1.1.x) package from the Marlin website.

I selected the COM port listed in the Device Manager (which listed it as Arduino Mega 2560 under Ports). I selected the "Arduino/Genuino Mega or Mega 2560" under the board option in the Tools menu of the IDE and made sure the processor was an ATmega 2560 (Mega 2560).

I performed the necessary changes to the Configuration.h file to match the parameters of the printer and the hardware spec that it should have after the Arduino replaces the Melzi. This included a RepRap Discount Full Graphics Smart Display.

I attempted to verify the firmware and was met with the error messages:

Arduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\mark__000\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\mark__000\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\mark__000\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10805 -build-path C:\Users\MARK__~1\AppData\Local\Temp\arduino_build_368862 -warnings=default -build-cache C:\Users\MARK__~1\AppData\Local\Temp\arduino_cache_886419 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Users\mark__000\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.arduinoOTA.path=C:\Users\mark__000\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avr-gcc.path=C:\Users\mark__000\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\mark__000\OneDrive\Documents\Arduino\Marlin\Marlin.ino

readlink C:\Users\mark__000\OneDrive\Documents\Arduino\Marlin\Marlin.ino: The system cannot find the file specified.
Error compiling for board Arduino/Genuino Mega or Mega 2560.

The italic is the echo of the build command being run and the bold is the error messages.

I originally thought it was a problem with the firmware, so tried the same thing with the Repetier firmware and got identical results. This leads me to believe there is a problem with the installation of the Arduino IDE.

I have managed to upload and modify some simple sketches with no trouble.

Any help or pointers is gratefully received.

Mark

The problem is that you have the Marlin sketch stored on your OneDrive. The most simple solution is to move it somewhere else on your computer.

For an explanation of the problem and workarounds to allow you to store it on your OneDrive see:

Pert, you're ace! Solved the problem that I've been agonising over for days. Karma to you!

Mark