---
name: "mbedhtrun"
section: "1"
platform: "linux"
package: "python3-mbed-host-tests"
version: "1.4.4-11"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mbedhtrun"
---

# mbedhtrun(1)

flash, reset and perform host-supervised tests on Mbed platforms

## NAME

**mbedhtrun** - flash, reset and perform host-supervised tests on Mbed platforms

## SYNOPSIS

**mbedhtrun** **--image-path** *FLASH\_FILE* **--micro** *MICRO*

          **--port** *PORT* **--disk** *TARGET\_PATH*

         \[**--target-id** *TARGET\_ID*\] \[**--sync** *SYNC*\]

         \[**--sync-timeout** *TIMEOUT*\] \[**--copy** *METHOD*\]

         \[**--retry-copy** *ATTEMPTS*\] \[**--tag-filters** *FILTERS*\]

         \[**--reset**\] \[**--program\_cycle\_s** *TIMEOUT*\]

         \[**--reset-timeout** *TIMEOUT*\] \[**--process-start-timeout** *TIMEOUT*\]

         \[**--polling-timeout** *TIMEOUT*\]

         \[**--enum-host-tests** *DIR*\] \[**--test-cfg** *FILE*\]

         \[**--run**\] \[**--skip-flashing**\] \[**--skip-reset**\]

         \[**--send-break**\] \[**--baud-rate** *BAUD\_RATE*\]

         \[**--serial-output-file** *FILE*\] \[**--compare-log** *FILE*\]

         \[**--verbose**\]

**mbedhtrun** **–-list**

**mbedhtrun** **–-plugins**

**mbedhtrun** **–-version**

**mbedhtrun** **–-help**

## DESCRIPTION

**mbedhtrun** supports flashing, resetting and testing of Mbed Enabled devices from the command line.

Whilst test automation tools such as **mbed-test-wrapper** can provide automated flashing and testing of Mbed devices, **mbedhtrun** provides a simple and convenient CLI to flash, reset and test devices directly.

## OPTIONS

- \-f, --image-path *FLASH\_FILE*

  path to file to flash

- \-m, --micro *MICRO*

  target microcontroller name

- \-p, --port *PORT*

  serial port of the target

- \-d, --disk *TARGET\_PATH*

  target disk (mount point) path

- \-t, --target-id *TARGET\_ID*

  unique Target ID or Mbed platform

- \--sync *SYNC*

  how many times \_\_sync packet will be sent to device (0: none; -1: forever; 1,2,3...: number of times; default: 2)

- \--sync-timeout *TIMEOUT*

  delay in seconds between \_\_sync packet (default: 5)

- \-c, --copy *METHOD*

  copy (flash the target) method selector

- \--retry-copy *ATTEMPTS*

  number of attempts to flash the target (default: 3)

- \--tag-filters *FILTERS*

  comma-separated list of device tags used when allocating a target to specify required hardware or attributes \[–tag-filters tag1,tag2\]

- \-r, --reset

  force different type of reset

- \-C, --program\_cycle\_s *TIMEOUT*

  duration for program to sleep after copying binary onto target (default: 4)

- \-R, --reset-timeout *TIMEOUT*

  when forcing a reset (with -r), specify a post-reset idle delay in seconds (default: 1)

- \--process-start-timeout *TIMEOUT*

  set maximum time (seconds) to wait for an internal process to start (default: 60)

- \-e, --enum-host-tests *DIR*

  define directory with local host tests (default: ./test/host\_tests)

- \--test-cfg *FILE*

  specify test class data about host test configuration

- \--run

  runs binary image on target (workflow: flash, reset, output console)

- \--skip-flashing

  skips use of copy/flash plugin. Note: target will not be reflashed

- \--skip-reset

  skips use of reset plugin. Note: target will not be reset

- \-P, --polling-timeout *TIMEOUT*

  timeout (seconds) for readiness of mount point and serial port of local or remote device (default: 60)

- \-b, --send-break

  send reset signal to board on specified port (-p PORT) and print serial output; can be combined with `-r RESET_TYPE` switch

- \--baud-rate *BAUD\_RATE*

  baud rate of target; overrides values from mbed-ls, disk/mount point (-d, --disk-path), and serial port -p :

- \-v, --verbose

  enable verbose mode

- \--serial-output-file *FILE*

  save target serial output to this file

- \--compare-log *FILE*

  log file to compare with the serial output from target

- \--list

  print registered host test and exit

- \--plugins

  print registered plugins and exit

- \--version

  print version and exit

- \--help

  print usage details and exit

## EXAMPLES

To flash the file `test.bin` to the mounted path `/mnt/MBED` on the `K64F` microcontroller, using the `shell` copy method with target serial port `COM5`, and sleeping for 5 seconds after flashing, run:

-

  ```
  $ mbedhtrun --disk /mnt/MBED --port COM5 --image-path "test.bin" -C 4 --copy shell --micro K64F
  ```

## REPORTING BUGS

Upstream bug tracker: https://github.com/ARMmbed/htrun/issues

## COPYRIGHT

Copyright (c) 2011-2018 ARM Limited

## AUTHOR

This manual page is based on the mbed-host-tests documentation. It was created by Nick Morrott ⟨nickm@debian.org⟩\\c  for the Debian GNU/Linux system, but may be used by others

## SEE ALSO

[**yotta**(1)](/yotta/1.md), [**mbed-test-wrapper**(1)](/mbed-test-wrapper/1.md), [**mbedflsh**(1)](/mbedflsh/1.md)
