NHD-4.3CTP-SHIELD-V - Examples still won't compile
Looking through old posts there was an issue with the FTD_801 examples compiling relating to an avr/gcc update in the past.
Well it seems a year later, there is now a new problem where even the "Hello World" example (or any of the others) won't compile. It seems a bit much to have to wade through the driver libraries with a basic problem such as this just to make the product work, and I am distinctly unimpressed. No care has been taken to keep the examples in step with Arduino updates. I have requested a return for the two displays I ordered and ordered a Nextion display instead, but it might be nice if libraries that compile with the latest development environments could be supplied, then I might consider using these displays for our current projects.
These are the errors that the compiler barfs out, looks like the code has major declaration problems. I tried to role back to an older IDE on the host Raspberry Pi I am using with the Arduino, but it doesn't work either.
In file included from HelloWorld.ino:30:0:
/usr/share/arduino/libraries/FTDI_FT801/FT_NHD_43CTP_SHIELD.h:44:37: error: conflicting declaration ‘typedef const unsigned char prog_uchar’
typedef PROGMEM const unsigned char prog_uchar;
^
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0,
from /usr/share/arduino/libraries/SPI/SPI.h:15,
from HelloWorld.ino:26:
/usr/lib/avr/include/avr/pgmspace.h:351:23: note: previous declaration as ‘typedef unsigned char prog_uchar’
typedef unsigned char prog_uchar __attribute__((__progmem__,deprecated("prog_uchar type is deprecated.")));
^
In file included from HelloWorld.ino:30:0:
/usr/share/arduino/libraries/FTDI_FT801/FT_NHD_43CTP_SHIELD.h:45:28: error: conflicting declaration ‘typedef const char prog_char’
typedef PROGMEM const char prog_char;
^
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0,
from /usr/share/arduino/libraries/SPI/SPI.h:15,
from HelloWorld.ino:26:
/usr/lib/avr/include/avr/pgmspace.h:350:14: note: previous declaration as ‘typedef char prog_char’
typedef char prog_char __attribute__((__progmem__,deprecated("prog_char type is deprecated.")));
^
In file included from HelloWorld.ino:30:0:
/usr/share/arduino/libraries/FTDI_FT801/FT_NHD_43CTP_SHIELD.h:46:36: error: conflicting declaration ‘typedef const unsigned int prog_uint16_t’
typedef PROGMEM const unsigned int prog_uint16_t;
^
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0,
from /usr/share/arduino/libraries/SPI/SPI.h:15,
from HelloWorld.ino:26:
/usr/lib/avr/include/avr/pgmspace.h:355:19: note: previous declaration as ‘typedef uint16_t prog_uint16_t’
typedef uint16_t prog_uint16_t __attribute__((__progmem__,deprecated("prog_uint16_t type is deprecated.")));
^
In file included from HelloWorld.ino:30:0:
/usr/share/arduino/libraries/FTDI_FT801/FT_NHD_43CTP_SHIELD.h:47:37: error: conflicting declaration ‘typedef const long unsigned int prog_uint32_t’
typedef PROGMEM const unsigned long prog_uint32_t;
^
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0,
from /usr/share/arduino/libraries/SPI/SPI.h:15,
from HelloWorld.ino:26:
/usr/lib/avr/include/avr/pgmspace.h:357:19: note: previous declaration as ‘typedef uint32_t prog_uint32_t’
typedef uint32_t prog_uint32_t __attribute__((__progmem__,deprecated("prog_uint32_t type is deprecated.")));
^
In file included from /usr/share/arduino/libraries/FTDI_FT801/FT_NHD_43CTP_SHIELD.h:73:0,
from HelloWorld.ino:30:
/usr/share/arduino/libraries/FTDI_FT801/libraries/FT_GC/FT_GC.h:372:71: error: redeclaration of ‘FT_Status FT_GC<FT_Trans>::Init(uint8_t, uint16_t)’ may not have default arguments [-fpermissive]
FT_Status FT_GC<FT_Trans>::Init(uint8_t ResType, uint16_t options1 = 0)
^
In file included from /usr/share/arduino/libraries/FTDI_FT801/FT_NHD_43CTP_SHIELD.h:73:0,
from HelloWorld.ino:30:
/usr/share/arduino/libraries/FTDI_FT801/libraries/FT_GC/FT_GC.h:410:258: error: redeclaration of ‘FT_Status FT_GC<FT_Trans>::Init(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint8_t, uint8_t, uint8_t, uint16_t)’ may not have default arguments [-fpermissive]
FT_Status FT_GC<FT_Trans>::Init(uint16_t hperiod,uint16_t vperiod,uint16_t hfrontporch,uint16_t hbackporch,uint16_t hpulsewidth,uint16_t vfrontporch,uint16_t vbackporch,uint16_t vpulsewidth,uint8_t polarity,uint8_t swizzle,uint8_t fps, uint16_t options1 = 0)
^
In file included from /usr/share/arduino/libraries/FTDI_FT801/FT_NHD_43CTP_SHIELD.h:74:0,
from HelloWorld.ino:30:
/usr/share/arduino/libraries/FTDI_FT801/libraries/FT_GC/FT801/FT801Impl.h:124:73: error: redeclaration of ‘FT_Status FT801Impl<FT_Trans>::Init(uint8_t, uint16_t)’ may not have default arguments [-fpermissive]
FT_Status FT801Impl<FT_Trans>::Init(uint8_t ResType, uint16_t options1=0)
^
/usr/share/arduino/libraries/FTDI_FT801/libraries/FT_GC/FT801/FT801Impl.h:133:71: error: redeclaration of ‘FT_Status FT801Impl<FT_Trans>::Init(uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint16_t, uint8_t, uint8_t, uint8_t, uint16_t)’ may not have default arguments [-fpermissive]
uint8_t polarity,uint8_t swizzle,uint8_t fps,uint16_t options1=0)
^
-
Morning Peter,
I’m sorry to hear about the trouble you are having with the NHD-4.3CTP-SHIELD.
As stated previously the FT80x library was originally written with the old IDE, and since then the avr-gcc compiler has changed and certain keywords/datatypes give errors in the new Arduino IDE’s.
Please note that the FTDI_FT800 & FTDI_FT801 Libraries were updated back in February (of 2017) on our GitHub page:
https://github.com/NewhavenDisplay/FTDI_FT800
https://github.com/NewhavenDisplay/FTDI_FT801
The code successfully complies on version 1.8.1 - 1.8.5 (latest release)
I verified correct operation this morning using an Arduino Uno and the NHD-4.3CTP-SHIELD-V (Arduino V. 1.8.5).0 -
Can you please check which Arduino IDE version you have installed?
Second, it might be worth trying a fresh install of the latest Arduino IDE:
Arduino files are found in 3 locations: The installation folder, the sketchbook folder, and the Arduino15 folder. The installation folder should be removed when you uninstall but the other two folders remain so you will need to remove those also to get a completely clean install. The Arduino15 folder is located at:
On Mac OS X:
/Users/(username)/Library/Arduino15
On Windows:
Arduino IDE 1.6.5r5 and previous:
C:\Users\(username)\AppData\Roaming\Arduino15
Arduino IDE 1.6.6 and later:
C:\Users\(username)\AppData\Local\Arduino15
On Linux:
/home/(username)/.arduino15 (a.k.a. ~/.arduino15)
If you delete this folder then you will need to reinstall any Boards you have installed using Boards Manager after you reinstall the Arduino IDE.
The sketchbook folder location is set in File > Preferences if you have any sketches or libraries that you want to save in there then back them up before removing it.
If you have any questions, please feel free to contact me.0 -
Hi Paul,
I am running Arduino IDE 2.1.0.5, the latest version, it doesn't compile.
I won't roll back to the 1.8 version since 2.1.0.5 is the latest repo provided version by apt-get and uninstalling this and installing from source is bad practice.
I have requested an RMA from Mouser.co.uk (my supplier) but they are being awkward.
All told a bad experience so far, but on the plus side our Nextion prototypes are working very well indeed!
Pete.0
Please sign in to leave a comment.
Comments
3 comments