How to flash Marlin Dual endstops for Ramps 1.4 onto Mega2560?

I am running into lots of errors when compiling Marlin in Arduino IDE 1.8.13 on Windows.
The compile process takes way longer than any other sketch I have compiled (like 10 minutes). Here are some example errors. Can you help me get past them?
I got Ramps 2.0.7.2 from here.
I have selected the right board, processor and port. I can flash a simple sketch like Blink.ino no problem.

Thanks!
__EXAMPLE ERRORS (only some of them)
Error while detecting libraries included by C:\Users\steve\AppData\Local\Temp\arduino_build_217266\sketch\src\gcode\geometry\G53-G59.cpp
“C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\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\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\variants\mega” “-IC:\Users\steve\Documents\Maker stuff and Arduino\Arduino Sketches\libraries\U8glib\src” “C:\Users\steve\AppData\Local\Temp\arduino_build_217266\sketch\src\gcode\geometry\G92.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE
Error while detecting libraries included by C:\Users\steve\AppData\Local\Temp\arduino_build_217266\sketch\src\gcode\geometry\G92.cpp
“C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\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\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino” “-IC:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\variants\mega” “-IC:\Users\steve\Documents\Maker stuff and Arduino\Arduino Sketches\libraries\U8glib\src” “C:\Users\steve\AppData\Local\Temp\arduino_build_217266\sketch\src\gcode\geometry\M206_M428.cpp” -o nul -DARDUINO_LIB_DISCOVERY_PHASE
_______________________________________________ …
Linking everything together…
“C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.42.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc” -w -Os -g -flto -fuse-linker-plugin -Wl,–gc-sections -mmcu=atmega2560 -o “C:\Users\steve\AppData\Local\Temp\arduino_build_217266/Marlin.ino.elf” “sketch\Marlin.ino.cpp.o” “sketch\src\HAL\AVR\HAL.cpp.o” “sketch\src\HAL\AVR\HAL_SPI.cpp.o” “libraries\U8glib\clib\u8g_dev_uc1701_mini12864.c.o” “libraries\U8glib\clib\u8g_ellipse.c.o” “libraries\U8glib\clib\u8g_font.c.o” “libraries\U8glib\clib\u8g_font_data.c.o” “libraries\U8glib\clib\u8g_line.c.o” “libraries\U8glib\clib\u8g_ll_api.c.o” “libraries\U8glib\clib\u8g_page.c.o” “libraries\U8glib\clib\u8g_pb.c.o” “libraries\U8glib\clib\u8g_pb14v1.c.o” “libraries\U8glib\clib\u8g_pb16h1.c.o” “libraries\U8glib\clib\u8g_pb16h2.c.o”
…
“libraries\U8glib\clib\u8g_pb8v2.c.o” “libraries\U8glib\clib\u8g_pbxh16.c.o” “libraries\U8glib\clib\u8g_pbxh24.c.o” “libraries\U8glib\clib\u8g_polygon.c.o” “libraries\U8glib\clib\u8g_rect.c.o” “libraries\U8glib\clib\u8g_rot.c.o” “libraries\U8glib\clib\u8g_scale.c.o” “libraries\U8glib\clib\u8g_state.c.o” “libraries\U8glib\clib\u8g_u16toa.c.o” “libraries\U8glib\clib\u8g_u8toa.c.o” “libraries\U8glib\clib\u8g_virtual_screen.c.o” “core\core.a” “-LC:\Users\steve\AppData\Local\Temp\arduino_build_217266” -lm
avr-gcc: error: CreateProcess: No such file or directory
Using library U8glib at version 1.19.1 in folder: C:\Users\steve\Documents\Maker stuff and Arduino\Arduino Sketches\libraries\U8glib
exit status 1
Error compiling for board Arduino Mega or Mega 2560.

Marlin 2 works best with platform io as they are/have stopped supporting marlin ide.

Great! That was not quite easy, had to install Git, selected all the default options.
It worked, compiled and uploaded fine in Visual Studio/PlatformIO.
Please delete all that old Arduino IDE advice on your website if it no longer works. Others may waste their time and get frustrated like I did.

Now I am on to setting the stepper motor max current trim pots on the Ramps board.
Is there something in your Learn section about how exactly to do that?
(looking for advice specific to the stepper motors and demands we will have with the MPCNC)

I thought it was hidden under the “OLD” header that had to be expanded to see. Unless it is somewhere else?

Depends on your drivers and steppers. There are a ton of youtube videos, pick you favorite content creator and see how they do it. Those pots are a pain in the butt.

1 Like

If you have clones of A4988’s, it’s important to realize different manufacturers use different “sense resistors” that impact the observed vRef settings for target current. I had good luck with a couple of sites:

1 Like

I thought so too. I also reorganized it a bit in the xloader PR.

Thanks for those helpful links, Tom. Mine are DRV8825 clones with 0.1 ohm sense resistors. I set them to 0.75 V. I plan to have a fan on the RAMPS board.
I measured the temperatures of each driver heatsink at that setting with the stepper parked and they went to about 54C without cooling after a few minutes. I imagine if they are moving the MPCNC they would be sourcing more current and getting hotter.

The secret to adjusting those pots is to use a straight jewellers screwdriver, not a cross-head one.

I can’t recall how I made it to the Arduino Marlin flashing page. Here is the one I was following.

Aha, yeah, that needs to be edited. I don’t have access to that site, just the docs.v1 pages.

That looks to be a google search link. I can’t change that, only delete or edit that page to only contain the new link.

Does it make sense to edit it to point to the new doc? IDK how to encourage google to do the right thing, but I am assuming you don’t want to just dead end that, because it is showing up in search results.

Yeah it is tough. If I delete it the link will update, but I am not sure how long that takes. If I put a link there I am fairly certain the google result will stay.

Cant someone add a caveat at the top saying that “warning this is for Marlin V1” and then a link to the new information for Marlin V2?

Just my 10c. Then you dont need to delete it ot move it more than you have.

Actually, this is the page on your site I found first and tried to follow:
https://www.v1engineering.com/marlin-firmware/

Near the top, it says,
" Right now flashing Marlin 2.0 requires the Arduino IDE 1.8.9 or higher."

and I believe that right now Arduino IDE is no longer possible.

Yes, that page but there should be no external links to it. The only way it shows up is a direct link from a google search.

Nope, I got to it following links on your site:
Home menu: Information: Software: click on the Marlin link.
Either way, It needs to say “THIS IS OUT OF DATE. USE PLATFORM IO.”
at the top.

1 Like

Thanks that is great to know I thought I got all of those. Fixing now and updating that page.