platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
900 stars 606 forks source link

Error: 'esp_flash_t' was not declared in this scope #768

Closed JRTax closed 2 years ago

JRTax commented 2 years ago

Hello,

This is the first time of me using platformIO to program an ESP32 module. Today I received the following error: .pio\libdeps\esp-wrover-kit\Adafruit SPIFlash\src\esp32\Adafruit_FlashTransport_ESP32.cpp: In member function 'SPIFlash_Device_t* Adafruit_FlashTransport_ESP32::getFlashDevice()': .pio\libdeps\esp-wrover-kit\Adafruit SPIFlash\src\esp32\Adafruit_FlashTransport_ESP32.cpp:62:3: error: 'esp_flash_t' was not declared in this scope esp_flash_t const *flash = _partition->flash_chip; ^ .pio\libdeps\esp-wrover-kit\Adafruit SPIFlash\src\esp32\Adafruit_FlashTransport_ESP32.cpp:63:36: error: 'flash' was not declared in this scope _flash_device.manufacturer_id = (flash->chip_id >> 16); ^ *** [.pio\build\esp-wrover-kit\lib99e\Adafruit SPIFlash\esp32\Adafruit_FlashTransport_ESP32.cpp.o] Error 1

The complete log output looks as follows: `Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: arduino) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via '-v, --verbose' option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html PLATFORM: Espressif 32 (3.5.0) > Espressif ESP-WROVER-KIT HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (ftdi) On-board (ftdi) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES:

The platformio.ini looks as follows: [env:esp-wrover-kit] platform = espressif32 board = esp-wrover-kit framework = arduino lib_deps = adafruit/Adafruit GFX Library@^1.10.14 adafruit/Adafruit ILI9341@^1.5.10 adafruit/Adafruit ImageReader Library@^2.8.0 adafruit/SD@0.0.0-alpha+sha.041f788250 adafruit/Adafruit SPIFlash@^3.9.1 adafruit/SdFat - Adafruit Fork@^1.5.1 adafruit/Adafruit BusIO@^1.11.3 adafruit/Adafruit EPD@^4.4.3 monitor_speed = 9600 upload_port = COM5

Is there an way to solve this issue?

JRTax commented 2 years ago

I've somehow resolved this issue by creating an new project. This issue can be closed now.