From 9f17b30f8847ba50e7a8ef03ca37cc116e915740 Mon Sep 17 00:00:00 2001 From: John and Tina Peterson Date: Thu, 17 Mar 2011 07:34:44 +0100 Subject: [PATCH] SYS_WRITE0 fix Problem is, trying to print "Hello, world!\n" just prints endless H's, because r1 is never incremented. One way to fix it would be to add a "++" after "r1". --- src/target/arm_semihosting.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/arm_semihosting.c b/src/target/arm_semihosting.c index a247cc88..903145c5 100644 --- a/src/target/arm_semihosting.c +++ b/src/target/arm_semihosting.c @@ -139,7 +139,7 @@ static int do_semihosting(struct target *target) case 0x04: /* SYS_WRITE0 */ do { unsigned char c; - retval = target_read_memory(target, r1, 1, 1, &c); + retval = target_read_memory(target, r1++, 1, 1, &c); if (retval != ERROR_OK) return retval; if (!c) -- 2.39.5