[riot-notifications] [RIOT-OS/RIOT] dist/tools/bmp: Fix flashing with pygdbmi 0.10.0 (#15375)

Marian Buschsieweke notifications at github.com
Tue Nov 3 16:39:01 CET 2020


### Contribution description

The flashing script for the black magic probe stopped working with pygdbmi in
version 0.10.0 due to an API change. This adapts the code to first try
initialization with the old pygdbmi API (as before), but tries again with the
new API if that fails.

This fixes the following error:

```
/home/maribu/Repos/software/RIOT/dist/tools/bmp/bmp.py  flash /home/maribu/Repos/software/RIOT/tests/bench_atomic_util/bin/bluepill/tests_bench_atomic_util.elf
found following Black Magic GDB servers:
	[/dev/ttyACM0] Serial: C2C8B70D <- default 
connecting to [/dev/ttyACM0]...
Traceback (most recent call last):
  File "/home/maribu/Repos/software/RIOT/dist/tools/bmp/bmp.py", line 265, in <module>
    gdbmi = connect_to_target(port)
  File "/home/maribu/Repos/software/RIOT/dist/tools/bmp/bmp.py", line 222, in connect_to_target
    gdbmi = GdbController(gdb_path=args.gdb_path, gdb_args=["--nx", "--quiet", "--interpreter=mi2", args.file])
TypeError: __init__() got an unexpected keyword argument 'gdb_path'
make: *** [/home/maribu/Repos/software/RIOT/tests/bench_atomic_util/../../Makefile.include:692: flash] Error 1
```

### Testing procedure

```
BOARD=<YOUR_FAVOURITE_BOARD> PROGRAMMER=bmp make -C examples/default flash
```

### Issues/PRs references

None
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/15375

-- Commit Summary --

  * dist/tools/bmp: Fix flashing with pygdbmi 0.10.0

-- File Changes --

    M dist/tools/bmp/bmp.py (7)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/15375.patch
https://github.com/RIOT-OS/RIOT/pull/15375.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15375
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20201103/77495ca9/attachment.htm>


More information about the notifications mailing list