Commit 9f17b30f authored by John and Tina Peterson's avatar John and Tina Peterson Committed by Øyvind Harboe
Browse files

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".
parent 33a17fd3
...@@ -139,7 +139,7 @@ static int do_semihosting(struct target *target) ...@@ -139,7 +139,7 @@ static int do_semihosting(struct target *target)
case 0x04: /* SYS_WRITE0 */ case 0x04: /* SYS_WRITE0 */
do { do {
unsigned char c; 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) if (retval != ERROR_OK)
return retval; return retval;
if (!c) if (!c)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment