MBEDLS(1)
π MBEDLS π
okay bestie, gather round β this is the manual page for mbedls, a User Commands situation, and honestly? it's giving "I just want to know what's plugged into my computer." Let's go. π¦
β¨ NAME β¨
mbedls</purl> β detect and list Mbed Enabled devices connected to the host computer. that's it, that's the whole vibe. π
β¨ SYNOPSIS β¨
mbedls [--simple|--json] [--debug]
mbedls --list
mbedls --mock ID:NAME
mbedls --help
mbedls --version
β¨ DESCRIPTION β¨
So here's the tea: mbedls detects and lists ARM Mbed Enabled devices connected to the host computer. no cap.
For all the connected boards, it gives you the following info in a console (terminal) output:
- Mbed OS platform name
- mount point (MSD or disk)
- serial port
πΈ Heads up bestie: mbedls requires that an Mbed device be mounted before it shows up in the results. Many systems do not automatically mount USB devices. It is recommended that you use an automounter to manage this for you. (yes, really. the mount is the moment. π
)
β¨ OPTIONS β¨
-s,--simpleβ lists attached targets, but without the column headers and borders. minimalism era. β¨-j,--jsonβ lists attached targets with detailed information, in JSON format.-J,--json-by-target-idβ maps attached targets from their target ID to their detailed information, in JSON format.-p,--json-platformsβ lists attached platform names in JSON format.-P,--json-platforms-extβ maps attached platform names to the number of attached boards, in JSON format.-l,--listβ lists all target IDs and their corresponding platform names thatmbedlsunderstands.-m,--mock ID:NAMEβ substitutes or creates a target ID to platform name mapping used when invokingmbedlsin the current directory.--skip-retargetβ skips parsing and interpretation of the re-target file,./mbedls.json.-u,--list-unmountedβ lists mbeds, regardless of whether they are mounted or not.-d,--debugβ outputs extra debug information, useful when creating issues! π--helpβ print usage details and exit--versionβ print package version and exit
π RESULT FORMATS π
The mbedls command-line accepts a few arguments to change the format of the results. The default format is a table. You may pass --simple to simplify this table format, and --json to print the table as a JSON list of the rows. pick your fighter. π
Simple (no table formatting)
$ mbedls --simple
K64F K64F[0] D: COM18 0240000032044e4500257009997b00386781000097969900 0244
JSON
$ mbedls --json
[
{
"daplink_auto_reset": "0",
"daplink_automation_allowed": "1",
"daplink_bootloader_crc": "0xa65218eb",
"daplink_bootloader_version": "0242",
"daplink_daplink_mode": "Interface",
"daplink_git_sha": "67f8727a030bcc585e982d899fb6382db56d673b",
"daplink_hic_id": "97969900",
"daplink_interface_crc": "0xe4422294",
"daplink_interface_version": "0244",
"daplink_local_mods": "0",
"daplink_overflow_detection": "1",
"daplink_remount_count": "0",
"daplink_unique_id": "0240000032044e4500257009997b00386781000097969900",
"daplink_usb_interfaces": "MSD, CDC, HID",
"daplink_version": "0244",
"mount_point": "D:",
"platform_name": "K64F",
"platform_name_unique": "K64F[0]",
"product_id": "0204",
"serial_port": "COM18",
"target_id": "0240000032044e4500257009997b00386781000097969900",
"target_id_mbed_htm": "0240000032044e4500257009997b00386781000097969900",
"target_id_usb_id": "0240000032044e4500257009997b00386781000097969900",
"vendor_id": "0d28"
}
]
π MOCKING (RENAMING) PLATFORMS π
Want to rename a platform? iconic behavior. Override a platform's name using the --mock parameter:
$ mbedls --mock 0240:MY_NEW_PLATFORM
$ mbedls
+-----------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
| platform_name | platform_name_unique | mount_point | serial_port | target_id | daplink_version |
+-----------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
| MY_NEW_PLATFORM | MY_NEW_PLATFORM[0] | D: | COM18 | 0240000032044e4500257009997b00386781000097969900 | 0244 |
+-----------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
The --mock parameter accepts a platform ID and a platform name, separated by the : character. The platform ID is the first 4 characters of the target_id. The platform name is the name you are temporarily assigning to this platform.
To remove a mocked platform, use the --mock parameter again. Continuing from the previous example, use -<platform id> as the value:
$ mbedls --mock -0240
$ mbedls
+---------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
| platform_name | platform_name_unique | mount_point | serial_port | target_id | daplink_version |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
| K64F | K64F[0] | D: | COM18 | 0240000032044e4500257009997b00386781000097969900 | 0244 |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
You can also remove all mocked platforms by supplying * as the target_id:
$ mbedls --mock="-*"
π NOTE: Due to a quirk in the parameter formatting, the command-line can interpret-*as another parameter instead of a value. It is necessary to use the complete--mock="-*"syntax, so the command-line interprets each part of the command correctly. don't skip this one bestie, it will bite you.
π¦ RETARGETTING PLATFORMS π¦
It is possible to change the returned results for certain platforms depending on the current directory. This is especially useful when developing new platforms. β¨
The command-line tool and Python API check the current directory for a file named mbedls.json. When it is present, it overrides the returned values. The format of the mbedls.json file is:
{
"<target_id>": {
"<key>": "<value>"
}
}
For example, to change the serial_port of the K64F with a target_id of 0240000032044e4500257009997b00386781000097969900, the mbedls.json file contains the following:
{
"0240000032044e4500257009997b00386781000097969900": {
"serial_port": "COM99"
}
}
This results in the following output from the command-line tool:
$ mbedls
+---------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
| platform_name | platform_name_unique | mount_point | serial_port | target_id | daplink_version |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
| K64F | K64F[0] | D: | COM99 | 0240000032044e4500257009997b00386781000097969900 | 0244 |
+---------------+----------------------+-------------+-------------+--------------------------------------------------+-----------------+
Note how the serial_port value changed from COM18 to COM99. Deleting the mbedls.json or using the --skip-retarget parameter removes these changes. the way that file just... rewrites reality. main character energy fr.
πΈ FILES πΈ
mbedls.jsonβ Per-user re-target file
π REPORTING BUGS π
Upstream bug tracker: https://github.com/ARMmbed/mbed-ls/issues
(if something's broken, it's not you, it's them. tell them. π«Ά)
π COPYRIGHT π
Copyright (c) 2011-2015 ARM Limited
β AUTHOR β
This manual page is based on the mbedls documentation. It was created by Nick Morrott nickm@debian.org for the Debian GNU/Linux system, but may be used by others.
π₯ SEE ALSO π₯
and that's the whole page bestie π this was version 1.6.2+dfsg, dated December 2018 β go mount something and slay. periodt. πβ¨π¦
π¦ where this page comes from
- debian trixie: python3-mbed-ls 1.6.2+dfsg-12 Β· Apache-2.0
- ubuntu resolute: python3-mbed-ls 1.6.2+dfsg-12 Β· Apache-2.0
- ubuntu stonking: python3-mbed-ls 1.6.2+dfsg-12 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms