Unable to compile Marlin 2.0.7.2
October 16, 2020 06:03PM
I have modified and successfully compiled Marlin 1.9 for two other 3D printers.

I am trying to compile Marlin 2.0.7.2 using Arduino 1.8.13. I have selected;

Board: Arduino DUE (Native USB Port)

and modified configuration.h for;

// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
// #define MOTHERBOARD BOARD_RAMPS_14_EFB
#define BOARD_RAMPS4DUE_EFB
#endif

No other changes have been made.

See attached file for the long list of errors i am getting.

Any help would be appreciated.
Attachments:
open | download - errors.txt (75.2 KB)
Re: Unable to compile Marlin 2.0.7.2
October 16, 2020 09:00PM
you need

#define MOTHERBOARD BOARD_RAMPS4DUE_EFB
Re: Unable to compile Marlin 2.0.7.2
October 17, 2020 01:13PM
Thanks Dust, I missed that. Modified configuration.h to add MOTHERBOARD;

// Choose the name from boards.h that matches your setup
#ifndef MOTHERBOARD
// #define MOTHERBOARD BOARD_RAMPS_14_EFB
#define MOTHERBOARD BOARD_RAMPS4DUE_EFB
#endif

Now I get the following error;

Couldn't deeply cache core build: Rel:
Running normal build of the core...
arm-none-eabi-gcc: error: CreateProcess: No such file or directory
exit status 1
Error compiling for board Arduino Due (Native USB Port).
Re: Unable to compile Marlin 2.0.7.2
October 17, 2020 10:33PM
This is a Arduino IDE on Windows issue. Windows has a hard coded unchangeable max path/fork limit of 32K characters. Arduino IDE is written badly, when it attempts to link all the .o files together to form the final .bin file on large projects, such as Marlin, it generate one very long command that can easily exceed the windows limit.

There are a number of tricks to shorten the path under windows.
Move marlin to root of drive, rename it to m
Delete unused parts of marlin such as unused HAL directories and unused display types. But this require in depth knowledge of how marlin works to know what is safe to remove.

Ultimately it is far better to use PlatformIO on vscode instead of Arduino IDE
PlatformIO only complies and links the code you need for your system, this avoids the Windows limitation. It also produces smaller binaries and is faster.
Re: Unable to compile Marlin 2.0.7.2
October 18, 2020 11:16AM
Thanks again Dust. I have tried PlatformIO for Longan Nano. I like Arduino better (easier to use). But If I want to do this then I guess I will have to bite the bullet.
Re: Unable to compile Marlin 2.0.7.2
October 18, 2020 11:26AM
Quote
Dust
This is a Arduino IDE on Windows issue. Windows has a hard coded unchangeable max path/fork limit of 32K characters. Arduino IDE is written badly, when it attempts to link all the .o files together to form the final .bin file on large projects, such as Marlin, it generate one very long command that can easily exceed the windows limit.

Could someone use VMware with Linux to eliminate this error.


Computer Programmer / Electronics Technician
Re: Unable to compile Marlin 2.0.7.2
October 18, 2020 05:06PM
Dust, I got it to compile using PlatformIO. Now on to the real work. I am trying to implement Marlin 2.0x on a DaVinci 1.0.
.
Re: Unable to compile Marlin 2.0.7.2
October 20, 2020 06:53PM
Quote
Roberts_Clif
Quote
Dust
This is a Arduino IDE on Windows issue. Windows has a hard coded unchangeable max path/fork limit of 32K characters. Arduino IDE is written badly, when it attempts to link all the .o files together to form the final .bin file on large projects, such as Marlin, it generate one very long command that can easily exceed the windows limit.


This is a Arduino IDE on Windows issue

Could someone use VMware with Linux to eliminate this error.

So Dust could I compile his firmware using Arduino 1.8.13 in Ubuntu 20.04 LTS on VmWare Player 12 in a Windows 10 version 2004.



I compiled the stock Marlin 2.0.7 fine.


Computer Programmer / Electronics Technician
Re: Unable to compile Marlin 2.0.7.2
November 09, 2020 03:43PM
Hi,
It's the Bugfix branch that is tricky to build on a Windows machine, it is a lot of messing about moving files and folders, shortening Paths, even Linux on a Windows sub system is a lot of messing about, easy way out is build on a Mac if you have one.

Stuart
Re: Unable to compile Marlin 2.0.7.2
November 09, 2020 06:04PM
I was able to compile Marlin 2.x using Arduino 1.8.13 running on a Raspberry Pi 4B with 4MB of DRAM. The Arduino IDE installed by apt-get was totally out of date. Download the IDE from the Arduino website, unpack it and run the install.sh to install. Looks, feels and works just like Arduino for Windows, without the Windows problems.
Re: Unable to compile Marlin 2.0.7.2
November 09, 2020 09:17PM
Quote
acestu
Hi,
It's the Bugfix branch that is tricky to build on a Windows machine, it is a lot of messing about moving files and folders, shortening Paths, even Linux on a Windows sub system is a lot of messing about, easy way out is build on a Mac if you have one.

Stuart

Quote
BigJ
I was able to compile Marlin 2.x using Arduino 1.8.13 running on a Raspberry Pi 4B with 4MB of DRAM. The Arduino IDE installed by apt-get was totally out of date. Download the IDE from the Arduino website, unpack it and run the install.sh to install. Looks, feels and works just like Arduino for Windows, without the Windows problems.

Thank you

This information is good too know.


Computer Programmer / Electronics Technician
Sorry, only registered users may post in this forum.

Click here to login