summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2023-05-30 17:31:05 +1000
committerDamien George <damien@micropython.org>2023-06-02 16:16:28 +1000
commitbd5d0163c4aa11fda2afad19396c741e40843a5f (patch)
tree4f87e1803d3d0fc00fad5ad9c5af3a14d4b33ea6 /tools
parentb6b19798c21f8d8da6230c2c588a74997a71a853 (diff)
docs/reference/mpremote.rst: Extend the mpremote guide.
Changes in this commit: - Add a extra detail to each of the commands. - Add more about handling options and arguments. - Include shortcut commands that behave like real commands to the command list (e.g. bootloader, rtc). - Add extra information and reword to address common misconceptions, in particular how commands chain together. - Add additional examples showing some more interesting combinations. - Add descriptions to each of the examples. - Add pipx installation instructions. - Describe how user-configuration works. This work was sponsored by Google Season of Docs. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/mpremote/mpremote/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/mpremote/mpremote/main.py b/tools/mpremote/mpremote/main.py
index dad14b78b..cb96369a5 100644
--- a/tools/mpremote/mpremote/main.py
+++ b/tools/mpremote/mpremote/main.py
@@ -306,7 +306,7 @@ _BUILTIN_COMMAND_EXPANSIONS = {
"command": "connect list",
"help": "list available serial ports",
},
- # Filesystem shortcuts.
+ # Filesystem shortcuts (use `cp` instead of `fs cp`).
"cat": "fs cat",
"ls": "fs ls",
"cp": "fs cp",
@@ -314,6 +314,7 @@ _BUILTIN_COMMAND_EXPANSIONS = {
"touch": "fs touch",
"mkdir": "fs mkdir",
"rmdir": "fs rmdir",
+ # Disk used/free.
"df": [
"exec",
"import uos\nprint('mount \\tsize \\tused \\tavail \\tuse%')\nfor _m in [''] + uos.listdir('/'):\n _s = uos.stat('/' + _m)\n if not _s[0] & 1 << 14: continue\n _s = uos.statvfs(_m)\n if _s[0]:\n _size = _s[0] * _s[2]; _free = _s[0] * _s[3]; print(_m, _size, _size - _free, _free, int(100 * (_size - _free) / _size), sep='\\t')",