Merge pull request #15375 from maribu/bmp-fix

dist/tools/bmp: Fix flashing with pygdbmi 0.10.0
This commit is contained in:
Marian Buschsieweke 2020-11-03 20:11:53 +01:00 committed by GitHub
commit deb52f858c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,7 +219,12 @@ def debug_mode(port):
def connect_to_target(port):
# 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])
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',
expected_result='connected')
# set options