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 10, 2023
1 parent 799a408 commit f92458b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/target/imxrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ 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) || (PC_HOSTED == 1 || defined(ESP_LOGD))
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);
Expand Down

0 comments on commit f92458b

Please sign in to comment.