summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorJohn and Tina Peterson <jpfp@byu.edu>2011-03-17 07:34:44 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-03-17 07:34:44 +0100
commit9f17b30f8847ba50e7a8ef03ca37cc116e915740 (patch)
tree2307c53fb7aee9e5a5509b9b3df1f76361d8d9b8 /src/target
parent33a17fd35995a7f679f92600055a8f55ae380022 (diff)
downloadopenocd_libswd-9f17b30f8847ba50e7a8ef03ca37cc116e915740.tar.gz
openocd_libswd-9f17b30f8847ba50e7a8ef03ca37cc116e915740.tar.bz2
openocd_libswd-9f17b30f8847ba50e7a8ef03ca37cc116e915740.tar.xz
openocd_libswd-9f17b30f8847ba50e7a8ef03ca37cc116e915740.zip
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".
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm_semihosting.c2
1 files changed, 1 insertions, 1 deletions
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)