semihosting: permit redirection of semihosting I/O to TCP
authorTarek BOCHKATI <tarek.bouchkati@gmail.com>
Mon, 6 Apr 2020 12:30:26 +0000 (13:30 +0100)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 19 Mar 2022 09:11:05 +0000 (09:11 +0000)
commitb9526f1401271a00dd72cf7ec8bded32e77d41ff
tree3a76c72f0bb7e11654d47b44ce281adc325de887
parent4e5dbecd9b1ac780181e04f8b51a4cd133c4cdbe
semihosting: permit redirection of semihosting I/O to TCP

This command permits the usage of a TCP port to perform debug and stdio
operations:
 - debug : READC, WRITEC and WRITE0
 - stdio : READ, WRITE

This will permit the separation of semihosting message from OpenOCD log,
and separate semihosting messages per core.

syntax: arm semihosting_redirect (disable | tcp <port> [debug|stdio|all])

this allows to select which operations to be performed via TCP (debug,
stdio or all (default)).

Note: for stdio operations, only I/O from/to ':tt' file descriptors are
redirected.

tested using netcat on ubuntu

Change-Id: I37053463667ba109d52429d4f98bc98d0ede298d
Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/5562
Tested-by: jenkins
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
doc/openocd.texi
src/target/semihosting_common.c
src/target/semihosting_common.h