Unable to compile Marlin for Anet A8
I'm almost back in business.


I reinstalled the bootloader.
I switched from Arduino IDE to Visual Studio Code to compile using Crosslink's Anet A8 (Plus) Marlin 2.0 Installation Upgrade YouTube tutorial.


1. Bootloader

I'm using a Chinese USBasp and there are some confusing tutorials on the web which require upgrading the USBasp firmware using another USBasp or Arduino. I avoided this as follows:


I used the Arduino IDE to open the Example | Blink.ino.
Tools | Board: "Anet V1.0 (Optiboot)". (Opti in optiboot means "optimised" so the bootloader will take up less space allowing you to use more options in your Marlin configuration.h.)
Tools | Programmer: "USBasp".
Tools | Burn Booloader. (This will generate the hex file to be transferred to the Anet board. Save it somewhere you will find it.)


Download and install AVRDUDESS if you haven't got it. I used Ver. 2.11. Connect the USBasp to the Anet board and your computer.


Start AVRDUDESS.
Port: usb.
Baud rate: 250000.
Hit the Detect button and it should identify your Anet board.
Hit the Flash [...] button and select the Blink.ino.with_bootloader.sanguino.hex file.
Hit the Program button. It should all work.


You now have an Anet board with the OptiBootLoader installed.

Now follow Crosslink's video tutorial above using the normal USB connection.