I'm trying to build a sketch in Arduino IDE with LittleFS to work on my ESP32-S3. and got an error:
Code:
#include <EEPROM.h>
#include "esp_system.h"
#include <DNSServer.h>
#include <HTTPClient.h>
#include <HTTPUpdate.h>
#include <NTPClient.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <WiFiUdp.h>
#include <WebServer.h>
#include <ESPmDNS.h>
#include <LittleFS.h>
#include <ArduinoJson.h>
#include <TimeLib.h>
#include <vector>
#include <algorithm> // For random_shuffle
#include <ctime> // For time
#include "Audio.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
E (9194) task_wdt: esp_task_wdt_reset(763): task not found
E (9233) task_wdt: esp_task_wdt_reset(763): task not found
E (9234) task_wdt: esp_task_wdt_reset(763): task not found
E (9235) task_wdt: esp_task_wdt_reset(763): task not found
E (9238) task_wdt: esp_task_wdt_reset(763): task not found
E (9278) task_wdt: esp_task_wdt_reset(763): task not found
E (9279) task_wdt: esp_task_wdt_reset(763): task not found
E (9280) task_wdt: esp_task_wdt_reset(763): task not found
E (9283) task_wdt: esp_task_wdt_reset(763): task not found
E (9288) task_wdt: esp_task_wdt_reset(763): task not found
How to troubleshoot this?
But I don't have this problem with ESP32-WROOM-32 with the same sketch file.