0

Errors compiling graphicstest for HX8357D on Mega 2560
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Errors compiling graphicstest for HX8357D on Mega 2560

by Zwannie03 on Tue Dec 24, 2019 8:00 am

I have bought an Adafruit HX8357D TFT Touch screen and connected it as shown in the step-by-step tutorial.
The IDE (v 1.8.10) and Adafruit libraries (GFX v 1.7.2, TFTLCD v 1.0.0) are updated to the latest version.
When compiling the graphicstest from the Adafruit_TFTLCD library though, the compiler returns notes, warnings and errors:

Code: Select all | TOGGLE FULL SIZE
Arduino:1.8.10 (Windows 10), Board:"Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:19:0:

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\pin_magic.h:282:33: warning: backslash and newline separated by space

   #define read8inline(result) { \

                                 

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:803:0: warning: "read8" redefined

   #define read8(x) x=read8fn()

 

In file included from C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:19:0:

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\pin_magic.h:183:0: note: this is the location of the previous definition

   #define read8             read8inline

 

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp: In member function 'void Adafruit_TFTLCD::init()':

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:115:3: error: 'textsize' was not declared in this scope

   textsize  = 1;

   ^~~~~~~~

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:115:3: note: suggested alternative: 'textsize_x'

   textsize  = 1;

   ^~~~~~~~

   textsize_x

In file included from C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:19:0:

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp: In member function 'void Adafruit_TFTLCD::begin(uint16_t)':

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\pin_magic.h:401:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]

   hi = (d) >> 8; lo = (d); CD_DATA   ; write8(hi); write8(lo); }

                         ^

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\pin_magic.h:187:29: note: in expansion of macro 'writeRegister16inline'

   #define writeRegister16   writeRegister16inline

                             ^~~~~~~~~~~~~~~~~~~~~

C:\Program Files (x86)\Arduino\libraries\Adafruit_TFTLCD\Adafruit_TFTLCD.cpp:283:5: note: in expansion of macro 'writeRegister16'

     writeRegister16(ILI9341_VCOMCONTROL1, 0x2B2B);

     ^~~~~~~~~~~~~~~

Multiple libraries found for "Adafruit_GFX.h"
Used: C:\Users\dzwan\Documents\Arduino\libraries\Adafruit_GFX_Library
Multiple libraries found for "Adafruit_TFTLCD.h"
Used: C:\Program
Not used: C:\Users\dzwan\Documents\Arduino\libraries\TFTLCD-Library-master
Multiple libraries found for "SPI.h"
Used: C:\Users\dzwan\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.2\libraries\SPI
exit status 1
Error compiling for board Arduino Mega or Mega 2560
(The last 9 lines were manually translated)

The real show stopper here is the error in Adafruit_LCDTFT.cpp regarding the variable 'textsize'.

Is this a bug in the Adafruit_TFTLCD.cpp file, am I forgetting to include another library or am I overseeing something else?

Thanks for your help!

Zwannie03
 
Posts: 2
Joined: Tue Dec 24, 2019 7:16 am

Re: Errors compiling graphicstest for HX8357D on Mega 2560

by Zwannie03 on Sun Dec 29, 2019 6:40 am

Used the solution from an earlier post https://forum.arduino.cc/index.php?topic=622880.0

Rolled the Adafruit_gfx library back to version 1.5.3

Zwannie03
 
Posts: 2
Joined: Tue Dec 24, 2019 7:16 am

Please be positive and constructive with your questions and comments.