Skip to content

Commit f1cc2ad

Browse files
author
Amanda Butler
authored
Merge pull request #1000 from ARMmbed/AnotherButler-patch-5
Add serial terminal section to cli-collaborate.md
2 parents 56f9852 + 745665a commit f1cc2ad

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

docs/tools/CLI/cli-collaborate.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,35 @@ $ mbed export -i uvision -m K64F
101101

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

104+
#### Serial terminal
105+
106+
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.
107+
108+
There are various options to `mbed sterm`:
109+
110+
- `--port <serial port>` to specify system serial port to connect to.
111+
- `--baudrate <numeric>` to select the communication baudrate, where the default value is 9600.
112+
- `--echo <on|off>` to switch local echo (default is `on`).
113+
- `--reset` to reset the connected target by sending Break before opening the serial terminal.
114+
115+
You can also set default port, baudrate and echo mode using the `TERM_PORT`, `TERM_BAUDRATE` and `TERM_ECHO` Mbed CLI configuration options.
116+
117+
The following shortcuts are available within the serial terminal:
118+
119+
- Ctrl+b - Send Break (reset target)
120+
- Ctrl+c - Exit terminal
121+
- Ctrl+e - Toggle local echo
122+
- Ctrl+h - Help
123+
- Ctrl+t - Menu escape key
124+
125+
More shortcuts can be viewed within the serial terminal's help menu (Ctrl+h).
126+
127+
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:
128+
129+
```
130+
$ mbed compile -t GCC_ARM -m K64F -f --sterm
131+
```
132+
104133
### Publishing changes
105134

106135
#### Checking status

0 commit comments

Comments
 (0)