Teensy++ and adafruit 128x32 i2c OLED

Status
Not open for further replies.
Hi,

I'm trying to get the Teensy++ to work with the adafruit 128x32 i2c OLED. Basically, I'm trying to get the example app working and driving the OLED. But i'm failing...

At first I was trying to get it to compile and had problems. So I had to change the #define in the SSD1306 cpp file...

Code:
   //#define SSD1306_128_64
   #define SSD1306_128_32

That was easy. Then next set of compile errors.

Code:
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Arduino: 1.0.5 (Mac OS X), Board: "Teensy++ 2.0"
Adafruit_GFX/Adafruit_GFX.cpp.o:(.rodata._ZTV12Adafruit_GFX+0x8): undefined reference to `__cxa_pure_virtual'

I found a fix for this here: http://playground.arduino.cc/OpenBSD/CLI . Not sure if that is even correct. but the thing compiles afterwards..

Code:
extern "C" void __cxa_pure_virtual(void) {
    while(1);
}

Ok. Then i've got the thing wired up like this..
teensyandoled.JPG

When I upload the code nothing happens. Maybe I'm doing something wrong? my compile fix? wiring? teensy++ 2.0 doesn't support this? Any ideas?

I also have the same thread going on over at adafruit. (This one is just more consolidated with all the difference stuff I tried.)
http://forums.adafruit.com/viewtopic.php?f=47&t=49307
 
The while(1) does not look like a good fix. Its an infinite loop. I suggest removing that fix, then doing what the error message suggested
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
and then posting both your code and the full error messages.

Also, check that the pins you have wired up are the pins actually used in the code (Adafruit SSD1306 uses bit-banged SPI, not native hardware SPI).
 
My copy of Adafruit_GFX.h has a couple of modifications based on earlier forum posts, for Teensy 3.0/3.1 compatibility as follows:
Code:
  // Use a proper constructor and destructor
  // http://forum.pjrc.com/threads/10-Adafruit-PCD8544-LCD-library?p=87&viewfull=1#post87
  virtual ~Adafruit_GFX() {} // force inclusion of vtable.
  void constructor(int16_t w, int16_t h);

  // this must be defined by the subclass; add "= 0" making  this base class method "pure virtual"
  virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0;
  virtual void invertDisplay(boolean i);

Confirming that I get the same error message when compiling the Adafruit examples for Teensy 2.0 or Teensy++ 2.0:
Code:
Arduino: 1.0.5 (Windows 7), Board: "Teensy++ 2.0"
F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy -IF:\Arduino\arduino-105-td117\libraries\Wire -IF:\Arduino\sketches\libraries\Adafruit_GFX -IF:\Arduino\sketches\libraries\Adafruit_SSD1306 C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\ssd1306_128x64_spi.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\ssd1306_128x64_spi.cpp.o 

ssd1306_128x64_spi.ino:37: warning: only initialized variables can be placed into program memory area
F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy -IF:\Arduino\arduino-105-td117\libraries\Wire -IF:\Arduino\sketches\libraries\Adafruit_GFX -IF:\Arduino\sketches\libraries\Adafruit_SSD1306 -IF:\Arduino\arduino-105-td117\libraries\Wire\utility F:\Arduino\arduino-105-td117\libraries\Wire\Wire.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Wire\Wire.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=-732517498 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy -IF:\Arduino\arduino-105-td117\libraries\Wire -IF:\Arduino\sketches\libraries\Adafruit_GFX -IF:\Arduino\sketches\libraries\Adafruit_SSD1306 -IF:\Arduino\arduino-105-td117\libraries\Wire\utility F:\Arduino\arduino-105-td117\libraries\Wire\utility\twi.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Wire\utility\twi.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=950625228 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy -IF:\Arduino\arduino-105-td117\libraries\Wire -IF:\Arduino\sketches\libraries\Adafruit_GFX -IF:\Arduino\sketches\libraries\Adafruit_SSD1306 -IF:\Arduino\sketches\libraries\Adafruit_GFX\utility F:\Arduino\sketches\libraries\Adafruit_GFX\glcdfont.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Adafruit_GFX\glcdfont.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy -IF:\Arduino\arduino-105-td117\libraries\Wire -IF:\Arduino\sketches\libraries\Adafruit_GFX -IF:\Arduino\sketches\libraries\Adafruit_SSD1306 -IF:\Arduino\sketches\libraries\Adafruit_GFX\utility F:\Arduino\sketches\libraries\Adafruit_GFX\Adafruit_GFX.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Adafruit_GFX\Adafruit_GFX.cpp.o 

In file included from F:\Arduino\sketches\libraries\Adafruit_GFX\Adafruit_GFX.cpp:17:
F:\Arduino\sketches\libraries\Adafruit_GFX\/glcdfont.c:9: warning: only initialized variables can be placed into program memory area
F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy -IF:\Arduino\arduino-105-td117\libraries\Wire -IF:\Arduino\sketches\libraries\Adafruit_GFX -IF:\Arduino\sketches\libraries\Adafruit_SSD1306 -IF:\Arduino\sketches\libraries\Adafruit_SSD1306\utility F:\Arduino\sketches\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Adafruit_SSD1306\Adafruit_SSD1306.cpp.o 

In file included from F:\Arduino\sketches\libraries\Adafruit_SSD1306\Adafruit_SSD1306.cpp:28:
F:\Arduino\sketches\libraries\Adafruit_GFX/glcdfont.c:9: warning: only initialized variables can be placed into program memory area
F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=657419067 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\keylayouts.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\keylayouts.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=1167075463 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\malloc.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\malloc.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=2047077695 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\pins_teensy.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\pins_teensy.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=989942791 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\usb.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\usb.c.o 

In file included from F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\usb.c:10:
F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\/../usb_midi/usb.c:119:50: warning: missing terminating ' character
F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=-1432889791 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\WInterrupts.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\WInterrupts.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -DSERIALNUM=-237597544 -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\wiring.c -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\wiring.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\HardwareSerial.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\HardwareSerial.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\IPAddress.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\IPAddress.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\main.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\main.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\new.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\new.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\Print.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Print.cpp.o 

F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\Print.cpp: In member function 'size_t Print::print(const __FlashStringHelper*)':
F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\Print.cpp:90: warning: '__progmem__' attribute ignored
F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\Stream.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Stream.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\Tone.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Tone.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\usb_api.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\usb_api.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\WMath.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\WMath.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_MIDI -DLAYOUT_UNITED_KINGDOM -IF:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy F:\Arduino\arduino-105-td117\hardware\teensy\cores\teensy\WString.cpp -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\WString.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\keylayouts.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\malloc.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\pins_teensy.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\usb.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\WInterrupts.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\wiring.c.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\HardwareSerial.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\IPAddress.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\main.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\new.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Print.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Stream.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Tone.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\usb_api.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\WMath.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-ar rcs C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\WString.cpp.o 

F:\Arduino\arduino-105-td117\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=at90usb1286 -o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\ssd1306_128x64_spi.cpp.elf C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\ssd1306_128x64_spi.cpp.o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Wire\Wire.cpp.o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Wire\utility\twi.c.o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Adafruit_GFX\glcdfont.c.o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Adafruit_GFX\Adafruit_GFX.cpp.o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\Adafruit_SSD1306\Adafruit_SSD1306.cpp.o C:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp\core.a -LC:\Users\Chris\AppData\Local\Temp\build1307873458293701812.tmp -lm 

Adafruit_GFX\Adafruit_GFX.cpp.o:(.rodata._ZTV12Adafruit_GFX+0xc): undefined reference to `__cxa_pure_virtual'
 
Last edited:
Thank you Nantonos.

You are right about me checking the pins. I double checked them and had the RESET pin connected to the wrong one. This is fixed now but still doesn't solve my compile problem since reverting back and removing my most best attempt at an infinite loop. :)

This is the verbose compile error...

Code:
Arduino: 1.0.5 (Mac OS X), Board: "Teensy++ 2.0"
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=at90usb1286 -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -DTEENSYDUINO=117 -felide-constructors -std=c++0x -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/Applications/Arduino.app/Contents/Resources/Java/hardware/teensy/cores/teensy -I/Applications/Arduino.app/Contents/Resources/Java/libraries/Wire -I/Users/KirkwoodWest/Documents/Arduino/libraries/Adafruit_GFX -I/Users/KirkwoodWest/Documents/Arduino/libraries/Adafruit_SSD1306 /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/ssd1306_128x32_i2c.cpp -o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/ssd1306_128x32_i2c.cpp.o 
ssd1306_128x32_i2c.ino:35: warning: only initialized variables can be placed into program memory area
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Wire/Wire.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Wire/utility/twi.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Adafruit_GFX/glcdfont.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Adafruit_GFX/Adafruit_GFX.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Adafruit_SSD1306/Adafruit_SSD1306.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/keylayouts.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/malloc.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/pins_teensy.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/usb.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/WInterrupts.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/wiring.c.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/HardwareSerial.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/IPAddress.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/main.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/new.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Print.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Stream.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Tone.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/usb_api.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/WMath.cpp.o
  Using previously compiled: /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/WString.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/keylayouts.c.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/malloc.c.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/pins_teensy.c.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/usb.c.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/WInterrupts.c.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/wiring.c.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/HardwareSerial.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/IPAddress.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/main.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/new.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Print.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Stream.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Tone.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/usb_api.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/WMath.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-ar rcs /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/WString.cpp.o 
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=at90usb1286 -o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/ssd1306_128x32_i2c.cpp.elf /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/ssd1306_128x32_i2c.cpp.o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Wire/Wire.cpp.o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Wire/utility/twi.c.o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Adafruit_GFX/glcdfont.c.o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Adafruit_GFX/Adafruit_GFX.cpp.o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/Adafruit_SSD1306/Adafruit_SSD1306.cpp.o /var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp/core.a -L/var/folders/vm/q8z0c6l51xn_g66qgl85xjm40000gn/T/build678860629001707857.tmp -lm 

Adafruit_GFX/Adafruit_GFX.cpp.o:(.rodata._ZTV12Adafruit_GFX+0x8): undefined reference to `__cxa_pure_virtual'

I'm not sure what hardware SPI vs bitbanged? but this is not the SPI board, it is the i2c board. http://www.adafruit.com/products/931

What code should i post? the full libraries and everything in 1 zip file? I'm new to this. Thanks in advance.

Our error message looks pretty much identical.
 
Paul just wanted to say thanks for your incredible support and swiftness on making sure your product works for me. Looks like it is now an issue with the OLED and will be following up with adafruit with this. THANK YOU!
 
Make sure that the OLED works with an Arduino before you assume that it is a faulty board. I had to port the Adafruit libraries when I started using the 128x64 OLED display on my Maple device. What I found was that everything worked fine if I used the "SPI" mode in the Adafruit libraries. The provided libraries simply bitbang SPI, and for whatever reason, it works fine unless I try to use hardware SPI with the thing, and then I get nothing.

I don't remember if they bitbanged the I2C as well, because I need the higher speed that SPI provides and I just commented out all the I2C nonsense in my port of the library.
 
I have personally tested Adafruit's SSD1306 library on Teensy 3.1 and Teensy++ 2.0. I can confirm the library works.
 
Indeed, you are correct sir. I forgot the preprocessor nonsense with regards to #ifdefs within the Arduino IDE, and forgot that I had to include the libraries in the main sketch. I have an ongoing project that is Arduino/Teensy/Maple capable and I just fixed the problem and the library appears to work fine. Disregard my last. /facepalm
 
Great. I'd be curious to see what you're working on, if it's available anywhere?

Relatively few people have done much comparison lately with Maple, so I'm really curious to hear how things are working between Teensy & Maple?
 
Relatively few people have done much comparison lately with Maple, so I'm really curious to hear how things are working between Teensy & Maple?

Indeed, and fewer people still develop for both. I have a few gripes, but this thread is not the place. I added them to my project's thread. The DAC addition is very nice, but I'm still anxiously awaiting the next ++ board that you put out. Having so many pins non-breadboard-friendly on the 3.0/3.1 is a bit of a bummer.
 
Status
Not open for further replies.
Back
Top