cortexm: fix printf format for cpuid_partno

Use %04x instead of PRIx32. We can't use PRIx16, since apparently it
doesn't work reliably with ARM newlib.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2022-08-31 19:19:25 +08:00 committed by Rachel Mant
parent 665138f9e3
commit 16afde7df4
1 changed files with 1 additions and 1 deletions

View File

@ -526,7 +526,7 @@ static void cortexm_read_cpuid(target *const t, const ADIv5_AP_t *const ap)
break;
default:
if (ap->designer_code != JEP106_MANUFACTURER_ATMEL) /* Protected Atmel device?*/
DEBUG_WARN("Unexpected Cortex-M CPU partno %04" PRIx32 "\n", cpuid_partno);
DEBUG_WARN("Unexpected Cortex-M CPU partno %04x\n", cpuid_partno);
}
DEBUG_INFO("CPUID 0x%08" PRIx32 " (%s var %" PRIx32 " rev %" PRIx32 ")\n", t->cpuid, t->core,
(t->cpuid & CPUID_REVISION_MASK) >> 20, t->cpuid & CPUID_PATCH_MASK);