NHD-4.3CTP-Shield -- Hello world example compilation fails

Comments

15 comments

  • Paul_B
    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
  • Tim_Cole
    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
  • Tim_Cole
    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
  • Paul_B
    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
  • Tim_Cole
    Gotta love changes that break existing code....
    0
  • ThomasLenz
    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,
    Thomas
    0
  • Tim_Cole
    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
  • Paul_B

    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_t

    For your reference I have emailed you an example sketch which I have updated to compile on version 1.6.13.

    0
  • Tim_Cole
    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, Tim
    0
  • Paul_B
    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
  • Tim_Cole
    Thanks very much for this.
    0
  • towo
    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
    Toby
    0
  • Ted M.
    NHD Staff
    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
  • towo

    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 1

     

     

     

    0
  • Ted M.
    NHD Staff
    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.