Marlin 2.0 not compiling

Having trouble compiling marlin for my homemade 3d printer. The error is below.

Arduino: 1.8.13 (Windows Store 1.8.42.0) (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

avr-gcc: error: CreateProcess: No such file or directory

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.

sorry moderators I meant to put this in the programing question section.

Hi @farmboyB. This issue is caused by the hundreds of files of the Marlin sketch causing the compilation command to exceed Windows's 32767 character maximum length limit.

You'll be happy to learn that Arduino's developers have already made a fix for this issue. However, there has not been a production release of the Arduino IDE since that time. You can get the fix by using the hourly build of the Arduino IDE, which you can download here:

How do I apply the bug fix? Also I forgot to mention that I had it working earlier today and after I updated a library it started giving me errors.

There's no need to apply any bug fix. You just need to use the hourly build of the Arduino IDE. It already has the fix. You won't be able to use the Microsoft app store version of the Arduino IDE because the fix is not available in that version of the Arduino IDE. But you can have the hourly build and the Microsoft Store versions of the Arduino IDE installed at the same time, so this won't have any impact on your Microsoft Store App installation.

  1. Click the "Windows" link under the "Hourly Builds" section of the downloads page.
  2. Wait for the download to finish.
  3. Unzip the downloaded file.
  4. From the unzipped folder, double click on the file "arduino.exe".
  5. Wait for the Arduino IDE to start.
  6. Select File > Open from the Arduino IDE's menus.
  7. Open the folder containing Marlin.
  8. Select the file named "Marlin.ino".
  9. Click the Open button.

Now you just need to upload Marlin just as you would do normally.

You are welcome to continue using the Microsoft Store version of the Arduino IDE for things other than Marlin if you prefer. When Arduino IDE 1.8.14 is released, the fix will become available in the Microsoft Store version of the Arduino IDE, so you only need to use the hourly build until that happens.


UPDATE: As of Arduino IDE 1.8.14, the fix is now available in the standard version of the Arduino IDE, so no need to use the hourly build to get the fix.

It works. thank you so much I have been trying to figure out the problem all day.

You're welcome. I'm glad to hear it's working now. Enjoy!
Per

Hello,

I followed those exact steps but got this error message:

"Arduino: 1.8.14 Hourly Build 2021/01/29 11:33 (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

C:\Users\maxfr\OneDrive\Documents\Arduino\libraries\U8glib\src\clib\u8g_rot.c:48:27: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]

u8g_dev_t u8g_dev_rot = { u8g_dev_rot_dummy_fn, NULL, NULL };

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

C:\Users\maxfr\OneDrive\Documents\Arduino\libraries\U8glib\src\clib\u8g_rot.c:48:27: note: (near initialization for 'u8g_dev_rot.dev_fn')

Sketch uses 104722 bytes (41%) of program storage space. Maximum is 253952 bytes.

Global variables use 4682 bytes (57%) of dynamic memory, leaving 3510 bytes for local variables. Maximum is 8192 bytes.

An error occurred while uploading the sketch

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

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

Any help would be greatly appreciated

maxfratt:

An error occurred while uploading the sketch

avrdude: stk500v2_ReceiveMessage(): timeout

This upload error has a completely different cause from the original "avr-gcc: error: CreateProcess: No such file or directory" compilation error we discussed here.

It might be caused by a number of things:

  • You're using a 3D printer board that doesn't have a bootloader.
  • You have the wrong board selected from the Arduino IDE's Tools > Board menu.
  • You have the wrong port selected from the Arduino IDE's Tools > Port menu.
  • Your 3D printer board is damaged or defective.

hmm that's strange. I'm using a Rambo 1.4. This is being used on V1 Engineering's MPCNC primo. I have followed the steps word for word on how to flash the marlin firmware onto this board but it keeps giving me that same message. Thanks for the help

Anyone know where I can find the right core processor files for using the LPC1768 processor to compile Marlin for a Big Tree board using that processor?

You need to use platfomio for LPC1768/9 based controllers.
The "core" files are only available for platformio.

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