NHD-4.3CTP-Shield -- Hello world example compilation fails
Greeting folks
It looks like I've fixed my library installation finger trouble, which has moved me ahead to another problem. I've started with the venerable "Hello, world" example. Compiling produces the following errors, copied from the IDE with the "Copy error messages" button.
Help!
----
Arduino: 1.6.12 (Windows 10), Board: "Arduino/Genuino Uno"
WARNING: Category '' in library OneWire is not valid. Setting to 'Uncategorized'
In file included from C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/FT_NHD_43CTP_SHIELD.h:67:0,
from C:\Program Files (x86)\Arduino\libraries\FTDI_FT801\examples\FT_NHD_43CTP_SHIELD\Basic\HelloWorld\HelloWorld.ino:30:
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_Transport_SPI/FT_Transport_SPI.h:215:37: error: 'prog_uchar' has not been declared
void Writefromflash(uint32_t Addr, prog_uchar *Src, uint32_t NBytes)
^
In file included from C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/FT_NHD_43CTP_SHIELD.h:68:0,
from C:\Program Files (x86)\Arduino\libraries\FTDI_FT801\examples\FT_NHD_43CTP_SHIELD\Basic\HelloWorld\HelloWorld.ino:30:
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:330:32: error: 'prog_uchar' has not been declared
FT_GEStatus WriteCmdfromflash(prog_uchar *Src,uint32_t NBytes);
^
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:334:35: error: 'prog_uchar' has not been declared
FT_GEStatus TransferCmdfromflash(prog_uchar *Src,uint32_t NBytes);
^
C:\Program Files (x86)\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 C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/FT_NHD_43CTP_SHIELD.h:68:0,
from C:\Program Files (x86)\Arduino\libraries\FTDI_FT801\examples\FT_NHD_43CTP_SHIELD\Basic\HelloWorld\HelloWorld.ino:30:
C:\Program Files (x86)\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)
^
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1670:52: error: 'FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash' is not a static member of 'class FT_GC<FT_Trans>'
FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1670:52: error: template definition of non-template 'FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash'
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1670:52: error: 'prog_uchar' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1670:64: error: 'Src' was not declared in this scope
FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1670:77: error: expected primary-expression before 'NBytes'
FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1780:49: error: 'FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash' is not a static member of 'class FT_GC<FT_Trans>'
FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1780:49: error: template definition of non-template 'FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash'
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1780:49: error: 'prog_uchar' was not declared in this scope
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1780:61: error: 'Src' was not declared in this scope
FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/libraries/FT_GC/FT_GC.h:1780:74: error: expected primary-expression before 'NBytes'
FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
In file included from C:\Program Files (x86)\Arduino\libraries\FTDI_FT801/FT_NHD_43CTP_SHIELD.h:69:0,
from C:\Program Files (x86)\Arduino\libraries\FTDI_FT801\examples\FT_NHD_43CTP_SHIELD\Basic\HelloWorld\HelloWorld.ino:30:
C:\Program Files (x86)\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)
^
C:\Program Files (x86)\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)
^
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.
-
Morning Tim,
Can you please try installing version 1.0.6 of the Arduino IDE?
https://www.arduino.cc/en/Main/OldSoftwareReleases
It appears there was a change in the syntax, I'll look into this change further and provide a fix.0 -
I'll give it it a shot on a laptop I don't normally use for programming. Call me paranoid, but I don't want to muck up my existing setup. 0 -
Okay, I just installed the Arduino 1.0.6 IDE on my laptop, installed the FTDI 800/801 library and compiled the HelloWorld example. That worked properly. So, something got broken between 1.0.6 and 1.6.12. 0 -
Glad to hear you are up and running! The 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. 0 -
Gotta love changes that break existing code.... 0 -
Hello,
i just got my new NHD-4.3-Shield-Display, loaded the FTDI-801-Library into the actual
Arduino-IDE and get the same errors as Tim_Cole in every single demo-program.
Where can I find the correct 801-library für the actual Arduino-IDE ?
Downgrading to an old IDE (1.0.6) is not an accaptable solution.
Best regards,
Thomas0 -
I've looked over the FTDI website and found nothing. As nearly as I can tell, a major revision to the GCC-AVR compiler broke this code after 1.5.6.
There doesn't seem to be a solution from FTDI, and it would appear that Newhaven is doing little more than repackaging the FTDI code. This isn't a good situation, and I'm annoyed with the lack of response.0 -
Morning Tim,
I’m sorry to hear about the trouble you are having with the FTDI_FT80x library. 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. We are in the process of updating the library and will be putting in a pull request soon on our GitHub page.
In order to get the code to compile the datatypes will need to be updated to match the new Arduino IDE's syntax.
Example:Old Syntax:
typedef prog_uchar ft_prog_uchar8_t;
typedef prog_char ft_prog_char8_t;
typedef prog_uint16_t ft_prog_uint16_t;
New Syntax:
typedef const unsigned char ft_prog_uchar8_t;
typedef const char ft_prog_char8_t;
typedef const unsigned int ft_prog_uint16_tFor your reference I have emailed you an example sketch which I have updated to compile on version 1.6.13.
0 -
Hi Paul,
Thanks for this. I got this message via e-mail and downloaded the zip file. I'll look it over later today.
It certainly looks as though updating the syntax is time-consuming and tedious job. You really have to wonder why the avr-gcc gurus didn't provide some kind of backward compatibility switch, even if it resulted in blaring warnings about deprecated features.
Regards, Tim0 -
Please see the updated FTDI_FT800 & FTDI_FT801 libraries available for download now on our GitHub page! The code successfully complies on version 1.8.1
https://github.com/newhavendisplay
Best Regards,0 -
Thanks very much for this. 0 -
Hi,
I do have the same issues as Tim by using the arduino IDE 1.8.7
Does anyone have an idea how to solve this issue?
BR
Toby0 -
Hi Toby,
Please let us know the sketch file you're testing and describe the errors you see after the compile fails.
Also, be sure to use the FTDI_FT801 library file located on our Github link https://github.com/NewhavenDisplay/FTDI_FT801
I just test compiled the HelloWorld sketch from that library using version 1.8.10 of the Arduino IDE on Windows 10 and it completed without errors.
Regards,0 -
Hi Ted,
thanks for you fast reply.
I am using the Hello World script from this link:
https://github.com/NewhavenDisplay/FTDI_FT801/blob/master/examples/FT_VM801B43/Basic/HelloWorld/HelloWorld.ino
The message during compiling looks like this:Arduino: 1.8.7 (Windows 10), Board: "Arduino/Genuino Uno"
In file included from C:\Users\******\Documents\Arduino\libraries\FTDI_FT801-master/FT_VM801B43.h:64:0,
from C:\Users\*****\Documents\Arduino\libraries\FTDI_FT801-master\examples\FT_VM801B43\Basic\HelloWorld\HelloWorld.ino:30:
C:\Users\******\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_Transport_SPI/FT_Transport_SPI.h:215:37: error: 'prog_uchar' has not been declared
void Writefromflash(uint32_t Addr, prog_uchar *Src, uint32_t NBytes)
^
In file included from C:\Users\******\Documents\Arduino\libraries\FTDI_FT801-master/FT_VM801B43.h:65:0,
from C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master\examples\FT_VM801B43\Basic\HelloWorld\HelloWorld.ino:30:
C:\Users\*******\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:330:32: error: 'prog_uchar' has not been declared
FT_GEStatus WriteCmdfromflash(prog_uchar *Src,uint32_t NBytes);
^
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:334:35: error: 'prog_uchar' has not been declared
FT_GEStatus TransferCmdfromflash(prog_uchar *Src,uint32_t NBytes);
^
In file included from C:\Users\******\Documents\Arduino\libraries\FTDI_FT801-master/FT_VM801B43.h:65:0,
from C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master\examples\FT_VM801B43\Basic\HelloWorld\HelloWorld.ino:30:
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1670:52: error: 'FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash' is not a static data member of 'class FT_GC<FT_Trans>'
FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1670:52: error: template definition of non-template 'FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash'
C:\Users\*******\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1670:52: error: 'prog_uchar' was not declared in this scope
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1670:64: error: 'Src' was not declared in this scope
FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1670:77: error: expected primary-expression before 'NBytes'
FT_GEStatus FT_GC<FT_Trans>::TransferCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1780:49: error: 'FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash' is not a static data member of 'class FT_GC<FT_Trans>'
FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Users\******\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1780:49: error: template definition of non-template 'FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash'
C:\Users\*******\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1780:49: error: 'prog_uchar' was not declared in this scope
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1780:61: error: 'Src' was not declared in this scope
FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
C:\Users\********\Documents\Arduino\libraries\FTDI_FT801-master/libraries/FT_GC/FT_GC.h:1780:74: error: expected primary-expression before 'NBytes'
FT_GEStatus FT_GC<FT_Trans>::WriteCmdfromflash( prog_uchar *Src,uint32_t NBytes)
^
exit status 10 -
Hi Toby,
Try this version of the Hello World script:
https://github.com/NewhavenDisplay/FTDI_FT801/tree/master/examples/FT_NHD_43CTP_SHIELD/Basic/HelloWorld
Sorry for the confusion as the code for the FTDI demo board VM801B43 is also included on our Github page, but only as a reference.
Regards,0
Please sign in to leave a comment.
Comments
15 comments