1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

39 Commits

Author SHA1 Message Date
Marian Buschsieweke
fdac725d8c
makefiles/serial: better MOST_RECENT_PORT=1 for CDC ACM
- Allow specifying an alternative board filter for the bootloader TTY,
  as this will present different vendor, model, and serial than RIOT's
  USB implementation.
- Allow specifying the serial. This is useful when multiple CDC ACM
  devices are present.
2024-11-05 13:21:16 +01:00
benpicco
db21bd134f
Merge pull request #20121 from benpicco/pyterm-session
makefiles/tools/serial.inc.mk: make use of pyterm session names
2024-07-11 15:48:42 +00:00
Benjamin Valentin
59bb957c84 makefiles/tools/serial.inc.mk: pyterm: log to /tmp by default 2024-01-29 11:09:26 +01:00
Marian Buschsieweke
93aa9e1e0d
makefiles/tools/serial.inc.mk: Improve MOST_RECENT_PORT=1 handling
When `stdio_cdc_acm` is used, prefer selecting the USB devices with
vendor `RIOT-os.org` and model `$(BOARD)` and only fall back
to `$(TTY_BOARD_FILTER)` if no such TTY was found.

This makes it possible to add a TTY board filter matching only an
integrated USB to UART bridge, but still do the right thing when
the user explicitly uses `stdio_cdc_acm` instead of the default
`stdio_uart`.
2024-01-17 21:58:56 +01:00
Oleg Hahm
2b779fc5a9 native: only set TERMFLAGS for pyterm
If TERMPROG is unset the default is pyterm. If TERMPROG is pyterm we
need to set the native flag.
2023-12-18 13:44:20 +01:00
Benjamin Valentin
2933bbce56 makefiles/tools/serial.inc.mk: make use of pyterm session names 2023-11-29 20:21:06 +01:00
MrKevinWeiss
6d729033e5
makefiles/tools/serial.inc.mk: Handle new miniterm versions
While testing examples/micropython I notice that the default of miniterm.py is actually miniterm.
To simplify user setups, this checks for miniterm.py first then falls back to miniterm.
2023-04-04 12:47:54 +02:00
Marian Buschsieweke
015ee050f2
makefiles/tools/serial.inc.mk: Allow detection of debug adapter
Boards with an integrated debugger/programmer that also provides the
serial as UART <--> USB adapter, the TTY serial matches the serial of
the programmer.

This adapts the `serial.inc.mk` to set the `DEBUG_ADAPTER_ID` to the
TTY serial if (and only if) `MOST_RECENT_PORT` *and*
`DEBUG_ADAPTER_ID_IS_TTY_SERIAL` both have a value of `1`. Boards with
an integrated programmer are expected to set
`DEBUG_ADAPTER_ID_IS_TTY_SERIAL` to `1` in their `Makefile.include`.
2023-02-24 16:50:56 +01:00
Marian Buschsieweke
208bf7eef3
build system: improve MOST_RECENT_PORT=1 handling
Allow overriding the shell command used to auto-detect the TTY of a
board with `MOST_RECENT_PORT=1` via the `TTY_SELECT_CMD` variable.
The use case is to also detect Arduino Mega 2560 clones with cheap
USB UART bridges (for which the filter command may yield false
positives) while preferring genuine Arduino Mega 2560 boards (if
found) over the clones (as the filter for genuine boards does not yield
false positives).
2022-12-11 18:58:18 +01:00
Benjamin Valentin
2625f58774 makefiles/tools/serial.inc.mk: add support for bootterm 2022-10-15 00:20:09 +02:00
chrysn
6cfe240812 makefiles: Select suitable terminal when stdio_rtt is used
Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
2022-08-30 10:51:59 +02:00
chrysn
2c9e853aae
Merge pull request #18526 from chrysn-pull-requests/openocd-rtt
makefiles: Add openocd-rtt
2022-08-30 09:44:50 +02:00
chrysn
62a6d3c128 makefiles: Add openocd-rtt
JLink presumably has information about the device's RAM available
internally. Not passing the precise symbol area (which would be
available in the ELF file) because a) that'd make the terminal break
when the flashed firmware does not equal the built one, and b) that
would introduce a dependency from `term` to the ELF file that other
terminals don't have.
2022-08-30 09:34:22 +02:00
Marian Buschsieweke
78de9a3f53
makefiles/tools/serial.inc.mk: Improve PORT selection
When `stdio_cdc_acm` is used, assume `"RIOT-os\.org"` as vendor string
and `$(BOARD)` being used as model string. This is the default
behavior in RIOT since eaace28804
2022-08-29 16:39:25 +02:00
Marian Buschsieweke
e706468a5a
makefiles/tools/serial.inc.mk: Use TTY_BOARD_FILTER
When `MOST_RECENT_PORT` is set to `1`, the most recently added USB
serial is selected. This is a crude but surprisingly effective filter.
However, for the CC2560-Launchpad this doesn't work, as it provides
two USB serials. The first USB serial interface is the targeted UART
bridge and the second controls the debugger. Since the second is added
a tiny fraction after the first, this reliably selects the wrong
interface. Allowing the board to filter USB serials first can avoid
this issue.

This is also useful as e.g. an STM Nucleo board can easily be told
apart from an `samr21-xpro` or an nRF52840dk using such filters.
2022-06-03 19:59:30 +02:00
Francisco Molina
a3ff566708 makefiles/tools/serial.inc.mk: socat set no parity 2022-03-28 08:53:27 +02:00
Marian Buschsieweke
b296ade6b2
dist/tools/usb-serial: Add ttys.py
- Provide a new tool to list and filter TTYs
- Change `Makefile.include` to use `$(RIOTTOOLS)/usb-serial/ttys.py`
  instead of `$(Q)$(RIOTTOOLS)/usb-serial/list-ttys.sh` to implement
  `make list-ttys`
- Extend `makefiles/tools/serial.inc.mk` to allow using the most recent
  port by passing `MOST_RECENT_PORT=1` as environment variable or
  parameter to make

Co-authored-by: chrysn <chrysn@fsfe.org>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
2022-03-09 15:40:36 +01:00
83bbe00d62
makefiles/serial.inc.mk: define a default port for linux/darwin 2020-12-02 09:20:57 +01:00
99ca736b53
stdio_semihosting: Initial include of Semihosting-based STDIO 2020-06-09 10:15:49 +02:00
aff18b9599
tools/openocd: add OPENOCD_DBG_EXTRA_CMD 2020-06-09 10:14:57 +02:00
Leandro Lanzieri
9463f85d39
makefiles/serial: Add variable for Miniterm flags 2020-04-21 17:56:16 +02:00
57d5a1db1c
boards: provide stdio_rtt as default module where required
For the moment, hamilton, ruuvitag and thingy52 use stdio_rtt by default.
2020-01-14 07:48:08 +01:00
a5785cdf9c
tools/serial.inc.mk: Support miniterm.py
miniterm.py is a simple terminal program that is included with pyserial.
This means that it is available wherever pyterm can work. It allows raw
access, does line translation and passes through special characters.

Co-authored-by: Juan Carrano <j.carrano@fu-berlin.de>
2019-11-19 15:07:32 +01:00
Francisco Molina
7794cce5ee makefiles/tools/serial.inc.mk: set default PROG_DEV to PORT 2019-10-24 12:57:42 +02:00
Francisco Molina
c010f59b8c Makefile.include: remove repeated OS declaration
- OS := $(shell uname) is already declared in `Makefile.include`
  re-declaring it means it will be re-evalauted multiple times
  uselessly.
2019-10-18 08:46:51 +02:00
Juan Carrano
fe9704dbd6 makefiles/tools/serial: ensure PORT is set and fail early.
By ensuring the PORT auto-detection worked, we can give meaningful
error messages and fail earlier.

This uses ensure_value from makefiles/utils/checks.mk. An include was
added to Makefile.include to make this fuction available to all other
makefiles.
2019-10-17 08:54:16 +02:00
Francisco
2d890db6af
Merge pull request #10440 from jcarrano/no-export-ports
makefiles: remove exports so that PORT is not evaluated if it's not needed.
2019-09-12 13:50:24 +02:00
Gaëtan Harter
62fe786cd8
makefiles/serial.inc.mk: add PYTERMFLAGS variable
Add a variable for `pyterm` specific flags that are not handled by other
terminals.
This will prevent issues with boards that have options only supported by
`pyterm` and setting `pyterm` options from the environment.
2019-08-27 12:07:00 +02:00
Gaëtan Harter
c103b3f6ba serial: Do not export PORT.
This variable is only used for the term recipe (and maybe for flashing). They
should not be evaluated if they are not needed and the user should not see a
warning that the port is not set if he does not use port (for example in make
all.)
2019-06-03 16:31:21 +02:00
Juan Carrano
77f3c2d136 serial.inc.mk: disable local echo in picocom.
Due to a recent fix in shell.c, remote echo is now working as originally
intended. Local echo must be disabled or otherwise it will add up to the
remote one, causing a character-by-character double echoing.
2019-02-25 18:08:20 +01:00
Gaëtan Harter
20ce4db753
makefiles/tools/serial.inc.mk: unexport TERM* variables
TERMPROG and TERMFLAGS variables do not need to be exported as they are
used directly by a make receipe.

Exporting them prevents overwriting 'RIOT_TERMINAL' in the test.
2019-02-25 17:15:41 +01:00
5ad3fd4e5b
tools/serial: add support for socat as riot terminal 2019-02-20 12:05:19 +01:00
ea8672ca9c
makefiles/serial: fix indent 2019-02-20 08:40:54 +01:00
f04f954a21 makefiles/tools: use RIOTTOOLS variable 2018-05-15 11:29:33 +02:00
Martine Lenders
e3e1abb368
make: prefix TERMINAL macro
Fixes #7767
2017-10-23 15:19:32 +02:00
Hauke Petersen
cd5fa2690e make.serial: allow for using picocom as term prog 2017-10-19 09:57:19 +02:00
e5fc70ae57 makefiles: cleanup indentation 2017-09-28 21:29:08 +02:00
Hauke Petersen
2739354bab make/serial.inc.mk: set TERMFLAGS only if not set 2017-05-23 14:25:11 +02:00
Joakim Nohlgård
339a4da9dc Makefiles: move to new directory /makefiles 2017-04-04 15:11:54 +02:00