From 16afde7df403fcd514dc48274c5074327f393706 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Wed, 31 Aug 2022 19:19:25 +0800 Subject: [PATCH] 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 --- src/target/cortexm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/target/cortexm.c b/src/target/cortexm.c index cc88a50..5e355fb 100644 --- a/src/target/cortexm.c +++ b/src/target/cortexm.c @@ -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);