lorol / arduino-esp32fs-plugin

Arduino plugin for uploading files to ESP32 file system
GNU General Public License v2.0
125 stars 18 forks source link

littlefs won't flash/get created on ESP32 with 16MB (but works with 4MB) #9

Open marcmerlin opened 2 years ago

marcmerlin commented 2 years ago

I have this:

Archive:  /home/merlin/arduino/tools/ESP32FS/tool/esp32fs.jar
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
       0  Stored        0   0% 2021-02-02 11:40 00000000  com/
       0  Stored        0   0% 2021-02-02 11:40 00000000  com/esp32/
       0  Stored        0   0% 2021-02-02 11:40 00000000  com/esp32/mkspiffs/
    1261  Defl:N      671  47% 2021-02-02 11:40 d4df75c5  com/esp32/mkspiffs/ESP32FS$1.class
   15097  Defl:N     7298  52% 2021-02-02 11:40 8f41da8a  com/esp32/mkspiffs/ESP32FS.class
    1093  Defl:N      643  41% 2021-02-02 11:40 b09e3092  com/esp32/mkspiffs/StreamGobbler.class

sauron [mc]$ pwd
/home/merlin/arduino/hardware/espressif/esp32/tools/mklittlefs
sauron [mc]$ ./mklittlefs --version

./mklittlefs  version: 0.2.3-27-gc41e51a

I think I narrowed it down to 4MB of flash vs 16MB of flash. When I have a 4MB chip and use "Huge APP (3MB No OTA/1MB SPIFFS)", it works and I can flash littlefs using the same menu When I change only the flash size from 4MB to 16MB, and keep the same partitioning, I get

LittleFS Error: partition size could not be found!

and that's using the same exact partition scheme, just changing the flash size. That would explain why the partitioning for 16MB flash, doesn't work

I tried to make a custom 16MB SPIFFS partition and that fails too (that same partition works with FatFS using the same /esp32fs.jar):

nvs,      data, nvs,     0x9000,  0x5000,
otadata,  data, ota,     0xe000,  0x2000,
app0,     app,  ota_0,   0x10000, 0x200000,
app1,     app,  ota_1,   0x210000,0x200000,
spiffs,   data, spiffs,  0x410000,0xBEF000,

and a custom entry in boards.txt that points to that file, but I get

Using partition scheme from Arduino IDE.
LittleFS Error: partition size could not be found!
marcmerlin commented 2 years ago

I've installed the latest head from ESP32 arduino, and it still fails if I try to create a filesystem of 12MB for a 16MB chip;

LittleFS Warning: mktool canceled!
Chip : esp32
Using partition scheme from Arduino IDE.
Start: 0x410000
Size : 0xbef000
mklittlefs : /home/merlin/Arduino/hardware/espressif/esp32/tools/mklittlefs/mklittlefs

esptool : /home/merlin/Arduino/hardware/espressif/esp32/tools/esptool.py

[LittleFS] data   : /home/merlin/arduino/emulation/ArduinoOnPc-FastLED-GFX-LEDMatrix/examples/NeoMatrix-FastLED-IR/data
[LittleFS] offset : 0
[LittleFS] start  : 4259840
[LittleFS] size   : 12220
[LittleFS] page   : 256
[LittleFS] block  : 4096
->/gifs64/087_net.gif
->/gifs64/149_minion1.gif
->/gifs64/193_redplasma.gif
->/gifs64/196_colorstar.gif
->/gifs64/200_circlesmoke.gif
->/gifs64/203_waterdrop.gif
->/gifs64/208_pulpfictiondance.gif
->/gifs64/210_circletriangle.gif
->/gifs64/215_fallingcube.gif
->/gifs64/226_flyingfire.gif
->/gifs64/236_spintriangle.gif
->/gifs64/255_photon.gif
->/gifs64/257_colormesh_wave.gif
->/gifs64/271_mj.gif
->/gifs64/272_mj_spindance.gif
->/gifs64/284_comets.gif
->/gifs64/291_circle2sphere.gif
->/gifs64/328_spacetime.gif
->/gifs64/341_minion2.gif
->/gifs64/342_spincircle.gif
->/gifs64/358_spinningpattern.gif
->/gifs64/364_colortoroid.gif
->/gifs64/377_batman.gif
->/gifs64/401_ghostbusters.gif
->/gifs64/412_bluecube_slide.gif
->/gifs64/444_hand.gif
->/gifs64/469_infection.gif
->/gifs64/470_scrollcubestron.gif
->/gifs64/AnB_color_bands.gif
->/gifs64/AnB_color_bands_heart.gif
_>*** buffer overflow detected ***: terminated

LittleFS Create Failed!