Welcome! Log In Create A New Profile

Advanced

Problems compiling Marlin for Anet A6

Posted by HAJM 
Problems compiling Marlin for Anet A6
January 06, 2019 06:33AM
I am trying to compile Marlin 1.1.9 for the Anet A6 using the Arduino IDE and am having multiple errors. I put a hardware definition for the Anet in the Arduino/hardware directory, added a zip library for U8glib and replaced the default configuration.h and configuration-adv.h by the ones in the examples/Anet/A6 directory of the Marlin package.

When I followed online advice to delete everything and start again, I got a different set of errors, so one of my problems is probably that I have not set up all the necessary pieces of software correctly, or have included something I should not have.

Is there a complete set of instructions anywhere to set up the Arduino IDE to compile Marlin?

Would I be better trying to compile the previous release 1.0.2-2 or bug fix-1.1.x? I don't think I want to try the 2.0 version as it is obviously not yet stable.

Any other advice would be welcome
Re: Problems compiling Marlin for Anet A6
January 06, 2019 08:43AM
You really need to post the errors your getting

I presume your talking about this hardware definition? [github.com]

If your trying to remove the arduino ide completely you really need to remove the hidden arduino15 directory also. see [support.paradisearcadeshop.com]
Re: Problems compiling Marlin for Anet A6
January 06, 2019 12:43PM
Thanks for your reply.

I am using the GitHub definition you mention.

I did remove the arduino15 directory, and pretty well everything else that referred to the Arduino and Marlin, before starting again.

I didn't post my errors because I get different collections of errors depending on whether I compile on the old or new setup, on whether I compile with the Anet V1.0 or Anet V1.0 sanguine board (I get both when I add the GitHub board file) and on whether I compile the Marlin 1.1.9 or the bugfix 1.1,x package on the Marlin Github site.

The errors mainly relate to not finding included libraries in some files such as G26_Mesh_Validation_Tool.cpp. I assumed that an Arduino library consists of pairs of .h and .cpp files in a zip file. I checked that all the top level includes in G26_Mesh_Validation_Tool.cpp were present in the Marlin package, but gave up trying to check all the included in the top level includes themselves. (Is there any easy way to find the name of the missing .h or .cpp file(s)?

The other problem is warnings about redefinitions of symbols such as Timer2 to different values, which is clearly an error even though the compiler continues and, in some cases in the original setup, produced a likely looking code file despite the errors and warnings.

Any further advice would be very much appreciated.

I cannot include the error files from the original setup as they are refused as too large (~1.2Mcool smiley but here are the error files from the current setup using both the Anet V1.0 and Anet V1.0 (optiboot) board definitions.
Attachments:
open | download - Errors A6 Current.txt (179 KB)
open | download - Errorts A6optiboot Current.txt (177.4 KB)
Re: Problems compiling Marlin for Anet A6
January 06, 2019 07:22PM
the error in both of them is

"SanityCheck.h:923:6: error: #error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'."
#error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'.""

But the A6 configuration.h provided with marlin does not have AUTO_BED_LEVELING_UBL enabled, did you change it? See github version, line 1087 [github.com]

The error is also clear what you should do if you have enabled AUTO_BED_LEVELING_UBL and that is also enable RESTORE_LEVELING_AFTER_G28 in configuration.h
Re: Problems compiling Marlin for Anet A6
February 11, 2019 01:20AM
Quote
HAJM
The errors mainly relate to not finding included libraries in some files such as G26_Mesh_Validation_Tool.cpp. I assumed that an Arduino library consists of pairs of .h and .cpp files in a zip file. I checked that all the top level includes in G26_Mesh_Validation_Tool.cpp were present in the Marlin package, but gave up trying to check all the included in the top level includes themselves. (Is there any easy way to find the name of the missing .h or .cpp file(s)?

The other problem is warnings about redefinitions of symbols such as Timer2 to different values, which is clearly an error even though the compiler continues and, in some cases in the original setup, produced a likely looking code file despite the errors and warnings.

The previous comment solved the issues found in the compile log files you posted with a bad configuration file.

I wanted to document here how I resolved the redefinition of Timer2 errors that others may see if they find this post in google like I did.
"sanguino/pins_arduino.h:43:0: warning: TIMER2 redefined"

The problem was that the first build I tried of Marlin I had forgotten to include the U8glib library. When I added it I ran the build again I got all those redefinition errors. To solve this I had to disable the Arduino preference for caching previous compiles:

I.e. In Arduino IDE menu:
File -> Preferences: Aggressively cache compiled code

The problem I assume was that some of the old previously failed build results were being cached and re-used causing conflicts. There is probably some folder that can be deleted as well that will fix the issue.
Sorry, only registered users may post in this forum.

Click here to login