Merge pull request #15375 from maribu/bmp-fix
dist/tools/bmp: Fix flashing with pygdbmi 0.10.0
This commit is contained in:
commit
deb52f858c
5
dist/tools/bmp/bmp.py
vendored
5
dist/tools/bmp/bmp.py
vendored
@ -219,7 +219,12 @@ def debug_mode(port):
|
|||||||
|
|
||||||
def connect_to_target(port):
|
def connect_to_target(port):
|
||||||
# open GDB in machine interface mode
|
# open GDB in machine interface mode
|
||||||
|
try:
|
||||||
|
# try old API first
|
||||||
gdbmi = GdbController(gdb_path=args.gdb_path, gdb_args=["--nx", "--quiet", "--interpreter=mi2", args.file])
|
gdbmi = GdbController(gdb_path=args.gdb_path, gdb_args=["--nx", "--quiet", "--interpreter=mi2", args.file])
|
||||||
|
except TypeError:
|
||||||
|
# and then new API
|
||||||
|
gdbmi = GdbController(command=[args.gdb_path, "--nx", "--quiet", "--interpreter=mi2", args.file])
|
||||||
assert gdb_write_and_wait_for_result(gdbmi, '-target-select extended-remote %s' % port, 'connecting',
|
assert gdb_write_and_wait_for_result(gdbmi, '-target-select extended-remote %s' % port, 'connecting',
|
||||||
expected_result='connected')
|
expected_result='connected')
|
||||||
# set options
|
# set options
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user