LittleFS problem with M5core2 and PIO
-
Hi,
Here is my platformio config:
[env:m5stack-core2]
platform = espressif32
board = m5stack-core2
framework = arduino
board_build.filesystem = littlefs
monitor_speed = 115200
lib_deps =
ottowinter/ESPAsyncWebServer-esphome@^2.1.0
m5stack/M5Core2@^0.1.0
lorol/LittleFS_esp32@^1.0.6With that config, I cannot upload files in memory. it always save the file as spiffs.
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/m5stack-core2/spiffs.bin
esptool.py v3.1
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WDQ6-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 84:cc:a8:5f:ea:08
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00c90000 to 0x00ffffff...
Compressed 3604480 bytes to 155100...
Writing at 0x00c90000... (10 %)
Writing at 0x00ca61ce... (20 %)
Writing at 0x00cbe455... (30 %)
Writing at 0x00cd3e90... (40 %)
Writing at 0x00ce9a6c... (50 %)
Writing at 0x00cff565... (60 %)
Writing at 0x00d13a71... (70 %)
Writing at 0x00d2bf09... (80 %)
Writing at 0x00d4a5ce... (90 %)
Writing at 0x00d7257e... (100 %)It upload succesfully but then fail to access the file from the server.
.pio/libdeps/m5stack-core2/LittleFS_esp32/src/lfs.c:1076:error: Corrupted dir pair at {0x0, 0x1}
E (6257) esp_littlefs: mount failed, (-84)
E (6261) esp_littlefs: Failed to initialize LittleFS
[E][LITTLEFS.cpp:90] begin(): Mounting LITTLEFS failed! Error: -1 -
It looks like PlatformIO is still uploading your filesystem as SPIFFS despite setting board_build.filesystem = littlefs. This happens because the default partition table might not reserve space for LittleFS. Try creating a custom partition table that supports LittleFS and specify it in platformio.ini with board_build.partitions. Also, ensure your LittleFS_esp32 library is compatible with M5Core2. Without proper partitioning, mounting fails with corrupted directory errors like yours. Let me know if you want help generating a suitable partition CSV file!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login