diff --git a/pyocd/subcommands/run_cmd.py b/pyocd/subcommands/run_cmd.py index 0c4fea4ad..05bfd42f9 100644 --- a/pyocd/subcommands/run_cmd.py +++ b/pyocd/subcommands/run_cmd.py @@ -206,8 +206,12 @@ def __init__(self, session: Session, core: Optional[int] = None, rtt_config: "RT self.name = "run-server-%d" % self.core - # Semihosting always enabled - self._enable_semihosting = True + # Semihosting enabled by default, + # but can be explicitly disabled via the 'enable_semihosting' option + if session.options.is_set("enable_semihosting"): + self._enable_semihosting = session.options.get("enable_semihosting") + else: + self._enable_semihosting = True # Lock to synchronize SWO with other activity self._lock = threading.RLock()