MPCNC/Ramps 1.4/ArduinoMega 2650 not compiling

I keep getting this error when trying to compile:
I have tried to use Platformio and arduino both…

Arduino: 1.8.12 (Windows 10), Board: “Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)”

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp: In function ‘void u8g_spiSend_sw_AVR_mode_0(uint8_t)’:

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:90:3: error: ‘U8G_ATOMIC_START’ was not declared in this scope

U8G_ATOMIC_START();

^~~~~~~~~~~~~~~~

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:90:3: note: suggested alternative: ‘SIG_ATOMIC_MAX’

U8G_ATOMIC_START();

^~~~~~~~~~~~~~~~

SIG_ATOMIC_MAX

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:100:3: error: ‘U8G_ATOMIC_END’ was not declared in this scope

U8G_ATOMIC_END();

^~~~~~~~~~~~~~

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:100:3: note: suggested alternative: ‘U8G_ESC_END’

U8G_ATOMIC_END();

^~~~~~~~~~~~~~

U8G_ESC_END

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp: In function ‘void u8g_spiSend_sw_AVR_mode_3(uint8_t)’:

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:110:3: error: ‘U8G_ATOMIC_START’ was not declared in this scope

U8G_ATOMIC_START();

^~~~~~~~~~~~~~~~

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:110:3: note: suggested alternative: ‘SIG_ATOMIC_MAX’

U8G_ATOMIC_START();

^~~~~~~~~~~~~~~~

SIG_ATOMIC_MAX

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:120:3: error: ‘U8G_ATOMIC_END’ was not declared in this scope

U8G_ATOMIC_END();

^~~~~~~~~~~~~~

sketch\src\HAL\HAL_AVR\u8g_com_HAL_AVR_sw_spi.cpp:120:3: note: suggested alternative: ‘U8G_ESC_END’

U8G_ATOMIC_END();

^~~~~~~~~~~~~~

U8G_ESC_END

Multiple libraries were found for “U8glib.h”
Used: C:\Users\Joshua\Documents\Arduino\libraries\U8glib
Not used: C:\Users\Joshua\Documents\Arduino\libraries\arduino_78349
exit status 1
Error compiling for board Arduino Mega or Mega 2560.

This report would have more information with
“Show verbose output during compilation”
option enabled in File -> Preferences.

Multiple libraries is I think a fairly common arduino issue.

You have the Libraries folder where Arduino IDE is installed and the personal folder in your user folder.

C:\Program Files (x86)\Arduino\libraries
C:\Users\Joshua\Documents\Arduino\libraries\

Verify duplicates, remove 1 of them.

Try to compile again.
If it still fails post it here and we try to help.

ok so now it compiles, and even uploads, but it still has the old firmware on it

my big laptop wont change the ports on arduino, but my school/work surface will, but it keeps having an error. i think it is timing out before it can finish compiling.

If you can upload the sketch with OK result it should be updated, unless you are re-uploading old firmware?
(I would re-download the latest firmware and try again)

If it still does not work properly remove RAMPS try to upload blink from examples.
If this does not work - the connection between computer/ Arduino is not OK (ports)
Also make sure you selected MEGA board and then correct MP be 1280 or 2560.

If/When Blink works - try to upload the “erase eeprom firmware” that clears eeprom.

When done try to reupload MP3DP firmwre (Marlin)
Unplug and reconnect RAMPS board and see if it works.

/UndCon

i think most of the problem now is with arduino IDE not recognizing the com ports for some reason…
my surface has the correct ports but keeps erroring out… i think it is a time out issue

If compiling works but uploading fails, make sure there isn’t some other program (e.g. Repetier host or server) still connected to the arduino.

nothing was ever connected to the ramps board. it just throws the “an error occurred”

Fire up Device Manager and watch the COM ports when you plug the Arduino in. Then double check that the Arduino IDE is set to the same COM port and to 250,000 baud. they should talk to each other then.