Author Topic: Adafruit SSD1131 0.96" mini Color OLED library not compiling  (Read 2560 times)

gotnull

  • RFduino Jr. Member
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Adafruit SSD1131 0.96" mini Color OLED library not compiling
« on: September 08, 2014, 11:51:20 PM »
I'm trying to compile the following Adafruit Library:

https://learn.adafruit.com/096-mini-color-oled?view=all

When I compile for Arduino Uno it compiles successfully, however when I compile for RFduino I get the following error stack:

Code: [Select]
Arduino: 1.5.7 (Mac OS X), Board: "RFduino"

Build options changed, rebuilding all
Using library Adafruit_GFX in folder: /Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX (legacy)
Using library Adafruit_SSD1131 in folder: /Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 (legacy)
Using library SD in folder: /Applications/Arduino.app/Contents/Resources/Java/libraries/SD
Using library SPI in folder: /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI (legacy)

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/bmp.cpp -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/bmp.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-gcc -c -g -Os -w -ffunction-sections -fdata-sections -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/glcdfont.c -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/Adafruit_GFX/glcdfont.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/Adafruit_GFX.cpp -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/Adafruit_GFX/Adafruit_GFX.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/Adafruit_SSD1131/Adafruit_SSD1331.cpp.o
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:26:28: fatal error: wiring_private.h: No such file or directory
 #include "wiring_private.h"
                            ^
compilation terminated.

gotnull

  • RFduino Jr. Member
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Adafruit SSD1131 0.96" mini Color OLED library not compiling
« Reply #1 on: September 09, 2014, 12:00:32 AM »
If I include wiring_private.h

I then get the following error:

Arduino: 1.5.7 (Mac OS X), Board: "RFduino"

Code: [Select]
Using library Adafruit_GFX in folder: /Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX (legacy)
Using library Adafruit_SSD1131 in folder: /Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 (legacy)
Using library SD in folder: /Applications/Arduino.app/Contents/Resources/Java/libraries/SD
Using library SPI in folder: /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI (legacy)

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/bmp.cpp -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/bmp.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-gcc -c -g -Os -w -ffunction-sections -fdata-sections -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/glcdfont.c -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/Adafruit_GFX/glcdfont.c.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX/Adafruit_GFX.cpp -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/Adafruit_GFX/Adafruit_GFX.cpp.o
/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/gcc-arm-none-eabi-4.8.3-2014q1/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fno-builtin -mcpu=cortex-m0 -DF_CPU=16000000 -DARDUINO=157 -mthumb -D__RFduino__ -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/cores/arduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/variants/RFduino -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_GFX -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131 -I/Applications/Arduino.app/Contents/Resources/Java/libraries/SD/src -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/libraries/SPI -I/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/utility -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/RFduino/Include -I/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/RFduino/system/CMSIS/CMSIS/Include /Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp -o /var/folders/b6/pnpkh4cd7dj0xcbygbdw9mph0000gn/T/build7833560675983563968.tmp/Adafruit_SSD1131/Adafruit_SSD1331.cpp.o
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp: In member function 'void Adafruit_SSD1331::spiwrite(uint8_t)':
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:46:22: error: '_BV' was not declared in this scope
         if (c & _BV(i)) {
                      ^
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp: In member function 'void Adafruit_SSD1331::begin()':
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:287:64: error: 'digitalPinToPort' was not declared in this scope
         sclkportreg = portOutputRegister(digitalPinToPort(_sclk));
                                                                ^
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:287:65: error: 'portOutputRegister' was not declared in this scope
         sclkportreg = portOutputRegister(digitalPinToPort(_sclk));
                                                                 ^
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:288:44: error: 'digitalPinToBitMask' was not declared in this scope
         sclkpin = digitalPinToBitMask(_sclk);
                                            ^
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:302:36: error: 'digitalPinToBitMask' was not declared in this scope
     cspin = digitalPinToBitMask(_cs);
                                    ^
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:303:56: error: 'digitalPinToPort' was not declared in this scope
     csportreg = portOutputRegister(digitalPinToPort(_cs));
                                                        ^
/Users/fulvio/Documents/Arduino/libraries/Adafruit_SSD1131/Adafruit_SSD1331.cpp:303:57: error: 'portOutputRegister' was not declared in this scope
     csportreg = portOutputRegister(digitalPinToPort(_cs));
                                                         ^

gotnull

  • RFduino Jr. Member
  • **
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: Adafruit SSD1131 0.96" mini Color OLED library not compiling
« Reply #2 on: September 09, 2014, 09:38:56 PM »
I was wondering whether anyone knows how best to replace the following methods to just use digitalWrite instead of the standard Arduino macros?

Code: [Select]
digitalPinToPort
digitalPinToBitMask

Used in this method alone:

Code: [Select]
if (_sclk) {
    pinMode(_sclk, OUTPUT);
    sclkportreg = portOutputRegister(digitalPinToPort(_sclk));
    sclkpin = digitalPinToBitMask(_sclk);
   
    pinMode(_sid, OUTPUT);
    sidportreg = portOutputRegister(digitalPinToPort(_sid));
    sidpin = digitalPinToBitMask(_sid);
} else {
    // using the hardware SPI
    SPI.begin();
    SPI.setDataMode(SPI_MODE3);
}

// Toggle RST low to reset; CS low so it'll listen to us
pinMode(_cs, OUTPUT);
digitalWrite(_cs, LOW);
cspin = digitalPinToBitMask(_cs);
csportreg = portOutputRegister(digitalPinToPort(_cs));

rspin = digitalPinToBitMask(_rs);
rsportreg = portOutputRegister(digitalPinToPort(_rs));

 

anything