Skip to content
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

Defining USB_DUAL_SERIAL causes PlatformIO "Upload and Monitor" to fail #100

Open
rogerjames99 opened this issue Feb 23, 2023 · 0 comments

Comments

@rogerjames99
Copy link

rogerjames99 commented Feb 23, 2023

Running PlatformIO using vscode on a Linux system (Intel® Core™ i7-10700K CPU @ 3.80GHz × 16) and with default values for monitor_port (no override in platformio.ini), reports success but persistently connects the monitor port to the wrong USB CDC channel (02).

To overcome this problem I would normally override the monitor_port in platformio.ini to point at the correct consistently named port under /dev/serial/by-id.

lrwxrwxrwx 1 root root 13 Feb 23 10:29 usb-Teensyduino_Dual_Serial_12205920-if00 -> ../../ttyACM0
lrwxrwxrwx 1 root root 13 Feb 23 10:29 usb-Teensyduino_Dual_Serial_12205920-if02 -> ../../ttyACM1

In this case this is the first entry shown above ending in if00. This is the correct USB CDC channel number.
However, this then fails with a file not found error (ENOENT) when the "Upload and Monitor" command is issued. Manually issuing Upload followed by Monitor commands works.

There is also a less frequent issue in which channel 02 is processed by udev before channel 00. This results in the link targets being swapped. This means the names under /dev/serial/by-id have to be used rather than the /dev/ttyACMx names.

I am currently working on getting TeensyDebug working consistently under platformio. The code to reproduce this problem can be found here.

I think speed and number of cores of the intel i7 based system I am running might be contributing to the timing related issues that form part of this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant