mirror of
https://github.com/platformio/platformio-core.git
synced 2025-08-01 02:54:25 +02:00
Fix "pio_reset_run_target" for JLink debug probe
This commit is contained in:
@@ -133,18 +133,18 @@ class GDBClient(BaseProcess): # pylint: disable=too-many-instance-attributes
|
|||||||
commands = self.debug_options["init_cmds"]
|
commands = self.debug_options["init_cmds"]
|
||||||
commands.extend(self.debug_options["extra_cmds"])
|
commands.extend(self.debug_options["extra_cmds"])
|
||||||
|
|
||||||
if not any("define pio_reset_target" in cmd for cmd in commands):
|
if not any("define pio_reset_run_target" in cmd for cmd in commands):
|
||||||
commands = [
|
commands = [
|
||||||
"define pio_reset_target",
|
"define pio_reset_run_target",
|
||||||
" echo Warning! Undefined pio_reset_target command\\n",
|
" echo Warning! Undefined pio_reset_run_target command\\n",
|
||||||
" mon reset",
|
" monitor reset",
|
||||||
"end",
|
"end",
|
||||||
] + commands
|
] + commands
|
||||||
if not any("define pio_reset_halt_target" in cmd for cmd in commands):
|
if not any("define pio_reset_halt_target" in cmd for cmd in commands):
|
||||||
commands = [
|
commands = [
|
||||||
"define pio_reset_halt_target",
|
"define pio_reset_halt_target",
|
||||||
" echo Warning! Undefined pio_reset_halt_target command\\n",
|
" echo Warning! Undefined pio_reset_halt_target command\\n",
|
||||||
" mon reset halt",
|
" monitor reset halt",
|
||||||
"end",
|
"end",
|
||||||
] + commands
|
] + commands
|
||||||
if not any("define pio_restart_target" in cmd for cmd in commands):
|
if not any("define pio_restart_target" in cmd for cmd in commands):
|
||||||
@@ -193,7 +193,7 @@ class GDBClient(BaseProcess): # pylint: disable=too-many-instance-attributes
|
|||||||
if b"-gdb-exit" in data or data.strip() in (b"q", b"quit"):
|
if b"-gdb-exit" in data or data.strip() in (b"q", b"quit"):
|
||||||
# Allow terminating via SIGINT/CTRL+C
|
# Allow terminating via SIGINT/CTRL+C
|
||||||
signal.signal(signal.SIGINT, signal.default_int_handler)
|
signal.signal(signal.SIGINT, signal.default_int_handler)
|
||||||
self.transport.write(b"pio_reset_target\n")
|
self.transport.write(b"pio_reset_run_target\n")
|
||||||
self.transport.write(data)
|
self.transport.write(data)
|
||||||
|
|
||||||
def processEnded(self, reason): # pylint: disable=unused-argument
|
def processEnded(self, reason): # pylint: disable=unused-argument
|
||||||
|
@@ -17,7 +17,7 @@ define pio_reset_halt_target
|
|||||||
monitor reset halt
|
monitor reset halt
|
||||||
end
|
end
|
||||||
|
|
||||||
define pio_reset_target
|
define pio_reset_run_target
|
||||||
monitor reset
|
monitor reset
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ define pio_reset_halt_target
|
|||||||
monitor halt
|
monitor halt
|
||||||
end
|
end
|
||||||
|
|
||||||
define pio_reset_target
|
define pio_reset_run_target
|
||||||
monitor reset
|
monitor reset
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -50,8 +50,10 @@ define pio_reset_halt_target
|
|||||||
monitor halt
|
monitor halt
|
||||||
end
|
end
|
||||||
|
|
||||||
define pio_reset_target
|
define pio_reset_run_target
|
||||||
|
monitor clrbp
|
||||||
monitor reset
|
monitor reset
|
||||||
|
monitor go
|
||||||
end
|
end
|
||||||
|
|
||||||
target extended-remote $DEBUG_PORT
|
target extended-remote $DEBUG_PORT
|
||||||
@@ -73,7 +75,7 @@ define pio_reset_halt_target
|
|||||||
set language auto
|
set language auto
|
||||||
end
|
end
|
||||||
|
|
||||||
define pio_reset_target
|
define pio_reset_run_target
|
||||||
pio_reset_halt_target
|
pio_reset_halt_target
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -97,7 +99,7 @@ GDB_MSPDEBUG_INIT_CONFIG = """
|
|||||||
define pio_reset_halt_target
|
define pio_reset_halt_target
|
||||||
end
|
end
|
||||||
|
|
||||||
define pio_reset_target
|
define pio_reset_run_target
|
||||||
end
|
end
|
||||||
|
|
||||||
target extended-remote $DEBUG_PORT
|
target extended-remote $DEBUG_PORT
|
||||||
@@ -112,8 +114,8 @@ define pio_reset_halt_target
|
|||||||
monitor system_reset
|
monitor system_reset
|
||||||
end
|
end
|
||||||
|
|
||||||
define pio_reset_target
|
define pio_reset_run_target
|
||||||
pio_reset_halt_target
|
monitor system_reset
|
||||||
end
|
end
|
||||||
|
|
||||||
target extended-remote $DEBUG_PORT
|
target extended-remote $DEBUG_PORT
|
||||||
|
Reference in New Issue
Block a user