Mamedov_A.
Mamedov_A.

Reputation: 51

ESP32-S3 Issue with LittleFS

I'm trying to build a sketch in Arduino IDE with LittleFS to work on my ESP32-S3. and got an error about corrupted LittleFS

My code:

#include <EEPROM.h>
#include <DNSServer.h>
#include <HTTPClient.h>
#include <HTTPUpdate.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <WebServer.h>
#include <LittleFS.h>
#include <ArduinoJson.h>
void setup() {
  if (!LittleFS.begin()) {
      Serial.println("LittleFS mount failed, formatting...");
      if (LittleFS.format()) {
          Serial.println("LittleFS formatted successfully.");
          if (LittleFS.begin()) {
              Serial.println("LittleFS mounted successfully.");
          } else {
              Serial.println("Failed to mount LittleFS after formatting.");
          }
      } else {
          Serial.println("Failed to format LittleFS.");
      }
  } else {
      Serial.println("LittleFS mounted successfully.");
  }
}

Output:

ESP-ROM:esp32s3-20210327 Build:Mar 27 2021 rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT) SPIWP:0xee mode:DIO, clock div:1 load:0x3fce3818,len:0x109c load:0x403c9700,len:0x4 load:0x403c9704,len:0xb50 load:0x403cc700,len:0x2fd0 entry 0x403c98ac E (4444) esp_littlefs: ./managed_components/joltwallet__littlefs/src/littlefs/lfs.c:1369:error: Corrupted dir pair at {0x0, 0x1} E (4445) esp_littlefs: mount failed, (-84) E (4448) esp_littlefs: Failed to initialize LittleFS E (9188) task_wdt: esp_task_wdt_reset(763): task not found

How can I troubleshoot this?

By the way, I don't have this problem with ESP32-WROOM-32 with the same sketch file. Should I use something else to reach the goal ?

Upvotes: 1

Views: 266

Answers (0)

Related Questions