E (1507) esp_littlefs: partition "spiffs" could not be found E (1507) esp_littlefs: Failed to initialize LittleFS [ 1605][E][LittleFS.cpp:98] begin(): Mounting LittleFS failed! Error: 261 LittleFS Mount Failed
I am using platform espressif32 6.12.0
My partitions.csv looks as follows:
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,0x6000,
phy,data,phy,0xF000,0x1000,
factory,app,factory,0x10000,0x100000,
spiff,data,spiffs,0x110000,0xEF0000,
type or paste code here
My platform.ini is configured as follows:
platform = espressif32@6.12.0
board = esp32-s3-devkitc-1
framework = arduino
board_build.filesystem = littlefs
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = partitions.csv
monitor_speed = 115200
build_flags =
-DBOARD_HAS_PSRAM
-D ARDUINO_USB_MODE=1 ; CDC/JTAG USB mode
; Needed for USB to enumerate when user code starts
-D ARDUINO_USB_CDC_ON_BOOT=1
Generating partitions .pio\build\esp32-s3-devkitc-1\partitions.bin
Error at line 5: Value 'littlefs' is not valid. Known keywords: ota, phy, nvs, coredump, nvs_keys, efuse, undefined, esphttpd, fat, spiffs
*** [.pio\build\esp32-s3-devkitc-1\partitions.bin] Error 2
I performed the same as you mentioned. Additionally, I erased the flash completely and then ran the program. Now I getting the following error:
E (1507) esp_littlefs: ./components/esp_littlefs/src/littlefs/lfs.c:1367:error: Corrupted dir pair at {0x0, 0x1}
E (1508) esp_littlefs: mount failed, (-84)
E (1510) esp_littlefs: Failed to initialize LittleFS
[ 1613][E][LittleFS.cpp:98] begin(): Mounting LittleFS failed! Error: -1
LittleFS Mount Failed
But how do we achieve this in platformio. When I perform Upload Filesystem Image I already see it creating a littlefs.bin
Building in release mode
Building FS image from 'data' directory to .pio\build\esp32-s3-devkitc-1\littlefs.bin
/config.html
/style.css
Looking for upload port...
Auto-detected: COM8
Uploading .pio\build\esp32-s3-devkitc-1\littlefs.bin
esptool.py v4.5.1
Serial port COM8
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 80:b5:4e:c6:0b:38
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Flash will be erased from 0x00110000 to 0x00ffffff...
Compressed 15663104 bytes to 27487...
Writing at 0x00110000... (50 %)
Writing at 0x0051db97... (100 %)
Wrote 15663104 bytes (27487 compressed) at 0x00110000 in 105.4 seconds (effective 1189.1 kbit/s)...
Hash of data verified.
This output is just as “default_8MB.csv“ and it is shown in “esp32-s3-devkitc-1.json“,
it is not your “partitions.csv“.
You may confirm the location of your “partitions.csv“. Is it same folder of “default_8MB.csv“ ?
If you are using Esp32s3 devkitc-1 N16R8 , you must write as like
board = esp32-s3-devkitc1-n16r8
in your platformio.ini.
If you are using your original board, you must make a new (yourboard).json.
(I think it is better)
Then write your partition scheme in (yourboard).json like as
”partitions”:”partitions.csv”
The esp32-s3-devkitc1-n16r8 manifest you are mentioned is not available in a “vanilla” PlatformIO but in the pioarduino espressif32-platform! Therefore the settings in the platformio.ini made here are fully correct. There is no need to create a dedicated board manifest, but it is optional.
As recommended in platformio documentation, I have placed my partitions.csv in the root folder of my project along with my platformio.ini file. Additionally, when I run Upload Filesystem Image it shows the correct address that I have set in my partitions.csv. This means it is referencing to the right address