summaryrefslogtreecommitdiff
path: root/docs/esp32/tutorial/intro.rst
diff options
context:
space:
mode:
authorNed Konz <ned@metamagix.tech>2025-10-01 10:56:41 -0700
committerDamien George <damien@micropython.org>2025-10-22 10:22:48 +1100
commit7090fc5dd63bc1dcbe5470e2000ed333cb867d64 (patch)
treeb18cc4a35da5d9f51db0358d83025e98639f1543 /docs/esp32/tutorial/intro.rst
parentb1802eb0e1363fb7d0d2c618a3522b84978c77d2 (diff)
zephyr: Mount all disks and flash partition, formatting if necessary.
Existing C code in `main.c` only mounts a flash filesystem if one exists, and doesn't do anything if the 'storage' partition is not formatted. This commit moves the mounting logic from `main.c` to frozen code using `modules/_boot.py` and adds the formatting of a previously unformatted partition if the mount fails. Every available disk (in the newly added `DiskAccess.disks` tuple) will be mounted on separate mount points (if they're formatted), and the 'storage' flash partition (if any) will be mounted on /flash (and will be formatted as LFS2 if necessary). Also, `sys.path` will be updated with appropriate 'lib' subdirectories for each mounted filesystem. The current working directory will be changed to the last `DiskAccess.disk` mounted, or to /flash if no disks were mounted. Then `boot.py` and `main.py` will be executed from the current working directory if they exist. Thanks to @VynDragon for the logic in `zephyr/zephyr_storage.c`. Signed-off-by: Ned Konz <ned@metamagix.tech>
Diffstat (limited to 'docs/esp32/tutorial/intro.rst')
0 files changed, 0 insertions, 0 deletions