Don't use zx format with printf. Doesn't work with newlib.

Fixes #144.
This commit is contained in:
Gareth McMullin 2016-07-19 10:44:39 +12:00
parent de603f4bd8
commit f131460168
1 changed files with 6 additions and 6 deletions

View File

@ -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, "<memory type=\"ram\" start=\"0x%08"PRIx32
"\" length=\"0x%08zx\"/>",
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, "<memory type=\"flash\" start=\"0x%08"PRIx32
"\" length=\"0x%08zx\">",
f->start, f->length);
i += snprintf(&buf[i], len - i, "<property name=\"blocksize\">0x%08zx"
"\" length=\"0x%"PRIx64"\">",
f->start, (uint64_t)f->length);
i += snprintf(&buf[i], len - i, "<property name=\"blocksize\">0x%"PRIx64
"</property></memory>",
f->blocksize);
(uint64_t)f->blocksize);
return i;
}