Best Method for Utilizing On-Board Flash?

Hi @wolfrose. You can upload filesystems to ESP32 boards using Arduino IDE 1.8.19 by installing the "Arduino ESP32 filesystem uploader" Tool:

Installation and usage instructions are available at the above link.

If you are using an Arduino Nano ESP32 board (as opposed to any other ESP32-based board), then the additional instructions I provided in post #15 above should be equally applicable to Arduino IDE 1.x.

The only exception is the "C. Upload Filesystem" section, since you will be using the Arduino IDE 1.x "Arduino ESP32 filesystem uploader" Tool instead of the Arduino IDE 2.x arduino-littlefs-upload extension, so simply follow the "Arduino ESP32 filesystem uploader" Tool's usage instructions when you get to that part of the instructions:

https://github.com/me-no-dev/arduino-esp32fs-plugin#usage

Yep, I did I have now probably the latest update where I have the option to select between 3 types of upload methods.

Hi!

Thank you very much for this clear manual how to use LittleFS in Arduino IDE 2. All is clear, but it doesn’t work like it should… Maybe you are able to explain it to me…

I have done step by step like you wrote - I have created the subfolder data in my project’s folder. I’ve created “test_file1.txt” with a few letters inside. Then I’ve closed Serial monitor, and used “Upload LittleFS to Pico/ESP8266/ESP32” function, which seemed to work fine:

LittleFS Filesystem Uploader v1.6.0 -- https://github.com/earlephilhower/arduino-littlefs-upload

 Sketch Path: C:\Users\jakub\Documents\Arduino\LITTLEFS_test
   Data Path: C:\Users\jakub\Documents\Arduino\LITTLEFS_test\data
      Device: ESP32 series, model esp32s3
Using partition: partitions.csv in sketch folder
  Partitions: C:\Users\jakub\Documents\Arduino\LITTLEFS_test\partitions.csv
       Start: 0x3e0000
         End: 0x400000
 Serial Port: COM4

Building LittleFS filesystem
Command Line: C:\Users\jakub\AppData\Local\Arduino15\packages\esp32\tools\mklittlefs\3.0.0-gnu12-dc7f933\mklittlefs.exe -c C:\Users\jakub\Documents\Arduino\LITTLEFS_test\data -p 256 -b 4096 -s 131072 C:\Users\jakub\AppData\Local\Temp\tmp-8488-1M9GgfGjrkVL-.littlefs.bin
/test_file1.txt.txt

Uploading LittleFS filesystem
Command Line: C:\Users\jakub\AppData\Local\Arduino15\packages\esp32\tools\esptool_py\4.5.1\esptool.exe --chip esp32s3 --port COM4 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 4063232 C:\Users\jakub\AppData\Local\Temp\tmp-8488-1M9GgfGjrkVL-.littlefs.bin
esptool.py v4.5.1
Serial port COM4
Connecting...
Chip is ESP32-S3 (revision v0.2)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 3c:84:27:c3:fd:a8
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x003e0000 to 0x003fffff...
Compressed 131072 bytes to 341...
Writing at 0x003e0000... (100 %)
Wrote 131072 bytes (341 compressed) at 0x003e0000 in 0.5 seconds (effective 2145.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Completed upload.

Next I’m uploading the code you’ve provided, which compiles properly and gives this result:

LittleFS Mount success
Listing root directory:
test.txt	SIZE: 0 B
Listing complete

Well, teoretically all worked, but there is no file “test_file1.txt”… What could I’ve done wrong? Thank you in advance for your help. Board is Arduino Nano ESP32 working as ESP32S3 Dev Module.