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.
This commit is contained in:
Benno Leslie 2013-09-15 19:15:49 +10:00 committed by Gareth McMullin
parent b8f9a2ed4b
commit 3cce6f472c
1 changed files with 3 additions and 0 deletions

View File

@ -989,6 +989,9 @@ static int cortexm_hostio_request(target *t)
gdb_putpacket_f("Fwrite,%08X,%08X,%08X", gdb_putpacket_f("Fwrite,%08X,%08X,%08X",
params[0] - 1, params[1], params[2]); params[0] - 1, params[1], params[2]);
break; break;
case SYS_WRITEC: /* writec */
gdb_putpacket_f("Fwrite,2,%08X,1", arm_regs[1]);
break;
case SYS_ISTTY: /* isatty */ case SYS_ISTTY: /* isatty */
gdb_putpacket_f("Fisatty,%08X", params[0] - 1); gdb_putpacket_f("Fisatty,%08X", params[0] - 1);
break; break;