diff options
author | Jes B. Klinke <jbk@chromium.org> | 2021-10-06 12:07:30 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-08 00:16:57 +0000 |
commit | 0b21ad072215053b2d1a872d800fe5ad9caadac7 (patch) | |
tree | 4835fd19dbe7dc8fbfe47d708221f1dad3bd5528 /board/boldar | |
parent | 048193fdb82e04f4af067083bc2621619223fdb2 (diff) | |
download | chrome-ec-0b21ad072215053b2d1a872d800fe5ad9caadac7.tar.gz |
common/console: Add support for ^C
When making USB connection to the console, theoretically, one does not
know if a previous session has typed a partial command into the
buffer. One could send a newline before typing the desired command,
but it would be even safer to have a keypress that would discard any
partial command.
In particular, the HyperDebug device to be used with OpenTitan is
similar to Servo micro, but there will not be a daemon like servod
maintaining a single USB connection. Instead each invocation of the
"OpenTitan tool" (somewhat equivalent to dut-control) will establish
its own connection with the USB console endpoint, and issue commands.
This design increases the risk of e.g. a testing script being
interrupted on the development workstation resulting in a partial
command being left on the console.
This change adds support for the Ctrl-C character in the EC console,
having the effect of discarding any input, and printing a new command
prompt. This is similar behavior to most Linux shells.
BUG=b:192262089
BRANCH=none
TEST=Upload to Nucleo board, manually connect to ttyUSBn
Signed-off-by: Jes B. Klinke <jbk@chromium.org>
Change-Id: I082b76a7db4961cd4ce2feb91745c465003d416f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3208915
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/boldar')
0 files changed, 0 insertions, 0 deletions