Skip to content

Commit b7aa945

Browse files
committed
docs: Add note about --fs swallowing non-option arguments.
Includes suggestions of how to use `--fs` commands with firmware files and devices. Closes: #6
1 parent f7e97e5 commit b7aa945

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

README.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,23 @@
11
# mp-image-tool-esp32: Working with esp32 firmware files and devices
22

3-
![CI Tests](https://github.com/glenn20/mp-image-tool-esp32/actions/workflows/ci-tests.yaml/badge.svg)
4-
![CI Tests](https://github.com/glenn20/mp-image-tool-esp32/actions/workflows/ci-release.yaml/badge.svg)
3+
[![PyPI](
4+
https://img.shields.io/pypi/v/mp-image-tool-esp32)](
5+
https://pypi.org/project/mp-image-tool-esp32)
6+
[![PyPI Supported Python Versions](
7+
https://img.shields.io/pypi/pyversions/mp-image-tool-esp32.svg)](
8+
https://pypi.python.org/pypi/mp-image-tool-esp32/)
9+
[![GitHub Actions (Tests)](
10+
https://github.com/glenn20/mp-image-tool-esp32/actions/workflows/ci-tests.yaml/badge.svg)](
11+
https://github.com/glenn20/mp-image-tool-esp32/actions/workflows/ci-tests.yaml)
12+
[![GitHub Actions (Publish)](
13+
https://github.com/glenn20/mp-image-tool-esp32/actions/workflows/ci-release.yaml/badge.svg)](
14+
https://github.com/glenn20/mp-image-tool-esp32/actions/workflows/ci-release.yaml)
15+
[![PyPI - License](
16+
https://img.shields.io/pypi/l/mp-image-tool-esp32)](
17+
https://opensource.org/licenses/MIT)
18+
[![pre-commit](
19+
https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](
20+
https://github.com/pre-commit/pre-commit)
521

622
Tool for manipulating partition tables and files in MicroPython esp32 firmware
723
image files and device flash storage.
@@ -292,6 +308,12 @@ Eg. `mp-image-tool-esp32 a0 --fs mkfs vfs --fs put ./rootfs/* /` will create
292308
a new littlefs filesystem on the 'vfs' partition and initialise it with the
293309
files from `./rootfs/` on the local computer.
294310

311+
`--fs` commands will swallow any non-option arguments following, so use `--` to
312+
separate them if needed, eg:
313+
314+
- `mp-image-tool-esp32 --fs ls /lib /bin -- firmware.bin` or
315+
- `mp-image-tool-esp32 firmware.bin --fs ls /lib /bin`.
316+
295317
You can also use [`littlefs-python`](https://github.com/jrast/littlefs-python)
296318
to build filesystem partitions on your computer and flash them to the device,
297319
eg:

src/mp_image_tool_esp32/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,8 @@ class TypedNamespace(argparse.Namespace):
155155
K=kilobytes, B=blocks (0x1000=4096 bytes)).
156156
157157
--fs commands include: ls, get, put, mkdir, rm, rename, cat, info, mkfs,
158-
df, grow and more.
158+
df, grow and more. --fs will swallow any non-option arguments following, so
159+
use `--` to separate them if needed, eg `--fs ls /lib /bin -- firmware.bin`.
159160
160161
Options --erase-fs and --ota-update can only be used when operating on
161162
serial-attached devices (not firmware files).

0 commit comments

Comments
 (0)