Skip to content

Add serial terminal section to cli-collaborate.md #1000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 8, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions docs/tools/CLI/cli-collaborate.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,35 @@ $ mbed export -i uvision -m K64F

Mbed CLI creates a `.uvprojx` file in the root project directory. You can open the project file with uVision.

#### Serial terminal

You can open a serial terminal to the serial port of a connected Mbed target (usually board) using the `mbed sterm` command. If no serial port is specified, Mbed CLI will attempt to detect the connected Mbed targets and their serial ports.

There are various options to `mbed sterm`:

- `--port <serial port>` to specify system serial port to connect to.
- `--baudrate <numeric>` to select the communication baudrate, where the default value is 9600.
- `--echo <on|off>` to switch local echo (default is `on`).
- `--reset` to reset the connected target by sending Break before opening the serial terminal.

You can also set default port, baudrate and echo mode using the `TERM_PORT`, `TERM_BAUDRATE` and `TERM_ECHO` Mbed CLI configuration options.

The following shortcuts are available within the serial terminal:

- Ctrl+b - Send Break (reset target)
- Ctrl+c - Exit terminal
- Ctrl+e - Toggle local echo
- Ctrl+h - Help
- Ctrl+t - Menu escape key

More shortcuts can be viewed within the serial terminal's help menu (Ctrl+h).

You can also add the `--sterm` option to `mbed compile -f` to compile a new program, flash the program/firmware image to the connected target and then open the serial terminal to its serial port:

```
$ mbed compile -t GCC_ARM -m K64F -f --sterm
```

### Publishing changes

#### Checking status
Expand Down