Configuration of the Anet A6 full graphic LCD 12864 on an Anet A8 I finished fixing my Anet A8 about the 3DTouch sensor working with the LCD2004 stock display, I am installing the full graphic display LCD 12864 (for Anet A6) but when I compile Marlin 1.1.9 the following error appears:


Arduino: 1.8.9 (Windows 7), Sheet: 'Anet V1.0 (Optiboot)'

c: / program files (x86) / arduino / hardware / tools / avr / bin /../ lib / gcc / avr / 5.4.0 /../../../../ avr / bin / ld. exe: C: Users Claudio AppData Local Temp aruino_build_739999 / Marlin - this_feature_good.ino.elf section `.text 'will not fit in region` text'

c: / program files (x86) / arduino / hardware / tools / avr / bin /../ lib / gcc / avr / 5.4.0 /../../../../ avr / bin / ld. exe: region `text 'overflowed by 1866 bytes

collect2.exe: error: ld returned 1 exit status


This happened after activating the Anet A6 display and deactivating the LCD2004.

Obviously given the low memory I performed the flash bootloader using ANET OPTIBOOT and reloaded the firmware.
If I deactivate the whole part of the 3DTouch, then the 12864 LCD display works properly, now I have 130&nbsp;kbit (about 16 kB) memory left.

Arduino warns me if I do not have enough memory. In this case, instead of those errors I do not know what they are for. Maybe using an older Marlin version would help?
To downsize the firmware you can manually disable a lot of less useful stuff. E.g. why have 2 pre-heating profiles for PLA and ABS while you can set hotend and heated bed manually. 

One of the largest memory savers is disabling arc support, G2/G3 commands aren't used by most slicer programs. From Configuration_adv.h can be found that you can save more than 3000 bytes:


//
// G2/G3 Arc Support
//
#define ARC_SUPPORT               // Disable this feature to save ~3226 bytes


You can probably find more features to disable to save memory, e.g. look into question "What can be removed from Marlin 1.1.9 to fit on 128K controller? I'm currently 318 bytes over", quoting:


//#define SHOW_BOOTSCREEN // enabled
//#define SHOW_CUSTOM_BOOTSCREEN // enabled
//#define CUSTOM_STATUS_SCREEN_IMAGE // enabled
//#define LCD_INFO_MENU // enabled, shows useless 'about printer' menu
//#define STATUS_MESSAGE_SCROLLING // enabled, saves some flash space
//#define DOGM_SD_PERCENT // disabled, show print % bar graph
//#define NO_WORKSPACE_OFFSETS // Disables M206 and M428
//#define ARC_SUPPORT // enabled, used for CNC toolpaths
#define NO_VOLUMETRICS // disabled, not used without width sensor?
//#define SCROLL_LONG_FILENAMES
#define SLIM_LCD_MENUS // Disable 'extraneous' menu items
//#define SPEAKER // Disable beeper if you don't want it.
//#define LEVEL_BED_CORNERS