From 0f51d8c5798cb4fef8a97f0f6d0f066ff20b6666 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Mon, 10 Jul 2023 07:17:52 +0800 Subject: [PATCH] imxrt: ungate boot_mode even on non-hosted When building debug mode for hardware, the `boot_mode` flag is consulted. However, the `boot_mode` flag is only present when debug mode is enabled on PC_HOSTED. Remove the requirement for this to be built on PC_HOSTED in order to fix compiling when built on native hardware with debug mode enabled. Signed-off-by: Sean Cross --- src/target/imxrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);