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".
This commit is contained in:
John and Tina Peterson 2011-03-17 07:34:44 +01:00 committed by Øyvind Harboe
parent 33a17fd359
commit 9f17b30f88
1 changed files with 1 additions and 1 deletions

View File

@ -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)