Skip to content
Commit 79856e76 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Carles Cufí
Browse files

west: runners: blackmagicprobe: guess the gdb port based on the OS



Add some logic in blackmagicprobe.py to guess the GDB serial port based
on the OS instead of just trying the flag or /dev/ttyACM0.

The new logic explicitly looks for the well known path for BMP on Linux
(/dev/ttyBmpGdb), so that we can remove it from the board files that
have it set explicitly right now. At the same time it still allows
setting the port from the flag and also checks an environment variable,
so that it can be used for systems with multiple probes.

As a fallback, it looks for a valid serial port, picking the first one
(the probe creates two, the GDB one is the first one), and raise an
exception if nothing is found.

Signed-off-by: default avatarFabio Baltieri <fabio.baltieri@gmail.com>
parent cf39a737
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment