Skip to content

Commit

Permalink
imxrt: ungate boot_mode even on non-hosted
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
xobs committed Jul 9, 2023
1 parent 799a408 commit 0f51d8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/target/imxrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0f51d8c

Please sign in to comment.