From f131460168162850804a9e598ccc0b30af0a9fac Mon Sep 17 00:00:00 2001 From: Gareth McMullin Date: Tue, 19 Jul 2016 10:44:39 +1200 Subject: [PATCH] Don't use zx format with printf. Doesn't work with newlib. Fixes #144. --- src/target/target.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/target/target.c b/src/target/target.c index 8ba1605..ca851cc 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -140,19 +140,19 @@ void target_add_flash(target *t, struct target_flash *f) static ssize_t map_ram(char *buf, size_t len, struct target_ram *ram) { return snprintf(buf, len, "", - ram->start, ram->length); + "\" length=\"0x%"PRIx64"\"/>", + ram->start, (uint64_t)ram->length); } static ssize_t map_flash(char *buf, size_t len, struct target_flash *f) { int i = 0; i += snprintf(&buf[i], len - i, "", - f->start, f->length); - i += snprintf(&buf[i], len - i, "0x%08zx" + "\" length=\"0x%"PRIx64"\">", + f->start, (uint64_t)f->length); + i += snprintf(&buf[i], len - i, "0x%"PRIx64 "", - f->blocksize); + (uint64_t)f->blocksize); return i; }