build-sytem/openocd: detect serial port TTY#21523
Conversation
crasbe
left a comment
There was a problem hiding this comment.
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 <[email protected]>
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_FILTERfor 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 termwith multiple/dev/ttyUSB*present but only one Tigard connected should reliably select the Tigards UART withMOST_RECENT_PORT=1and the Tigard selected as program adapter.Issues/PRs references
None