Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[µTVM] Avoid listing links when probing serial ports (apache#7265)
SerialTransport.open() probes automatically the device name based upon a grep regex if a device name is not provided. The code expects to find only a single device. Currently when it probes for the available serial ports it includes in the list the device names that are also symbolic links. Since _find_openocd_serial_port() always returns a serial number for a given serial port (not the device name path) the available device names are always probed when the openocd flash runner is used. It's not uncommon that device drivers create symbolic links for certain kinds of serial devices, specially those that provide a serial port plus an additional endpoint to program the device attached, like a ST-Link interface, etc. As a consequence the current code fails to select the correct device name when symbolic links exist and the openocd flash runner is used. That commit changes the probe behavior to avoid listing symbolic links when probing the device name for the target serial port. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
- Loading branch information