After ESP32S3 uses UF2 to install micropython firmware, the file system reports error #9961
Replies: 3 comments 1 reply
-
Solved by manually formatting to FAT filesystem, but could there be a better way?
|
Beta Was this translation helpful? Give feedback.
-
Whenever people download micropython firmware, at the top of the list is the UF2 firmware. But in the UF2 Bootloader, if you have not installed the circuitpython.uf2 firmware before, but directly installed the micropython.uf2, this error must occur. Performing initial setup
Traceback (most recent call last):
File "_boot.py", line 11, in <module>
File "inisetup.py", line 40, in setup
OSError: [Errno 22] EINVAL I want to add code that can format the partition as fat in ports/esp32/modules/inisetup.py. micropython/ports/esp32/modules/inisetup.py Lines 37 to 53 in ca79b49 like this: def setup():
from esp32 import Partition
check_bootsec()
print("Performing initial setup")
if Partition.info(bdev)[4] == "vfs":
os.VfsLfs2.mkfs(bdev)
vfs = os.VfsLfs2(bdev)
elif Partition.info(bdev)[4] == "ffat":
os.VfsFat.mkfs(bdev)
vfs = os.VfsFat(bdev)
os.mount(vfs, "/")
with open("boot.py", "w") as f:
f.write(
"""\
# This file is executed on every boot (including wake-boot from deepsleep)
#import esp
#esp.osdebug(None)
#import webrepl
#webrepl.start()
"""
)
return vfs Would you please,could I submit a PR on this? |
Beta Was this translation helpful? Give feedback.
-
The instructions suggest using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I opened an issue on Mar 25 #8453.
Maybe I could come here to ask a question and discuss this.
Briefly:
The error message points to this piece of code, which is used to format the entire flash using littlefs v2.
micropython/ports/esp32/modules/inisetup.py
Lines 33 to 38 in d9bca30
But the file system format used by UF2 is FAT, so here is error.
Beta Was this translation helpful? Give feedback.
All reactions