summaryrefslogtreecommitdiffstatshomepage
path: root/ports
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2025-06-12 10:52:32 +1000
committerDamien George <damien@micropython.org>2025-06-14 01:06:27 +1000
commitfa393feaed16eb040c3fa7f57537eca1404f6f70 (patch)
treed1e5923fe664bfbd0dc4444d8a55af28205efb71 /ports
parent6201e77999b3614518abc4b21773e735d9b0b0ee (diff)
downloadmicropython-master.tar.gz
micropython-master.zip
esp32/README: Update README to describe auto filesystem sizing.HEADmaster
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports')
-rw-r--r--ports/esp32/README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/ports/esp32/README.md b/ports/esp32/README.md
index e11c64ad70..d8b55e45f3 100644
--- a/ports/esp32/README.md
+++ b/ports/esp32/README.md
@@ -221,6 +221,30 @@ import machine
antenna = machine.Pin(16, machine.Pin.OUT, value=0)
```
+Partition table and filesystem size
+-----------------------------------
+
+ESP32 firmware contains a bootloader, partition table and main application
+firmware, which are all stored in (external) SPI flash. The user filesystem
+is also stored in the same SPI flash. By default, MicroPython does not have
+a fixed entry in the ESP32 partition table for the filesystem. Instead it
+will automatically determine the size of the SPI flash upon boot, and then --
+so long as there is no existing partition called "vfs" or "ffat" -- it will
+create a partition for the filesystem called "vfs" which takes all of the
+remaining flash between the end of the last defined partition up until the
+end of flash.
+
+This means that firmware built for, say, a 4MiB flash will work on any
+device that has at least 4MiB flash. The user "vfs" filesystem will then
+take up as much space as possible.
+
+This auto-detection behaviour can be overridden: if the ESP32 partition
+table does contain an entry called "vfs" or "ffat" then these are used for
+the user filesystem and no automatic "vfs" partition is added. This is
+useful in cases where only the MicroPython ESP32 application is flashed to
+the device (and not the bootloader or partition table), eg when deploying
+.uf2 files.
+
Defining a custom ESP32 board
-----------------------------