-
Notifications
You must be signed in to change notification settings - Fork 26
Description
SPIFFS.bdegin fails when TFT_eFEXH.h is included
Arduino IDE 1.8.19
ESP32 core 2.0.14 (library TFT_eFEXH does not compile with ESP32 core 3.x.y)
TFT_eFEXH version=0.0.8
TFT_eSPI version=2.5.43
Board ESP32 Dev Kit V1
Problem discovered with example Jpeg_ESP32 for library TFT_eFEXH (and also with example Rotate_Sprite_3 in the TFT_eSPI library.)
The SPIFFS has been loaded with the files in the data directory of sketch Jpeg_ESP32 and the content verified with a small test
derived from the standard SPIFFS_Test example, using only the listDir part.
Program always fails with an error on SPIFFS.begin()
From the Jpeg_ESP32 sketch, the following test has been extracted.
It seems that only the presence of #include <TFT_eFEX.h>, without any other use of the library is enough to show the error ....
//====================================================================================
// Libraries
//====================================================================================
// Call up the SPIFFS FLASH filing system this is part of the ESP Core
#define FS_NO_GLOBALS
#include <FS.h>
#include "SPIFFS.h" // Needed for ESP32 only
#include <SPI.h>
// https://github.com/Bodmer/TFT_eSPI
#include <TFT_eSPI.h> // Hardware-specific library
TFT_eSPI tft = TFT_eSPI(); // Invoke custom library
// https://github.com/Bodmer/TFT_eFEX
// if TFT_eFEX.h is included, SPIFFS.begin() fails ........................... ???
#include <TFT_eFEX.h> // Include the extension graphics functions library
void setup()
{
Serial.begin(115200); // Used for messages and the C array generator
delay(1000);
Serial.println("\nESP32 SPIFFS.begin test ...");
Serial.print ("+++++++++++ TFT_eFEXH");
#ifdef _TFT_eFEXH_
Serial.println(" included !!!!");
#else
Serial.println(" not included !!!!");
#endif
if (!SPIFFS.begin()) {
Serial.println("SPIFFS initialisation failed!");
while (1) yield(); // Stay here twiddling thumbs waiting
}
Serial.println("\r\nInitialisation done.");
}
void loop()
{
}
Here the results:
Run with #include <TFT_eFEX.h>
22:24:14.499 ->
22:24:14.499 -> ESP32 SPIFFS.begin test ...
22:24:14.499 -> +++++++++++ TFT_eFEXH included !!!!
22:24:14.499 -> E (1010) esp_littlefs: ./components/esp_littlefs/src/littlefs/lfs.c:1347:error: Corrupted dir pair at {0x0, 0x1}
22:24:14.499 ->
22:24:14.499 -> E (1014) esp_littlefs: mount failed, (-84)
22:24:14.499 -> E (1017) esp_littlefs: Failed to initialize LittleFS
22:24:14.499 -> [ 1025][E][LittleFS.cpp:95] begin(): Mounting LittleFS failed! Error: -1
22:24:14.546 -> SPIFFS initialisation failed!
Run without #include <TFT_eFEX.h>
22:27:21.700 ->
22:27:21.700 -> ESP32 SPIFFS.begin test ...
22:27:21.700 -> +++++++++++ TFT_eFEXH not included !!!!
22:27:21.800 ->
22:27:21.800 -> Initialisation done.
Simple list of the SPIFFS derived from standard SPIFFS examples)
22:29:29.749 -> Debut ...
22:29:29.896 -> Listing directory: /
22:29:29.997 -> FILE: Baboon.jpg SIZE: 15038
22:29:29.997 -> FILE: BaboonL.jpg SIZE: 12569
22:29:29.997 -> FILE: EagleEye.jpg SIZE: 37755
22:29:29.997 -> FILE: Tiger.jpg SIZE: 47316
22:29:30.050 -> Test complete