← index #8625Issue #12406
Related · high · value 0.437
QUERY · ISSUE

ESP32 S2 - Filesystem is empty after some time

openby didi110296opened 2022-05-04updated 2025-10-03
proposed-closeneeds-info

Hello, i'm working on an ESP32 S2 (WROOM) for a project under MicroPython, the firmware I use is the following: GENERIC_S2-20220117-v1.18.bin
The problem being that the filesystem has completely disappeared after a few days (10 - 15 days) I manage to connect to the REPL but when: ampy --port COM8 ls the filesystem is empty.
My filesystem once the map is functional is composed of .py files including main.py and three libraries and files
.json for configuration.

I do not understand why my filesystem is deleted like this, my program does not fill the memory or create files that could saturate the filesystem itself.
The problem does not seem to come from my program.

I post my problem here because it can come from the MicroPython firmware.
I tried with three different cards and the same thing happens, the card works for a few days, after nothing the filesystem is empty.

Thanks in advance.

CANDIDATE · ISSUE

Zero block size ?

closedby one0410opened 2023-09-11updated 2023-09-11
bug

I used to use ESP32-S3-WROOM-1-N8R2. Everything works fine.
This time, I'm using ESP32-S3-WROOM-1-N4R2.
I can flash the latest firmware downloaded from micropython website.

c:\Downloads>esptool --chip esp32s3 --port COM6 --baud 115200 --after hard_reset write_flash -e --flash_size detect -z 0 ESP32_GENERIC_S3-20230906-unstable-v1.20.0-450-g3637252b7.bin
esptool.py v4.6.2
Serial port COM6
Connecting...
Chip is ESP32-S3 (revision v0.1)
Features: WiFi, BLE
Crystal is 40MHz
MAC: 34:85:18:5e:cb:30
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Erasing flash (this may take a while)...
Chip erase completed successfully in 12.5s
Warning: Image file at 0x0 is protected with a hash checksum, so not changing the flash size setting. Use the --flash_size=keep option instead of --flash_size=4MB in order to remove this warning, or use the --dont-append-digest option for the elf2image command in order to generate an image file without a hash checksum
Compressed 1558640 bytes to 1036532...
Wrote 1558640 bytes (1036532 compressed) at 0x00000000 in 12.8 seconds (effective 977.9 kbit/s)...
Hash of data verified.

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

After rebooting, I found I can't mkdir or mpremote cp to the board.
When I check statvfs, I got zero block size.

Connecting to COM7...

>>> import os
>>> os.uname()
(sysname='esp32', nodename='esp32', release='1.20.0', version='v1.20.0-450-g3637252b7 on 2023-09-06', machine='Generic ESP32S3 module with ESP32S3')
>>> os.listdir()
[]
>>> os.mkdir('aa')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 19] ENODEV
>>> os.statvfs('/')
(0, 0, 0, 0, 0, 0, 0, 0, 0, 128)
>>>

Could anyone help me?
Thanks a lot.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied