MBEDLS(1)

πŸ“¦
version 1.6.2 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 that mbedls understands.
  • -m, --mock ID:NAME β€” substitutes or creates a target ID to platform name mapping used when invoking mbedls in 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 (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 πŸ”₯

yotta(1), valinor(1)


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