diff --git a/ports/esp32/modules/_boot.py b/ports/esp32/modules/_boot.py index 96af581f38..6ff771425b 100644 --- a/ports/esp32/modules/_boot.py +++ b/ports/esp32/modules/_boot.py @@ -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, "/") diff --git a/ports/esp32/mpconfigport.h b/ports/esp32/mpconfigport.h index acf065384b..e2004f463b 100644 --- a/ports/esp32/mpconfigport.h +++ b/ports/esp32/mpconfigport.h @@ -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)