Error with HUAZZAH32 and Adafruit_SPIFlash.h

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
darkenedforest
 
Posts: 15
Joined: Wed Jul 07, 2021 11:04 pm

Error with HUAZZAH32 and Adafruit_SPIFlash.h

Post by darkenedforest »

I started a project with a HUZZAH (PRODUCT ID: 2821) and the 1.14 TFT (PRODUCT ID: 4383). I loaded up the example sketch to load an image from the SD card with no problem. When I realized I would need more pins, I switched to the HUZZAH32 (PRODUCT ID: 3405). While trying the same sketch I get this error:

Code: Select all

C:\Users\Tyler\Documents\Arduino\libraries\Adafruit_SPIFlash\src\esp32\Adafruit_FlashTransport_ESP32.cpp: In member function 'SPIFlash_Device_t* Adafruit_FlashTransport_ESP32::getFlashDevice()':
C:\Users\Tyler\Documents\Arduino\libraries\Adafruit_SPIFlash\src\esp32\Adafruit_FlashTransport_ESP32.cpp:50:3: error: 'esp_flash_t' was not declared in this scope
   esp_flash_t const *flash = _partition->flash_chip;
   ^
C:\Users\Tyler\Documents\Arduino\libraries\Adafruit_SPIFlash\src\esp32\Adafruit_FlashTransport_ESP32.cpp:52:30: error: 'flash' was not declared in this scope
   _flash_device.total_size = flash->size;

It happens when trying to include Adafruit_SPIFlash.h.

Here the sketch compiles when I have a HUZZAH 8266 version selected
8266.png
8266.png (213.33 KiB) Viewed 90 times
But when I switch to the HUZZAH32 it fails.
esp32.png
esp32.png (219.18 KiB) Viewed 90 times

The setup instruction for the HUZZAH32 are a bit vague. It simply says to "Check out the Espressif Arduino repository for details on how to install it"
I grabbed the stable version link (https://raw.githubusercontent.com/espre ... index.json) and added it to the board manager and installed the ESP32 board.
board manager.png
board manager.png (19.14 KiB) Viewed 90 times
I also tried removing it and re-adding in to see if it was a bad install, but that did not seem to fix it.
Hopefully it's something very obvious I'm missing. Any help would be greatly appreciated.

User avatar
darkenedforest
 
Posts: 15
Joined: Wed Jul 07, 2021 11:04 pm

Re: Error with HUAZZAH32 and Adafruit_SPIFlash.h

Post by darkenedforest »

Seems to be a bug in the recent versions. I rolled back to 3.5.2 and it worked but it errored on 3.6.0 and 3.6.1. Anyone know if there is a place to report bugs?

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Error with HUAZZAH32 and Adafruit_SPIFlash.h

Post by adafruit_support_mike »

This is a good place to let us know about problems.

To help our dev team, try to find the smallest version that demonstrates the problem.. just make a copy of the example and start commenting out lines that don’t seem related, checking with the compiler to make sure the last change didn’t create a bunch of new errors.

User avatar
darkenedforest
 
Posts: 15
Joined: Wed Jul 07, 2021 11:04 pm

Re: Error with HUAZZAH32 and Adafruit_SPIFlash.h

Post by darkenedforest »

I think the example I posted is as simple as it gets. It's the include for the library and empty setup and loop functions.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: Error with HUAZZAH32 and Adafruit_SPIFlash.h

Post by adafruit_support_mike »

Thanks.. I’ll let the ESP32 team know.

User avatar
darkenedforest
 
Posts: 15
Joined: Wed Jul 07, 2021 11:04 pm

Re: Error with HUAZZAH32 and Adafruit_SPIFlash.h

Post by darkenedforest »

FYI 3.7.1 does not seem to have addressed the problem. Still getting the same error as above.

On a separate note, any advice on using Adafruit's SPIFlash library to read/write to the ESP32's onboard flash? Or some other solution besides SPIFFS? Adafruit_ImageReader requires SPIFlash which causes a conflict with SPIFFS. Tried to compile the SPIFlash example flash_speedtest but when it runs it displays "No QSPI/SPI flash are defined on your board variant.h !" on the serial monitor.

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”