esp32: Enable VfsMap.

Signed-off-by: Damien George <damien@micropython.org>
pull/8381/head
Damien George 2022-03-03 18:11:09 +11:00
rodzic 8477e891e2
commit 3035029363
2 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -1,7 +1,14 @@
import gc
import vfs
from esp32 import Partition
from flashbdev import bdev
if mapfs := Partition.find(Partition.TYPE_DATA, label="mapfs"):
import sys
sys.path.insert(0, "/mapfs")
del mapfs
try:
if bdev:
vfs.mount(bdev, "/")

Wyświetl plik

@ -71,6 +71,7 @@
#define MICROPY_USE_INTERNAL_PRINTF (0) // ESP32 SDK requires its own printf
#define MICROPY_SCHEDULER_DEPTH (8)
#define MICROPY_VFS (1)
#define MICROPY_VFS_MAP (1)
// control over Python builtins
#define MICROPY_PY_STR_BYTES_CMP_WARN (1)