diff --git a/src/target/cortexar.c b/src/target/cortexar.c index e603ed28c2d..9526d03ed33 100644 --- a/src/target/cortexar.c +++ b/src/target/cortexar.c @@ -964,16 +964,15 @@ static void cortexr_mem_handle_fault( const cortexar_priv_s *const priv = (cortexar_priv_s *)target->priv; /* If we suffered a fault of some kind, grab the reason and restore DFSR/DFAR */ if (priv->core_status & CORTEXAR_STATUS_DATA_FAULT) { -#if ENABLE_DEBUG == 1 +#ifndef DEBUG_WARN_IS_NOOP const uint32_t fault_status = cortexar_coproc_read(target, CORTEXAR_DFSR); const uint32_t fault_addr = cortexar_coproc_read(target, CORTEXAR_DFAR); + DEBUG_WARN("%s: Failed at 0x%08" PRIx32 " (%08" PRIx32 ")\n", func, fault_addr, fault_status); #else (void)func; #endif cortexar_coproc_write(target, CORTEXAR_DFAR, orig_fault_addr); cortexar_coproc_write(target, CORTEXAR_DFSR, orig_fault_status); - - DEBUG_WARN("%s: Failed at 0x%08" PRIx32 " (%08" PRIx32 ")\n", func, fault_addr, fault_status); } } diff --git a/src/target/imxrt.c b/src/target/imxrt.c index 75601735482..f7f56111ba9 100644 --- a/src/target/imxrt.c +++ b/src/target/imxrt.c @@ -331,7 +331,7 @@ static bool imxrt_ident_device(target_s *const target) priv->flexspi_base = IMXRT117x_FLEXSPI1_BASE; break; default: - DEBUG_TARGET("Unknown ROM fingerprint at %08x = %08x\n", rom_location, fingerprint); + DEBUG_TARGET("Unknown ROM fingerprint at %08" PRIx32 " = %08" PRIx32 "\n", rom_location, fingerprint); break; } diff --git a/src/target/msp432e4.c b/src/target/msp432e4.c index 619da8dd736..19048d3d741 100644 --- a/src/target/msp432e4.c +++ b/src/target/msp432e4.c @@ -224,7 +224,8 @@ bool msp432e4_probe(target_s *const target) (devid1 & MSP432E4_SYS_CTRL_DID1_FAMILY_MASK) != MSP432E4_SYS_CTRL_DID1_MSP432E4) return false; - DEBUG_TARGET("%s: Device version %x:%x, part ID %x, pin count %u, temperature grade %x, package type %x\n", + DEBUG_TARGET("%s: Device version %" PRIx32 ":%" PRIx32 ", part ID %" PRIx32 ", pin count %" PRIu32 + ", temperature grade %" PRIx32 ", package type %" PRIx32 "\n", __func__, (devid0 >> MSP432E4_SYS_CTRL_DID0_VERSION_MAJ_SHIFT) & MSP432E4_SYS_CTRL_DID0_VERSION_MAJ_MASK, devid0 & MSP432E4_SYS_CTRL_DID0_VERSION_MIN_MASK, (devid1 >> MSP432E4_SYS_CTRL_DID1_PART_NUM_SHIFT) & MSP432E4_SYS_CTRL_DID1_PART_NUM_MASK,