Skip to content

Commit

Permalink
stm32f1: use PRIx32 macro for debug log
Browse files Browse the repository at this point in the history
When printing a uin32_t, macros from `inttypes.h` should be used.

Signed-off-by: Sean Cross <[email protected]>
  • Loading branch information
xobs committed Nov 9, 2024
1 parent 4fbf817 commit 50140ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/target/stm32f1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 50140ef

Please sign in to comment.