Skip to content

Commit

Permalink
Properly configure debug session
Browse files Browse the repository at this point in the history
  • Loading branch information
valeros committed May 25, 2022
1 parent cb42ece commit 9034e99
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,9 @@ def _add_default_debug_tools(self, board):
board.manifest["debug"] = debug
return board

def configure_debug_options(self, initial_debug_options, ide_data):
debug_options = copy.deepcopy(initial_debug_options)
adapter_speed = initial_debug_options.get("speed")
if adapter_speed:
server_options = debug_options.get("server") or {}
server_executable = server_options.get("executable", "").lower()
if "openocd" in server_executable:
debug_options["server"]["arguments"].extend(
["-c", "adapter speed %s" % adapter_speed]
def configure_debug_session(self, debug_config):
if debug_config.speed:
if "openocd" in (debug_config.server or {}).get("executable", ""):
debug_config.server["arguments"].extend(
["-c", "adapter speed %s" % debug_config.speed]
)

return debug_options

0 comments on commit 9034e99

Please sign in to comment.