aboutsummaryrefslogtreecommitdiff
path: root/src/cortexm.c
diff options
context:
space:
mode:
authorBenno Leslie2013-09-15 19:15:49 +1000
committerGareth McMullin2013-10-05 13:14:03 +0800
commit3cce6f472c79efd53c474bb0173b9c2e2f43c5d4 (patch)
treeecf0e083068e6babdb1342b3212c204f191e572e /src/cortexm.c
parentb8f9a2ed4b607e5152eb007a100373b3253e32a0 (diff)
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.
Diffstat (limited to 'src/cortexm.c')
-rw-r--r--src/cortexm.c3
1 files changed, 3 insertions, 0 deletions
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;