diff --git a/src/target/imxrt.c b/src/target/imxrt.c index 7d4eab1d3ac..bbd68a1a9c5 100644 --- a/src/target/imxrt.c +++ b/src/target/imxrt.c @@ -172,10 +172,10 @@ bool imxrt_probe(target_s *const target) target->target_options |= CORTEXM_TOPT_INHIBIT_NRST; target->driver = "i.MXRT10xx"; -#if defined(ENABLE_DEBUG) && PC_HOSTED == 1 +#if defined(ENABLE_DEBUG) const uint8_t boot_mode = (target_mem_read32(target, IMXRT_SRC_BOOT_MODE2) >> 24U) & 3U; -#endif DEBUG_TARGET("i.MXRT boot mode is %x\n", boot_mode); +#endif const uint32_t boot_cfg = target_mem_read32(target, IMXRT_SRC_BOOT_MODE1); DEBUG_TARGET("i.MXRT boot config is %08" PRIx32 "\n", boot_cfg); priv->boot_source = imxrt_boot_source(boot_cfg);