Nextion Issue

I am using Arduino IDE, Uno, and a Nextion enhanced 2.8" display. Everything is working great until I try to create a NexCheckbox.

EDIT: After further investigation checkbox is not the issue. When I add a 19th Nex component of any kind it fails to compile. Is there some kind of limit to the number of items I can add into code? Thanks for any guidance you can send me with.

This is the error message I get:


Arduino: 1.8.9 (Windows Store (Windows 10), Board: “Arduino/Genuino Uno”

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\Print.cpp: In function ‘println.constprop’:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino\Print.cpp:143:1: internal compiler error: Segmentation fault



Please submit a full bug report,

with preprocessed source if appropriate.

See for instructions.

lto-wrapper.exe: fatal error: C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.21.0_x86__mdqgnx93n4wtt\hardware\tools\avr/bin/avr-gcc returned 1 exit status

compilation terminated.

c:/program files/windowsapps/arduinollc.arduinoide_1.8.21.0_x86__mdqgnx93n4wtt/hardware/tools/avr/bin/…/lib/gcc/avr/5.4.0/…/…/…/…/avr/bin/ld.exe: error: lto-wrapper failed

collect2.exe: error: ld returned 1 exit status

exit status 1
Error compiling for board Arduino/Genuino Uno.

This report would have more information with
“Show verbose output during compilation”
option enabled in File → Preferences.


Here is my code:


#include <doxygen.h>
#include <NexButton.h>
#include <NexCheckbox.h>
#include <NexConfig.h>
#include <NexCrop.h>
#include <NexDualStateButton.h>
#include <NexGauge.h>
#include <NexGpio.h>
#include <NexHardware.h>
#include <NexHotspot.h>
#include <NexNumber.h>
#include <NexObject.h>
#include <NexPage.h>
#include <NexPicture.h>
#include <NexProgressBar.h>
#include <NexRadio.h>
#include <NexRtc.h>
#include <NexScrolltext.h>
#include <NexSlider.h>
#include <NexText.h>
#include <NexTimer.h>
#include <Nextion.h>
#include <NexTouch.h>
#include <NexUpload.h>
#include <NexVariable.h>
#include <NexWaveform.h>

SoftwareSerial HMISerial(10, 11);
//DEFINE HMI ELEMENTS///////////////////////////
NexNumber keypad0 = NexNumber(1, 2, “keypad0”);
NexNumber keypad1 = NexNumber(1, 5, “keypad1”);
NexNumber keypad2 = NexNumber(1, 6, “keypad2”);
NexNumber keypad3 = NexNumber(1, 7, “keypad3”);
NexNumber keypad4 = NexNumber(1, 8, “keypad4”);
NexNumber keypad5 = NexNumber(1, 9, “keypad5”);
NexNumber keypad6 = NexNumber(1, 10, “keypad6”);
NexNumber keypad7 = NexNumber(1, 11, “keypad7”);
NexNumber keypad8 = NexNumber(1, 12, “keypad8”);
NexNumber keypad9 = NexNumber(1, 13, “keypad9”);
NexText keypadE = NexText(1, 4, “keypadE”);
NexText keypadDot = NexText(1, 3, “keypadDot”);
NexText keypadNum = NexText(1, 17, “keypadNum”);
NexNumber nexStageNumber = NexNumber(0, 4, “nexStageNumber”);
NexText nexMaxBoostText = NexText(0, 15, “nexMaxBoostText”);
NexText nexWidebandText = NexText(0, 11, “nexWidebandText”);
NexText nexFuelPSIText = NexText(0, 14, “nexFuelPSIText”);
NexButton nexResetButton = NexButton(0, 7, “nexResetButton”);
NexCheckbox c01 = NexCheckbox(2, 3, “c01”);


I think I have found a partial solution to my issue. Instead of the ITEAD libraries I am using another version created by another user and it compiles with up to 84 items:

I need to use about a hundred. Anybody run into this?