Arduino 1.5.2 and the F() macro.

On v1.5.2 I get errors similar to... [from bad memory, as 1.5.2 does not run for me yet...]

'PSTR' not declared in this scope...

It looks to me as if using the F() macro would have brought that in.
Does the F() macro work for you on v1.5.2?

Forgot to say, that an #error directive (in my code) also triggered the 'PSTR' error instead of displaying the error message. No F() macro involved, this time.

In the porting of my code to run on the Due, I have brought in my own definitions to make things work. It would be nice if one of the low level system include files did this for us, like was done for mpide...

#if defined(__SAM3X8E__)
    #define PROGMEM
    #define pgm_read_byte(x)        (*((char *)x))
//  #define pgm_read_word(x)        (*((short *)(x & 0xfffffffe)))
    #define pgm_read_word(x)        ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x)))
    #define pgm_read_byte_near(x)   (*((char *)x))
    #define pgm_read_byte_far(x)    (*((char *)x))
//  #define pgm_read_word_near(x)   (*((short *)(x & 0xfffffffe))
//  #define pgm_read_word_far(x)    (*((short *)(x & 0xfffffffe)))
    #define pgm_read_word_near(x)   ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x)))
    #define pgm_read_word_far(x)    ( ((*((unsigned char *)x + 1)) << 8) + (*((unsigned char *)x))))
    #define PSTR(x)  x
  #if defined F
    #undef F
  #endif
  #define F(X) (X)
#endif

Hope that helps
Kurt

KurtE:
In the porting of my code to run on the Due, I have brought in my own definitions to make things work. It would be nice if one of the low level system include files did this for us [...]

Let's hope somebody hears you,
and I join the choir :wink:

Thank you.

Added an issue to remember this:

C

Thanks a lot.