summaryrefslogtreecommitdiffstatshomepage
path: root/docs/reference
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-03-04 10:57:46 +1100
committerDamien George <damien@micropython.org>2025-03-06 12:52:35 +1100
commit0c98c60b68bf338c695d43e41b15def59949eb39 (patch)
tree635f59a8fbf5231dedbc062d9a52e4bb2d2b3030 /docs/reference
parent840b641024cffd0b4e3f941e53c699c699c21811 (diff)
downloadmicropython-0c98c60b68bf338c695d43e41b15def59949eb39.tar.gz
micropython-0c98c60b68bf338c695d43e41b15def59949eb39.zip
tools/mpremote: Add romfs query, build and deploy commands.
These commands use the `vfs.rom_ioctl()` function to manage the ROM partitions on a device, and create and deploy ROMFS images. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/mpremote.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/reference/mpremote.rst b/docs/reference/mpremote.rst
index d4c6983595..ef23cd85c2 100644
--- a/docs/reference/mpremote.rst
+++ b/docs/reference/mpremote.rst
@@ -78,6 +78,7 @@ The full list of supported commands are:
- `mip <mpremote_command_mip>`
- `mount <mpremote_command_mount>`
- `unmount <mpremote_command_unmount>`
+- `romfs <mpremote_command_romfs>`
- `rtc <mpremote_command_rtc>`
- `sleep <mpremote_command_sleep>`
- `reset <mpremote_command_reset>`
@@ -347,6 +348,29 @@ The full list of supported commands are:
This happens automatically when ``mpremote`` terminates, but it can be used
in a sequence to unmount an earlier mount before subsequent command are run.
+.. _mpremote_command_romfs:
+
+- **romfs** -- manage ROMFS partitions on the device:
+
+ .. code-block:: bash
+
+ $ mpremote romfs <sub-command>
+
+ ``<sub-command>`` may be:
+
+ - ``romfs query`` to list all the available ROMFS partitions and their size
+ - ``romfs [-o <output>] build <source>`` to create a ROMFS image from the given
+ source directory; the default output file is the source appended by ``.romfs``
+ - ``romfs [-p <partition>] deploy <source>`` to deploy a ROMFS image to the device;
+ will also create a temporary ROMFS image if the source is a directory
+
+ The ``build`` and ``deploy`` sub-commands both support the ``-m``/``--mpy`` option
+ to automatically compile ``.py`` files to ``.mpy`` when creating the ROMFS image.
+ This option is enabled by default, but only works if the ``mpy_cross`` Python
+ package has been installed (eg via ``pip install mpy_cross``). If the package is
+ not installed then a warning is printed and ``.py`` files remain as is. Compiling
+ of ``.py`` files can be disabled with the ``--no-mpy`` option.
+
.. _mpremote_command_rtc:
- **rtc** -- set/get the device clock (RTC):