joltwallet / esp_littlefs

LittleFS port for ESP-IDF
MIT License
254 stars 95 forks source link

esp32 fails #176

Closed marriusco closed 6 months ago

marriusco commented 7 months ago
#include <Arduino.h>

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
#   include <esp_chip_info.h>
#   include <spi_flash_mmap.h>
#endif
#include <esp_littlefs.h>
#include <esp_flash.h>
setup()
{
  esp_vfs_littlefs_conf_t conf = {
    .base_path = "/",
    .partition_label = "littlefs",
    .format_if_mount_failed = true,
    .dont_mount = false,
  };
  esp_err_t ret = esp_vfs_littlefs_register(&conf);
  if (ret != ESP_OK) {
    if (ret == ESP_FAIL) {
      Serial.println("Failed to mount or format filesystem");
    } else if (ret == ESP_ERR_NOT_FOUND) {
      Serial.println("Failed to find LittleFS partition");
    } else {
      Serial.print("Failed to initialize LittleFS ");
      Serial.println(esp_err_to_name(ret));
    }
    return;
  }
  }

Getting this

12:26:00.824 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
12:26:00.824 -> configsip: 0, SPIWP:0xee
12:26:00.824 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
12:26:00.824 -> mode:DIO, clock div:1
12:26:00.824 -> load:0x3fff0030,len:1344
12:26:00.824 -> load:0x40078000,len:13964
12:26:00.824 -> load:0x40080400,len:3600
12:26:00.824 -> entry 0x400805f0
12:26:01.146 -> E (20) esp_littlefs: partition "littlefs" could not be found
12:26:01.146 -> E (20) esp_littlefs: Failed to initialize LittleFS
12:26:01.146 -> Failed to find LittleFS partition
12:26:01.146 -> Flash size 4194304
BrianPugh commented 7 months ago

do you have a partition table named "littlefs" in your partition table csv?

BrianPugh commented 6 months ago

closing due to lack of activity.