Error Compiling for board Arduino Mega or Mega 2560 (Marlin Installation)

Hello,

I am trying to install a BL touch to my cr10s. I followed all the instructions I could find online but I kept getting this error. I tried downloading the nightly builds but I ended up getting the same error code. Any pointers are appreciated

Arduino: 1.8.13 (Windows 10), Board: "Arduino 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\The one and only\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\The one and only\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\The one and only\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10813 -build-path C:\Users\THEONE~1\AppData\Local\Temp\arduino_build_768600 -warnings=none -build-cache C:\Users\THEONE~1\AppData\Local\Temp\arduino_cache_34119 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\The one and only\Downloads\Marlin-2.0.x\Marlin-2.0.x\Marlin\Marlin.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\The one and only\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\The one and only\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\The one and only\Documents\Arduino\libraries -fqbn=arduino:avr:mega:cpu=atmega2560 -ide-version=10813 -build-path C:\Users\THEONE~1\AppData\Local\Temp\arduino_build_768600 -warnings=none -build-cache C:\Users\THEONE~1\AppData\Local\Temp\arduino_cache_34119 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.3.0 -prefs=runtime.tools.avrdude.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Users\The one and only\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\The one and only\Downloads\Marlin-2.0.x\Marlin-2.0.x\Marlin\Marlin.ino

Using board 'mega' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Detecting libraries used...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\THEONE~1\\AppData\\Local\\Temp\\arduino_build_768600\\sketch\\Marlin.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\THEONE~1\\AppData\\Local\\Temp\\arduino_build_768600\\sketch\\src\\HAL\\AVR\\HAL.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Error while detecting libraries included by C:\Users\THEONE~1\AppData\Local\Temp\arduino_build_768600\sketch\src\HAL\AVR\HAL.cpp

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\THEONE~1\\AppData\\Local\\Temp\\arduino_build_768600\\sketch\\src\\HAL\\AVR\\HAL_SPI.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Error while detecting libraries included by C:\Users\THEONE~1\AppData\Local\Temp\arduino_build_768600\sketch\src\HAL\AVR\HAL_SPI.cpp

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\THEONE~1\\AppData\\Local\\Temp\\arduino_build_768600\\sketch\\src\\HAL\\AVR\\MarlinSerial.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Error while detecting libraries included by C:\Users\THEONE~1\AppData\Local\Temp\arduino_build_768600\sketch\src\HAL\AVR\MarlinSerial.cpp

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\mega" "C:\\Users\\THEONE~1\\AppData\\Local\\Temp\\arduino_build_768600\\sketch\\src\\HAL\\AVR\\Servo.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Error while detecting libraries included by C:\Users\THEONE~1\AppData\Local\Temp\arduino_build_768600\sketch\src\HAL\AVR\Servo.cpp
exit status 1

Error compiling for board Arduino Mega or Mega 2560.

Please try this:

  • Select File > New from the Arduino IDE's menus.
  • Select Sketch > Verify/Compile from the Arduino IDE's menus.

Does the compilation succeed?

geoustal:
I tried downloading the nightly builds but I ended up getting the same error code.

When you say "nightly builds", do you mean the links on the software page with the description:

Hourly Builds
Download a preview of the incoming release with the most updated features and bugfixes.

or the links on the software page with the description:

Nightly Builds
Download a preview of the incoming release with the most updated features and bugfixes.

The reason I ask is because these are two very different things, but the hourly builds have historically been called "nightly", and we sometimes recommend people having troubles with Marlin to use the hourly builds.

Hello the compilation does not succeed, the error message I posted is what I get when I click on the verify button.

Also by "nightly build" I meant hourly build

Please try it with the version of the Arduino IDE downloaded from the "Nightly builds" section of the Software page:

I don't have any specific reason to think it will work, but it does have some significant advancements in the build system, so it might be that one of those will happen to fix the issue. Worth a try at least, since I don't have any ideas about what is causing this error.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.