Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Build Issue Teensy 3.2: __AVR__ defined?

  1. #1

    Build Issue Teensy 3.2: __AVR__ defined?

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

    #ifdef __AVR__
      #define NEOGPS_PACKED_DATA
    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.

    Last edited by /dev; 09-07-2016 at 02:20 PM. Reason: title is 3.2!

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    I'm testing with Arduino 1.6.11 and Teensyduino 1.30, using this:

    void setup() {
    void loop() {
      Serial.print("define test: ");
    #ifdef __AVR__
      Serial.print("__AVR__ ");
    #ifdef __arm__
      Serial.print("__arm__ ");
    Here's what I see in the serial monitor when I upload to a Teensy 3.2.

    Click image for larger version. 

Name:	sc.png 
Views:	108 
Size:	20.3 KB 
ID:	8076

  3. #3
    Quote Originally Posted by PaulStoffregen View Post
    Here's what I see in the serial monitor when I upload to a Teensy 3.2.
    With a little more information, I determined it was an out-of-date header copy in the repo that did not have the guard.

    Thanks for checking,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts