WiringProject / Wiring

Wiring Framework
http://wiring.org.co/
Other
217 stars 168 forks source link

serial monitor autostart not working with Serial over USB #3

Open ydirson opened 12 years ago

ydirson commented 12 years ago

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.

dbarragan commented 12 years ago

hi, thanks for your report, could you provide a patch for running tests?