WiringProject/Wiring — Issue #3: serial monitor autostart not working with Serial over USB
Author: ydirson
Created: 2011-11-22 22:23:51+00:00
State: open

MCUs with builtin USB controller (as opposed to using FTDI or other off-chip USB controller) have a behaviour that's not compatible with current "serial monitor autostart" feature. The bootloader turns the USB device off before running the program, since the program may just not use it at all.
Even for programs which do use it (eg. AVR8bit core with my patches on branch 32u4, or the arduino 1.0rc2 core on which those patches are based), there is a timeframe with no USB device, where at least Linux removes the corresponding device node. It is during this timeframe that wiring tries to open the monitor, and fails with missing device. Notification from the filesystem seem the way to go - on Linux that would be inotify() syscall or a successor of it.