Arduino IDE 1.6.x errors…unit16_t doesn’t name a type

Quicky post about another goofy issue with the Arduino IDE 1.6.x

While preparing a couple of demos for the HackRVA Microcontroller night, I kept getting this error in the 1.6.x Arduino IDE:

uint16_t doesn’t name a type

Well, The GCC compiler that comes with the IDE enforces many things it never had and many things have been deprecated, including uint16_t. You need to declare it now:

typedef uint16_t PROGMEM prog_uint16_t

The reference below also says:

The typedef is only visible if the macro __PROG_TYPES_COMPAT__ has been defined before including <avr/pgmspace.h> (either by a define directive, or by a -D compiler option.)

uint8_t also generates the error, so a similar declaration can made for it as well.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s