From 50140ef225a16e37af3aaef9f14f53c719c9e1b7 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Sat, 9 Nov 2024 23:38:33 +0800 Subject: [PATCH] stm32f1: use PRIx32 macro for debug log When printing a uin32_t, macros from `inttypes.h` should be used. Signed-off-by: Sean Cross --- src/target/stm32f1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/stm32f1.c b/src/target/stm32f1.c index 5d33fd59067..455184203f7 100644 --- a/src/target/stm32f1.c +++ b/src/target/stm32f1.c @@ -678,9 +678,9 @@ bool at32f40x_probe(target_s *target) const bool read_protected = target_mem32_read32(target, FLASH_OBR) & FLASH_OBR_RDPRT; if (read_protected) - DEBUG_TARGET("%s: Read protection enabled, UID reads as 0x%02x\n", __func__, project_id); + DEBUG_TARGET("%s: Read protection enabled, UID reads as 0x%02" PRIx32 "\n", __func__, project_id); - DEBUG_TARGET("%s: idcode = %08" PRIx32 ", project_id = %02x\n", __func__, idcode, project_id); + DEBUG_TARGET("%s: idcode = %08" PRIx32 ", project_id = %02" PRIx32 "\n", __func__, idcode, project_id); /* 0x08: F407 (has EMAC), 0x07: F403A (only CAN+USB). 0x02 is the older F403 (200MHz). */ if (series == AT32F40_SERIES) {