<h3>Contribution description</h3>
<p>The flashing script for the black magic probe stopped working with pygdbmi in<br>
version 0.10.0 due to an API change. This adapts the code to first try<br>
initialization with the old pygdbmi API (as before), but tries again with the<br>
new API if that fails.</p>
<p>This fixes the following error:</p>
<pre><code>/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
</code></pre>
<h3>Testing procedure</h3>
<pre><code>BOARD=<YOUR_FAVOURITE_BOARD> PROGRAMMER=bmp make -C examples/default flash
</code></pre>
<h3>Issues/PRs references</h3>
<p>None</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/15375'>https://github.com/RIOT-OS/RIOT/pull/15375</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>dist/tools/bmp: Fix flashing with pygdbmi 0.10.0</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/15375/files#diff-3f330b744ac32d304d36203033a1a5064d70f38858a4f85cb51b5bf9aa8e283b">dist/tools/bmp/bmp.py</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/15375.patch'>https://github.com/RIOT-OS/RIOT/pull/15375.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/15375.diff'>https://github.com/RIOT-OS/RIOT/pull/15375.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/15375">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYC66SEC46TLZSQDQADSOAPZLANCNFSM4TI4ZU7A">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYH53QPC3XP54QRBJWTSOAPZLA5CNFSM4TI4ZU7KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4K6VWA5A.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/15375",
"url": "https://github.com/RIOT-OS/RIOT/pull/15375",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>