This sketch:
doesn't work right on Teensy 3.1:
but works fine on Teensy 2.0:
This is with
Code:
class Foo {
public:
Foo();
};
Foo::Foo() {
Serial.println("Foo()");
}
void setup(void) {
Serial.begin(115200);
delay(5000);
}
void loop(void) {
static Foo foo = Foo();
Serial.println("loop");
delay(1000);
}
doesn't work right on Teensy 3.1:
Code:
Foo()
loop
Foo()
loop
Foo()
loop
but works fine on Teensy 2.0:
Code:
Foo()
loop
loop
loop
This is with
Code:
arm-none-eabi-gcc (PJRC Build of GNU Toolchain from CodeSourcery) 4.7.2