-
Notifications
You must be signed in to change notification settings - Fork 2.1k
build-sytem/openocd: detect serial port TTY #21523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build-sytem/openocd: detect serial port TTY #21523
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the added code wouldn't be more at home in makefiles/tools/openocd-adapters/ftdi.inc.mk
.
Since MOST_RECENT_PORT
, OPENOCD_FTDI_ADAPTER
and SERIAL
are command line arguments, I don't see a reason why it wouldn't work there.
This allows the serial PORT selection to make use of info provided by the programmer. This is especially useful when a programmer provides both programming interface (e.g. SWD) and a serial (e.g. intraged USB-UART bridge or exposes SWO logging as a TTY).
This adds a default `TTY_BOARD_FILTER` for use with the Tigard debugger, so that when the programmer is a Tigard that tigard is also used by default for the serial connection. In addition, this allows selecting the TTY via the programmer serial number. Co-authored-by: crasbe <crasbe@gmail.com>
573a2b6
to
41fd70e
Compare
Done. I had to change the order the serial and the programmer config are processes, so that by the time I'll do some quick regression testing for a few boards. I have the feeling that boards with a bootloader that supports programming via UART might rely on the other order and now needs fixing. |
No regressions on I guess changing the order to first process the programmer then the serial is fine. (And that change will also make life easier for adding support for SWO to RIOT, so it is not only beneficial for this use case.) |
Thx a lot :) |
Contribution description
This adds a default
TTY_BOARD_FILTER
for use with the Tigard debugger, so that when the programmer is a Tigard that tigard is also used by default for the serial connection.In addition, this allows selecting the TTY via the programmer serial number.
Testing procedure
make term
with multiple/dev/ttyUSB*
present but only one Tigard connected should reliably select the Tigards UART withMOST_RECENT_PORT=1
and the Tigard selected as program adapter.Issues/PRs references
None