From 173a86675cbdec604058dd1d45f65ab2e13f455d Mon Sep 17 00:00:00 2001 From: Fabien Chouteau Date: Fri, 27 Jan 2017 19:40:56 +0100 Subject: [PATCH] Semihosting: Add support of SYS_READC --- src/gdbserver/semihosting.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gdbserver/semihosting.c b/src/gdbserver/semihosting.c index 4ea6ccf5c..983612961 100644 --- a/src/gdbserver/semihosting.c +++ b/src/gdbserver/semihosting.c @@ -457,6 +457,12 @@ int do_semihosting (stlink_t *sl, uint32_t r0, uint32_t r1, uint32_t *ret) { } break; } + case SYS_READC: + { + uint8_t c = getchar(); + *ret = c; + break; + } case SYS_WRITE0: { uint8_t buf[WRITE0_BUFFER_SIZE];