🎁📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Please place all UPS 2 Day orders by 11am Monday, December 16 📦❄️📬🎁
0

Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 13, 2019 1:38 am

Hi,

I would really like to use my new Adafruit 0.96" OLED display with my brand new Arduino Nano 33 BLE board. I had no trouble connecting the Display to a normal Arduino Nano and the ItsyBitsy M0, but it fails to compile on the new Nano 33. I know that the Nano 33 uses a different chipset, and guess that's causing the problem.

One of the required includes for the OLED display is: #include <Adafruit_SPIFlash.h>

If I try to compile with a basically blank sketch and just the include, it throws a long list of errors:

Code: Select all | TOGGLE FULL SIZE
In file included from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/_default_fcntl.h:200:0,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/fcntl.h:4,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/fcntl.h:1,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatApiConstants.h:30,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatFile.h:36,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/ArduinoFiles.h:33,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatLib.h:27,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/SdFat.h:33,
                 from /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_SPIFlash/src/Adafruit_SPIFlash.h:35,
                 from /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_ImageReader_Library/Adafruit_ImageReader.h:19,
                 from /Users/chrisdonica/Documents/Arduino/Test/Test.ino:4:
/Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/stat.h:27:8: error: redefinition of 'struct stat'
 struct stat
        ^~~~
In file included from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/platform/mbed_error.h:28:0,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/Queue.h:28,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/Mail.h:28,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/rtos.h:33,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/mbed.h:23,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/Arduino.h:32,
                 from sketch/Test.ino.cpp:1:
/Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/platform/mbed_retarget.h:500:8: note: previous definition of 'struct stat'
 struct stat {
        ^~~~

And after that there are lots of warnings about multiple libraries being found:

Code: Select all | TOGGLE FULL SIZE
Multiple libraries were found for "Adafruit_ImageReader.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_ImageReader_Library
Multiple libraries were found for "Adafruit_SPITFT.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_GFX_Library
Multiple libraries were found for "SPI.h"
 Used: /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/libraries/SPI
Multiple libraries were found for "Adafruit_SPIFlash.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_SPIFlash
Multiple libraries were found for "SdFat.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master
exit status 1
Error compiling for board Arduino Nano 33 BLE.

The exact same errors are thrown if I compile with: #include <Adafruit_SPIFlash.h>

Is there some way to fix this? I am not sure where the error lies... with the Adafruit libraries or the Nano 33 BLE core libraries (which admittedly are much newer and untested). I feel like an #IFDEF (or equivalent) around the re-declared "struct stat" could solve it, but this is outside my wheelhouse.

Thank you.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 13, 2019 2:51 pm

Quick edit...

The two Adafruit libraries I am not able to compile on the Nano 33 BLE board are:

#include <Adafruit_ImageReader.h>
#include <Adafruit_SPIFlash.h>

I think the ImageReader one is the one I need to work the most.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Tue Nov 19, 2019 3:04 pm

I am bumping this again because no one has replied...

Basic question: are the 0.96" OLED displays compatible with the Arduino Nano 33 BLE ? Because for me the library will not compile (as detailed above) in the Arduino IDE 1.8.10.

Can someone from Adafruit confirm this for me? (That the product is not compatible with this newish Arduino board.)

Since this really seems to be a software issue at heart (a re-declared variable) I am REALLY hoping someone at Adafruit (probably the person who wrote the Adafruit_ImageReader.h and Adafruit_SPIFlash.h libraries) can chime in on this. If you can give me a direct contact person to ask for help, I'd be happy to ask them myself.

Thanks.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by adafruit_support_carter on Tue Nov 19, 2019 3:17 pm


adafruit_support_carter
 
Posts: 13681
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Tue Nov 19, 2019 5:06 pm

Hi, thank you for the reply,

I am using the Color version:

https://www.adafruit.com/product/684

They are awesome little devices. I have three hooked up to a Nano, but am running out of pins, so am going to the Nano 33 BLE, cause I also want the BLE and the IMU, and since those are integrated, less external pins are necessary. (I really want 5 of the OLED screens connected to the board when I'm done!)

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by adafruit_support_carter on Tue Nov 19, 2019 5:35 pm

I just did a test compile of the example from the library:
https://github.com/adafruit/Adafruit-SS ... t/test.ino
for a target board of "Arduino Nano 33 BLE" and it built without errors. More info:
https://learn.adafruit.com/096-mini-col ... tware-3-12

Can you try compiling that same sketch and see what you get.

adafruit_support_carter
 
Posts: 13681
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Tue Nov 19, 2019 6:04 pm

Results so far:

I set the board (in the Arduino IDE) to the Arduino Nano 33 BLE and compiled the test.ino program without errors. This is on my Windows 10 PC at work, with no board attached to the computer.

When I get home tonight, I will attempt the same thing, using my MacBook and the actual Arduino Nano 33 BLE connected via a USB cable, and will report back to you.

I have used the OLED boards successfully on the the Arduino Nano and the ItsyBitsy M0, so I think I have a pretty good idea how they are connected and the libraries are installed. I am just getting this one compile problem on the Nano 33 BLE. Maybe it's something to do with my MacBook or my install of the IDE software on my Mac. I can also try a separate Windows 10 PC at home tonight and see if it's just an install conflict somewhere on the Mac. I will even uninstall and reinstall the IDE to see if that solves the issue.

Thanks for helping me figure this out!

Chris

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 20, 2019 2:41 am

Ok, here are my results. The standard "test.ino" sketch compiles on my MacBook Pro when the board is set to Nano 33 BLE.

However, if I add the #include <Adafruit_ImageReader.h> library to that test.ino sketch, I get all the same compile errors. I need this library in order to read from the SD card attached to the color OLED display, so it's not something I can just leave out.

Just for your reference, here is the new test sketch, but the important part is the includes at the top (all I added was the extra Include at the top). I even commented out the SPI.h library to see if it helped, but it didn't.
Code: Select all | TOGGLE FULL SIZE
/***************************************************
  This is a example sketch demonstrating the graphics
  capabilities of the SSD1331 library  for the 0.96"
  16-bit Color OLED with SSD1331 driver chip

  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/products/684

  These displays use SPI to communicate, 4 or 5 pins are required to
  interface
  Adafruit invests time and resources providing this open source code,
  please support Adafruit and open-source hardware by purchasing
  products from Adafruit!

  Written by Limor Fried/Ladyada for Adafruit Industries.
  BSD license, all text above must be included in any redistribution
 ****************************************************/

#include <Adafruit_GFX.h>
#include <Adafruit_SSD1331.h>
//#include <SPI.h>
#include <Adafruit_ImageReader.h>


// You can use any (4 or) 5 pins
#define sclk 13
#define mosi 11
#define cs   10
#define rst  9
#define dc   8


// Color definitions
#define   BLACK           0x0000
#define   BLUE            0x001F
#define   RED             0xF800
#define   GREEN           0x07E0
#define CYAN            0x07FF
#define MAGENTA         0xF81F
#define YELLOW          0xFFE0
#define WHITE           0xFFFF

// Option 1: use any pins but a little slower
//Adafruit_SSD1331 display = Adafruit_SSD1331(cs, dc, mosi, sclk, rst);

// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
Adafruit_SSD1331 display = Adafruit_SSD1331(&SPI, cs, dc, rst);

float p = 3.1415926;

void setup(void) {
  Serial.begin(9600);
  Serial.print("hello!");
  display.begin();

  Serial.println("init");
  uint16_t time = millis();
  display.fillScreen(BLACK);
  time = millis() - time;

  Serial.println(time, DEC);
  delay(500);

  lcdTestPattern();
  delay(1000);

  display.fillScreen(BLACK);
  display.setCursor(0,0);
  display.print("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur adipiscing ante sed nibh tincidunt feugiat. Maecenas enim massa");
  delay(1000);

  // tft print function!
  tftPrintTest();
  delay(2000);

  //a single pixel
  display.drawPixel(display.width()/2, display.height()/2, GREEN);
  delay(500);

  // line draw test
  testlines(YELLOW);
  delay(500);

  // optimized lines
  testfastlines(RED, BLUE);
  delay(500);

  testdrawrects(GREEN);
  delay(1000);

  testfillrects(YELLOW, MAGENTA);
  delay(1000);

  display.fillScreen(BLACK);
  testfillcircles(10, BLUE);
  testdrawcircles(10, WHITE);
  delay(1000);

  testroundrects();
  delay(500);

  testtriangles();
  delay(500);

  Serial.println("done");
  delay(1000);
}

void loop() {
}

void testlines(uint16_t color) {
   display.fillScreen(BLACK);
   for (int16_t x=0; x < display.width()-1; x+=6) {
     display.drawLine(0, 0, x, display.height()-1, color);
   }
   for (int16_t y=0; y < display.height()-1; y+=6) {
     display.drawLine(0, 0, display.width()-1, y, color);
   }

   display.fillScreen(BLACK);
   for (int16_t x=0; x < display.width()-1; x+=6) {
     display.drawLine(display.width()-1, 0, x, display.height()-1, color);
   }
   for (int16_t y=0; y < display.height()-1; y+=6) {
     display.drawLine(display.width()-1, 0, 0, y, color);
   }

   // To avoid ESP8266 watchdog timer resets when not using the hardware SPI pins
   delay(0);

   display.fillScreen(BLACK);
   for (int16_t x=0; x < display.width()-1; x+=6) {
     display.drawLine(0, display.height()-1, x, 0, color);
   }
   for (int16_t y=0; y < display.height()-1; y+=6) {
     display.drawLine(0, display.height()-1, display.width()-1, y, color);
   }

   display.fillScreen(BLACK);
   for (int16_t x=0; x < display.width()-1; x+=6) {
     display.drawLine(display.width()-1, display.height()-1, x, 0, color);
   }
   for (int16_t y=0; y < display.height()-1; y+=6) {
     display.drawLine(display.width()-1, display.height()-1, 0, y, color);
   }

}

void testdrawtext(char *text, uint16_t color) {
  display.setTextSize(1);
  display.setTextColor(WHITE);
  display.setCursor(0,0);

  for (uint8_t i=0; i < 168; i++) {
    if (i == '\n') continue;
    display.write(i);
    if ((i > 0) && (i % 21 == 0))
      display.println();
  }
}

void testfastlines(uint16_t color1, uint16_t color2) {
   display.fillScreen(BLACK);
   for (int16_t y=0; y < display.height()-1; y+=5) {
     display.drawFastHLine(0, y, display.width()-1, color1);
   }
   for (int16_t x=0; x < display.width()-1; x+=5) {
     display.drawFastVLine(x, 0, display.height()-1, color2);
   }
}

void testdrawrects(uint16_t color) {
 display.fillScreen(BLACK);
 for (int16_t x=0; x < display.height()-1; x+=6) {
   display.drawRect((display.width()-1)/2 -x/2, (display.height()-1)/2 -x/2 , x, x, color);
 }
}

void testfillrects(uint16_t color1, uint16_t color2) {
 display.fillScreen(BLACK);
 for (int16_t x=display.height()-1; x > 6; x-=6) {
   display.fillRect((display.width()-1)/2 -x/2, (display.height()-1)/2 -x/2 , x, x, color1);
   display.drawRect((display.width()-1)/2 -x/2, (display.height()-1)/2 -x/2 , x, x, color2);
 }
}

void testfillcircles(uint8_t radius, uint16_t color) {
  for (uint8_t x=radius; x < display.width()-1; x+=radius*2) {
    for (uint8_t y=radius; y < display.height()-1; y+=radius*2) {
      display.fillCircle(x, y, radius, color);
    }
  }
}

void testdrawcircles(uint8_t radius, uint16_t color) {
  for (int16_t x=0; x < display.width()-1+radius; x+=radius*2) {
    for (int16_t y=0; y < display.height()-1+radius; y+=radius*2) {
      display.drawCircle(x, y, radius, color);
    }
  }
}

void testtriangles() {
  display.fillScreen(BLACK);
  int color = 0xF800;
  int t;
  int w = display.width()/2;
  int x = display.height();
  int y = 0;
  int z = display.width();
  for (t = 0 ; t <= 15; t+=1) {
    display.drawTriangle(w, y, y, x, z, x, color);
    x-=4;
    y+=4;
    z-=4;
    color+=100;
  }
}

void testroundrects() {
  display.fillScreen(BLACK);
  int color = 100;
  int i;
  int t;
  for(t = 0 ; t <= 4; t+=1) {
    int x = 0;
    int y = 0;
    int w = display.width();
    int h = display.height();
    for(i = 0 ; i <= 8; i+=1) {
      display.drawRoundRect(x, y, w, h, 5, color);
      x+=2;
      y+=3;
      w-=4;
      h-=6;
      color+=1100;
    }
    color+=100;
  }
}

void tftPrintTest() {
  display.fillScreen(BLACK);
  display.setCursor(0, 5);
  display.setTextColor(RED);
  display.setTextSize(1);
  display.println("Hello World!");
  display.setTextColor(YELLOW, GREEN);
  display.setTextSize(2);
  display.print("Hello Wo");
  display.setTextColor(BLUE);
  display.setTextSize(3);
  display.print(1234.567);
  delay(1500);
  display.setCursor(0, 5);
  display.fillScreen(BLACK);
  display.setTextColor(WHITE);
  display.setTextSize(0);
  display.println("Hello World!");
  display.setTextSize(1);
  display.setTextColor(GREEN);
  display.print(p, 5);
  display.println(" Want pi?");
  display.print(8675309, HEX); // print 8,675,309 out in HEX!
  display.print(" Print HEX");
  display.setTextColor(WHITE);
  display.println("Sketch has been");
  display.println("running for: ");
  display.setTextColor(MAGENTA);
  display.print(millis() / 1000);
  display.setTextColor(WHITE);
  display.print(" seconds.");
}

void mediabuttons() {
 // play
  display.fillScreen(BLACK);
  display.fillRoundRect(25, 10, 78, 60, 8, WHITE);
  display.fillTriangle(42, 20, 42, 60, 90, 40, RED);
  delay(500);
  // pause
  display.fillRoundRect(25, 90, 78, 60, 8, WHITE);
  display.fillRoundRect(39, 98, 20, 45, 5, GREEN);
  display.fillRoundRect(69, 98, 20, 45, 5, GREEN);
  delay(500);
  // play color
  display.fillTriangle(42, 20, 42, 60, 90, 40, BLUE);
  delay(50);
  // pause color
  display.fillRoundRect(39, 98, 20, 45, 5, RED);
  display.fillRoundRect(69, 98, 20, 45, 5, RED);
  // play color
  display.fillTriangle(42, 20, 42, 60, 90, 40, GREEN);
}

/**************************************************************************/
/*!
    @brief  Renders a simple test pattern on the LCD
*/
/**************************************************************************/
void lcdTestPattern(void)
{
  uint8_t w,h;
  display.setAddrWindow(0, 0, 96, 64);

  for (h = 0; h < 64; h++) {
    for (w = 0; w < 96; w++) {
      if (w > 83) {
        display.writePixel(w, h, WHITE);
      } else if (w > 71) {
        display.writePixel(w, h, BLUE);
      } else if (w > 59) {
        display.writePixel(w, h, GREEN);
      } else if (w > 47) {
        display.writePixel(w, h, CYAN);
      } else if (w > 35) {
        display.writePixel(w, h, RED);
      } else if (w > 23) {
        display.writePixel(w, h, MAGENTA);
      } else if (w > 11) {
        display.writePixel(w, h, YELLOW);
      } else {
        display.writePixel(w, h, BLACK);
      }
    }
  }
  display.endWrite();
}

And, here is the error warnings from the IDE when trying to compile:
Code: Select all | TOGGLE FULL SIZE
Arduino: 1.8.10 (Mac OS X), Board: "Arduino Nano 33 BLE"

In file included from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/_default_fcntl.h:200:0,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/fcntl.h:4,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/fcntl.h:1,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatApiConstants.h:30,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatFile.h:36,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/ArduinoFiles.h:33,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatLib.h:27,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/SdFat.h:33,
                 from /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_SPIFlash/src/Adafruit_SPIFlash.h:35,
                 from /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_ImageReader_Library/Adafruit_ImageReader.h:19,
                 from /var/folders/m2/rmrjf3bn25vd486wfh20dt940000gn/T/arduino_modified_sketch_514000/test.ino:22:
/Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/stat.h:27:8: error: redefinition of 'struct stat'
 struct stat
        ^~~~
In file included from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/platform/mbed_error.h:28:0,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/Queue.h:28,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/Mail.h:28,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/rtos.h:33,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/mbed.h:23,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/Arduino.h:32,
                 from sketch/test.ino.cpp:1:
/Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/platform/mbed_retarget.h:500:8: note: previous definition of 'struct stat'
 struct stat {
        ^~~~
Multiple libraries were found for "SPI.h"
 Used: /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/libraries/SPI
Multiple libraries were found for "Adafruit_ImageReader.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_ImageReader_Library
Multiple libraries were found for "Adafruit_SPIFlash.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_SPIFlash
Multiple libraries were found for "SdFat.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master
Multiple libraries were found for "Adafruit_GFX.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_GFX_Library
Multiple libraries were found for "Adafruit_SSD1331.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_SSD1331_OLED_Driver_Library_for_Arduino
exit status 1
Error compiling for board Arduino Nano 33 BLE.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Last edited by chrissyblaze on Wed Nov 20, 2019 2:53 am, edited 1 time in total.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 20, 2019 2:51 am

And, just to continue with the same line of reasoning, I tried compiling another Example sketch which is relevant.

In the Examples, under the folder "Adafruit Image Reader Library" I selected the sketch "BreakoutSSD1331". It throws the same errors as before (with no changes to any of the code).
Code: Select all | TOGGLE FULL SIZE
Arduino: 1.8.10 (Mac OS X), Board: "Arduino Nano 33 BLE"

In file included from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/_default_fcntl.h:200:0,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/fcntl.h:4,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/fcntl.h:1,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatApiConstants.h:30,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatFile.h:36,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/ArduinoFiles.h:33,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/FatLib/FatLib.h:27,
                 from /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master/src/SdFat.h:33,
                 from /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_ImageReader_Library/examples/BreakoutSSD1331/BreakoutSSD1331.ino:12:
/Users/chrisdonica/Library/Arduino15/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/arm-none-eabi/include/sys/stat.h:27:8: error: redefinition of 'struct stat'
 struct stat
        ^~~~
In file included from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/platform/mbed_error.h:28:0,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/Queue.h:28,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/Mail.h:28,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/rtos/rtos.h:33,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/mbed.h:23,
                 from /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/Arduino.h:32,
                 from sketch/BreakoutSSD1331.ino.cpp:1:
/Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/cores/arduino/mbed/platform/mbed_retarget.h:500:8: note: previous definition of 'struct stat'
 struct stat {
        ^~~~
Multiple libraries were found for "Adafruit_GFX.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_GFX_Library
Multiple libraries were found for "Adafruit_SSD1331.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_SSD1331_OLED_Driver_Library_for_Arduino
Multiple libraries were found for "SPI.h"
 Used: /Users/chrisdonica/Library/Arduino15/packages/arduino/hardware/mbed/1.1.2/libraries/SPI
Multiple libraries were found for "SdFat.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/SdFat-master
Multiple libraries were found for "Adafruit_SPIFlash.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_SPIFlash
Multiple libraries were found for "Adafruit_ImageReader.h"
 Used: /Users/chrisdonica/Documents/Arduino/libraries/Adafruit_ImageReader_Library
exit status 1
Error compiling for board Arduino Nano 33 BLE.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 20, 2019 3:17 am

And, same exact result on my Windows 10 PC. Here is the error code on this operating system:

Code: Select all | TOGGLE FULL SIZE
Arduino: 1.8.10 (Windows 10), Board: "Arduino Nano 33 BLE"

In file included from c:\users\chris\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\_default_fcntl.h:200:0,

                 from c:\users\chris\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\fcntl.h:4,

                 from c:\users\chris\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\fcntl.h:1,

                 from C:\Users\Chris\Documents\Arduino\libraries\SdFat-master\src/FatLib/FatApiConstants.h:30,

                 from C:\Users\Chris\Documents\Arduino\libraries\SdFat-master\src/FatLib/FatFile.h:36,

                 from C:\Users\Chris\Documents\Arduino\libraries\SdFat-master\src/FatLib/ArduinoFiles.h:33,

                 from C:\Users\Chris\Documents\Arduino\libraries\SdFat-master\src/FatLib/FatLib.h:27,

                 from C:\Users\Chris\Documents\Arduino\libraries\SdFat-master\src/SdFat.h:33,

                 from C:\Users\Chris\Documents\Arduino\libraries\Adafruit_ImageReader_Library\examples\BreakoutSSD1331\BreakoutSSD1331.ino:12:

c:\users\chris\appdata\local\arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\stat.h:27:8: error: redefinition of 'struct stat'

 struct stat

        ^~~~

In file included from C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\cores\arduino/mbed/platform/mbed_error.h:28:0,

                 from C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\cores\arduino/mbed/rtos/Queue.h:28,

                 from C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\cores\arduino/mbed/rtos/Mail.h:28,

                 from C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\cores\arduino/mbed/rtos/rtos.h:33,

                 from C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\cores\arduino/mbed/mbed.h:23,

                 from C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\cores\arduino/Arduino.h:32,

                 from sketch\BreakoutSSD1331.ino.cpp:1:

C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\cores\arduino/mbed/platform/mbed_retarget.h:500:8: note: previous definition of 'struct stat'

 struct stat {

        ^~~~

Multiple libraries were found for "Adafruit_ImageReader.h"
 Used: C:\Users\Chris\Documents\Arduino\libraries\Adafruit_ImageReader_Library
Multiple libraries were found for "Adafruit_GFX.h"
 Used: C:\Users\Chris\Documents\Arduino\libraries\Adafruit_GFX_Library
Multiple libraries were found for "Adafruit_SSD1331.h"
 Used: C:\Users\Chris\Documents\Arduino\libraries\Adafruit_SSD1331_OLED_Driver_Library_for_Arduino
Multiple libraries were found for "SPI.h"
 Used: C:\Users\Chris\AppData\Local\Arduino15\packages\arduino\hardware\mbed\1.1.2\libraries\SPI
Multiple libraries were found for "SdFat.h"
 Used: C:\Users\Chris\Documents\Arduino\libraries\SdFat-master
Multiple libraries were found for "Adafruit_SPIFlash.h"
 Used: C:\Users\Chris\Documents\Arduino\libraries\Adafruit_SPIFlash
exit status 1
Error compiling for board Arduino Nano 33 BLE.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by adafruit_support_carter on Wed Nov 20, 2019 1:27 pm

OK, I was able to recreate the issue with the BreakoutSSD1331 example. It looks like a conflict between something being used in the ARM core by the SDFat library and the Mbed core used by the Nano 33 BLE.

I've passed this on to be looked in to.

adafruit_support_carter
 
Posts: 13681
Joined: Tue Nov 29, 2016 2:45 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 20, 2019 2:29 pm

Thanks again for looking into this strange issue. I really appreciate your assistance!

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by adafruit2 on Wed Nov 20, 2019 3:25 pm

hiya - this isnt something we can fix because the Nano 33 BLE uses a totally different method of defining a board which as you can see has a lot of incompatibilities. we dont have any control over the Nano 33 BLE runtime - you could ask Arduino if they'd be willing/able to fix this issue - there's not a great chance of that happening soon.

you can still use the display and SD card, you just cant use our image reader library.

adafruit2
Site Admin
 
Posts: 18820
Joined: Fri Mar 11, 2005 7:36 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by chrissyblaze on Wed Nov 20, 2019 4:24 pm

Is it possible to display images on the display some other way? My project involves either displaying text (font) or a bitmap image (stored on the SD card). Is the Image Reader Library the only way to display a bitmap?

Thanks.

chrissyblaze
 
Posts: 21
Joined: Tue Feb 20, 2018 5:58 pm

Re: Adafruit_SPIFlash.h won't compile on Arduino Nano 33 BLE

by adafruit2 on Wed Nov 20, 2019 4:58 pm

you could try
https://github.com/adafruit/Adafruit-SS ... mp/bmp.ino
but we dont really have support for non-imagereader. fonts should work just fine thru GFX
do you have to use a nano 33?

adafruit2
Site Admin
 
Posts: 18820
Joined: Fri Mar 11, 2005 7:36 pm

Please be positive and constructive with your questions and comments.