Build Issue Teensy 3.2: __AVR__ defined?

Status
Not open for further replies.

/dev

New member
I got a bug report that seems to indicate that __AVR__ is defined for the Teensy 3.2 builds. This define is not guarded:

Code:
#ifdef __AVR__
  #define NEOGPS_PACKED_DATA
#endif
A build for the Due seems to work correctly. Is __AVR__ supposed to be defined? I guess I assumed that it was the indicator for the 8-bit family of processors. This post might be related.

Cheers,
/dev
 
Last edited:
I'm testing with Arduino 1.6.11 and Teensyduino 1.30, using this:

Code:
void setup() {
}

void loop() {
  Serial.print("define test: ");
#ifdef __AVR__
  Serial.print("__AVR__ ");
#endif
#ifdef __arm__
  Serial.print("__arm__ ");
#endif
  Serial.println();
  delay(100);
}

Here's what I see in the serial monitor when I upload to a Teensy 3.2.

sc.png
 
Status
Not open for further replies.
Back
Top