From 3cce6f472c79efd53c474bb0173b9c2e2f43c5d4 Mon Sep 17 00:00:00 2001 From: Benno Leslie Date: Sun, 15 Sep 2013 19:15:49 +1000 Subject: [PATCH] Add support for the SYS_WRITEC semihosting operation. This is implemented in the same manner as QEMU semihosting support, specifically, a SYS_WRITEC results in a single character write to STDERR. --- src/cortexm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/cortexm.c b/src/cortexm.c index a8bb34b..1fc5978 100644 --- a/src/cortexm.c +++ b/src/cortexm.c @@ -989,6 +989,9 @@ static int cortexm_hostio_request(target *t) gdb_putpacket_f("Fwrite,%08X,%08X,%08X", params[0] - 1, params[1], params[2]); break; + case SYS_WRITEC: /* writec */ + gdb_putpacket_f("Fwrite,2,%08X,1", arm_regs[1]); + break; case SYS_ISTTY: /* isatty */ gdb_putpacket_f("Fisatty,%08X", params[0] - 1); break;