Skip to content

Commit

Permalink
imxrt: correct logic of debug guard
Browse files Browse the repository at this point in the history
The previous patch accidentally had `||` rather than `&&`, resulting in
build errors when enabling debug mode on certain hardware targets.
Correct this logic in order to fix builds with certain other platforms.

Signed-off-by: Sean Cross <[email protected]>
  • Loading branch information
xobs authored and dragonmux committed Jul 10, 2023
1 parent a674dff commit 745ed2e
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 || defined(ESP_LOGD))
#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 745ed2e

Please sign in to comment.