Flashing Marlin 2.0.bugfix on an Anet A8 3D printer

Hello there
I am trying to upgrade the firmware of my 3D printer, but don’t worry my problem is much more software than hardware based.

I downloaded all the used Arduino IDE’s from the official homepage, and downloaded the Marlin firmware directly from github, and also the board definition.

I started with the mostly recommended Arduion 1.8.5, and copied the board definition to the documents/arduino folder.
I copied the Anet A8 example configuration files to the marlin directory ( as i did multiple times before with Marlin 1.1.8)
I imported the Marlin.ino file, selected my board (there are the Anet v1.0 and Anet optiboot available) and started to compile.
I have to mention I did NOT change a single char in the files, neither Marlin nor the config files.
But the compile stopped with this error

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\main.cpp:20:0:
C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:223:0: note: this is the location of the previous definition
#define TIMER5C 18
fork/exec C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avr-gcc.exe: The filename or extension is too long.
Error compiling for board Anet V1.0.

I also tried the optiboot board option, but I got the same error, so time for google.

Google told me some possible fixes, but neither copying the Marlin directory directly to C:\Marlin, nor changing the system variables did work. Most recommended fix was to upgrade to a newer Arduino IDE, so I uninstalled 1.8.5 and installed latest 1.8.10.

Still, the compile stops:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:223:0: note: this is the location of the previous definition
#define TIMER5C 18
Multiple libraries were found for “LiquidCrystal.h”
Used: C:\Program
exit status 1
Error compiling for board Anet V1.0 (Optiboot).

This error appears for both boards also.
I tried to delete the library, but this resulted in an error “library missing”

Alternatively, Google recommended Arduino 1.9beta, so i gave it a shot:

C:\Users\HBJ2ABT\Documents\Arduino\hardware\anet\avr\variants\sanguino/pins_arduino.h:117:66: error: reinterpret_cast from integer to pointer
#define digitalPinToPCICR§ ( ((§ >= 0) && (§ <= 31)) ? (&PCICR) : ((uint8_t *)0) )
~^ ~~~~~~ (pointer to & of &PCICR)
c:\users\hbj2abt\appdata\local\temp\arduino_build_11766\sketch\src\hal\hal_avr\endstop_interrupts.h:162:21: note: in expansion of macro ‘digitalPinToPCICR’
static_assert(digitalPinToPCICR(Z_MIN_PIN), “Z_MIN_PIN is not interrupt-capable”);
^ ~~~~~~~~~~~~~~~~ (pointer to d of digital)
exit status 1
Error compiling for board Anet V1.0.

Tried with optiboot:

C:\Users\HBJ2ABT\Desktop\arduino-PR-beta1.9-BUILD-113\hardware\arduino\avr\cores\arduino/Arduino.h:223:0: note: this is the location of the previous definition

#define TIMER5C 18

exit status 1
Error compiling for board Anet V1.0 (Optiboot).

Googling the anet v1.0 board error brought me absolutely nothing, just 1 thread without answers and a github thread which I am not advanced enough in programming to understand, also with another user running into this error so definitely not solved for standard users.

The optiboot error tells me basically nothing either.


is there anyone who compiled Marlin 2.0 for an Anet A8 and got similar problems?
There are some tutorials on the web, which showed it can be done in general, also with the stock board, but none of them run into these errors.

Can someone plz help?

1 Like

Downgrading Arduino AVR Boards 1.8.1 to 1.6.23 in Boards Manager worked for me.

I’m using Arduino 1.2.10 IDE.

Good luck

1 Like

Did you manage to fix it? I have the same problem :c

+1 add me to the list.    I am upgrading to AM8 and LCD was trying to install Marlin as part of my upgrades and having no luck.    Same issues.

Having a similar issue here.

Working from a new (ish) laptop so had downloaded everything fresh in the last week or so.

Copied the 3 files from Marlin-2.0.x\config\examples\Anet\A8 to Marlin-2.0.x\Marlin

Using a MKS SGen L board (#define MOTHERBOARD BOARD_MKS_SGEN_L), changed the printer name, changed drivers to drv8825 (#define X_DRIVER_TYPE DRV8825 etc) and driver stepping to 1/32 (#define DEFAULT_AXIS_STEPS_PER_UNIT {200, 200, 800, 200})

Everything else as downloaded, click verify

Multiple libraries were found for "LiquidCrystal.h"
 Used: C:\Program
exit status 1
Error compiling for board Arduino/Genuino Mega or Mega 2560.

Still googleing.

I’m with you guys, I have spent weeks trying to install marlin but as soon as I go into changing the config h file for a BLTOUCH I get the dreaded errors…help as I’m running out of hair. 

Same issue and same solution for me (albeit 1.1.9), rollbacking to 1.6.23 for avr board did the trick.

Hello sir. I had the same issue. This is how i managed to play around.

First download the Skynet 3d package link: https://github.com/thijsk/Skynet3d

Secon unzip it and use provided Arduino. It is pre-installed 1.8.0 i think. 

Use that Arduino to compile Marlin 2.0. Select all the same settings as you do with regular installation.  

For me, that’s worked just fine.


I had a quick question. Do you know where I could find this softwhere. 

Thank you 

Hi I have problem uploading Marlin firmware to my Anet A8

Im using Arduino IDE 1.8.12 and Marlin 2.0 (I also tried with Skynet 1.1 from video on youtube) but Im always getting the same error: 

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:258:10: fatal error: pins_arduino.h:

No such file or directory

I tried to re-install arduino ide couple times…can anyone help?

 am having the same issue

Hi I am new to Marlin, installed version 2.0 yesterday so I am probably asking a dumb question.
I have a ANET a8m dual extruders (heaters and motors) with a KFB 2.0 board containing a atmega2560. all the ANET A8 configurations only cater for a atmega1284. but a search found this discussion.

Is there the configuration files available for my ANET A8M or is the above bug still been resolved.
I have tried to build other versions of ANET Printers using the example configurations, some build some have errors. is this normal? I successfully built the code for the Ender CR.20 Pro which uses a atmega 2560 so I have Marlin set up correctly. but I can see the examples for the ANET A8 do not cover my printer, so I am asking for help. thanks