Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: Teensy serial debugging, am I doing this wrong?

  1. #1

    Teensy serial debugging, am I doing this wrong?

    Ok, I've had so many issues with serial debugging on teensy chips (3.1/2 or 3.5/6), that I must be doing something wrong?

    My setup code normally looks like this
    Code:
    #ifdef TEENSYDUINO
        delay(3000);
    #endif
        Serial.begin(115200);
        Serial.println(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Serial.begin");
    The delay is required or early serial output is lost.
    After that, serial works for "a while" and a that really depends on things I haven't figured out yet, and then it stops working.
    In https://forum.pjrc.com/threads/50525...ux-and-FastLED I said "fastled" but really it happens with other code too. Here I'm using SPI and ILI9341 and it's mostly the same problem: I get a few lines of output, and then it dies.

    This is on linux/debian with arduino-1.8.9-teensyduino-1.46 but it's happened with many arduino and teensyduino versions, over years.
    Right now, my serial output is stuck, and I see teensymonitor /dev/ttyACM0 online in the serial debug window.
    If I try a new compile, it will hang for 20-30sec before finally closing the serial port and starting the compile.
    if I click the close button on teensymonitor, it changes to 'teensymonitor: closed" and still sits there for 30 seconds without closing. Then, it finally closes and I can compile immediately.

    Any idea what's going on?

  2. #2
    Paul, is there is a 30 second timeout anywhere? Every time I strace this, I see a 30 second block
    I used this:
    sudo strace -e trace=file -tt -f -p 25658

    Before:
    Code:
    [pid 25709] 10:17:33.669150 lstat("/sys/class/tty/tty31", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669224 readlink("/sys/class/tty/tty31", "../../devices/virtual/tty/tty31"..., 4096) = 31
    [pid 25709] 10:17:33.669272 lstat("/sys/class/tty/tty21", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669317 readlink("/sys/class/tty/tty21", "../../devices/virtual/tty/tty21", 4096) = 31
    [pid 25709] 10:17:33.669351 lstat("/sys/class/tty/tty5", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669395 readlink("/sys/class/tty/tty5", "../../devices/virtual/tty/tty5"..., 4096) = 30
    [pid 25709] 10:17:33.669427 lstat("/sys/class/tty/tty11", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669469 readlink("/sys/class/tty/tty11", "../../devices/virtual/tty/tty11", 4096) = 31
    [pid 25709] 10:17:33.669500 lstat("/sys/class/tty/tty58", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669543 readlink("/sys/class/tty/tty58", "../../devices/virtual/tty/tty58", 4096) = 31
    [pid 25709] 10:17:33.669575 lstat("/sys/class/tty/tty3", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669617 readlink("/sys/class/tty/tty3", "../../devices/virtual/tty/tty3"..., 4096) = 30
    [pid 25709] 10:17:33.669648 lstat("/sys/class/tty/tty48", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669691 readlink("/sys/class/tty/tty48", "../../devices/virtual/tty/tty48", 4096) = 31
    [pid 25709] 10:17:33.669723 lstat("/sys/class/tty/tty38", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:33.669765 readlink("/sys/class/tty/tty38", "../../devices/virtual/tty/tty38", 4096) = 31
    Here I click the teensyduino serial console close button
    Code:
    Process 31261 detached
    Process 31260 detached
    [pid 25709] 10:17:34.659257 openat(AT_FDCWD, "/sys/class/tty", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 90
    [pid 25709] 10:17:34.660066 lstat("/sys/class/tty/.", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.660248 readlink("/sys/class/tty/./device", 0x7efd495db660, 4096) = -1 ENOENT (No such file or directory)
    [pid 25709] 10:17:34.660309 lstat("/sys/class/tty/..", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.660411 readlink("/sys/class/tty/../device", 0x7efd495db660, 4096) = -1 ENOENT (No such file or directory)
    [pid 25709] 10:17:34.660503 lstat("/sys/class/tty/tty28", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.660581 readlink("/sys/class/tty/tty28", "../../devices/virtual/tty/tty28", 4096) = 31
    [pid 25709] 10:17:34.660653 lstat("/sys/class/tty/ptmx", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.660701 readlink("/sys/class/tty/ptmx", "../../devices/virtual/tty/ptmx"..., 4096) = 30
    [pid 25709] 10:17:34.660738 lstat("/sys/class/tty/tty56", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.660784 readlink("/sys/class/tty/tty56", "../../devices/virtual/tty/tty56", 4096) = 31
    [pid 25709] 10:17:34.660820 lstat("/sys/class/tty/tty18", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.660866 readlink("/sys/class/tty/tty18", "../../devices/virtual/tty/tty18", 4096) = 31
    [pid 25709] 10:17:34.660901 lstat("/sys/class/tty/tty1", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.660948 readlink("/sys/class/tty/tty1", "../../devices/virtual/tty/tty1"..., 4096) = 30
    [pid 25709] 10:17:34.660983 lstat("/sys/class/tty/tty46", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661030 readlink("/sys/class/tty/tty46", "../../devices/virtual/tty/tty46", 4096) = 31
    [pid 25709] 10:17:34.661066 lstat("/sys/class/tty/tty36", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661112 readlink("/sys/class/tty/tty36", "../../devices/virtual/tty/tty36", 4096) = 31
    [pid 25709] 10:17:34.661148 lstat("/sys/class/tty/tty26", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661194 readlink("/sys/class/tty/tty26", "../../devices/virtual/tty/tty26", 4096) = 31
    [pid 25709] 10:17:34.661278 lstat("/sys/class/tty/tty54", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661405 readlink("/sys/class/tty/tty54", "../../devices/virtual/tty/tty54", 4096) = 31
    [pid 25709] 10:17:34.661453 lstat("/sys/class/tty/tty16", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661502 readlink("/sys/class/tty/tty16", "../../devices/virtual/tty/tty16", 4096) = 31
    [pid 25709] 10:17:34.661539 lstat("/sys/class/tty/tty44", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661587 readlink("/sys/class/tty/tty44", "../../devices/virtual/tty/tty44", 4096) = 31
    [pid 25709] 10:17:34.661625 lstat("/sys/class/tty/console", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661673 readlink("/sys/class/tty/console", "../../devices/virtual/tty/console"..., 4096) = 33
    [pid 25709] 10:17:34.661710 lstat("/sys/class/tty/tty34", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661757 readlink("/sys/class/tty/tty34", "../../devices/virtual/tty/tty34"..., 4096) = 31
    [pid 25709] 10:17:34.661793 lstat("/sys/class/tty/tty62", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.661839 readlink("/sys/class/tty/tty62", "../../devices/virtual/tty/tty62", 4096) = 31
    [pid 25709] 10:17:34.661907 lstat("/sys/class/tty/tty24", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.662038 readlink("/sys/class/tty/tty24", "../../devices/virtual/tty/tty24", 4096) = 31
    [pid 25709] 10:17:34.662123 lstat("/sys/class/tty/tty8", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.662196 readlink("/sys/class/tty/tty8", "../../devices/virtual/tty/tty8"..., 4096) = 30
    [pid 25709] 10:17:34.662256 lstat("/sys/class/tty/tty52", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.662320 readlink("/sys/class/tty/tty52", "../../devices/virtual/tty/tty52", 4096) = 31
    [pid 25709] 10:17:34.662380 lstat("/sys/class/tty/tty14", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.662453 readlink("/sys/class/tty/tty14", "../../devices/virtual/tty/tty14", 4096) = 31
    [pid 25709] 10:17:34.662509 lstat("/sys/class/tty/tty42", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.662577 readlink("/sys/class/tty/tty42", "../../devices/virtual/tty/tty42", 4096) = 31
    [pid 25709] 10:17:34.662705 lstat("/sys/class/tty/ttyS2", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.662774 readlink("/sys/class/tty/ttyS2", "../../devices/platform/serial8250/tty/ttyS2", 4096) = 43
    [pid 25709] 10:17:34.662840 openat(AT_FDCWD, "/dev/ttyS2", O_RDWR|O_NOCTTY|O_NONBLOCK) = 91
    [pid 25709] 10:17:34.663370 lstat("/sys/class/tty/tty32", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.663473 readlink("/sys/class/tty/tty32", "../../devices/virtual/tty/tty32"..., 4096) = 31
    [pid 25709] 10:17:34.663689 lstat("/sys/class/tty/tty60", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.663944 readlink("/sys/class/tty/tty60", "../../devices/virtual/tty/tty60", 4096) = 31
    [pid 25709] 10:17:34.664038 lstat("/sys/class/tty/tty22", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.664126 readlink("/sys/class/tty/tty22", "../../devices/virtual/tty/tty22", 4096) = 31
    [pid 25709] 10:17:34.664201 lstat("/sys/class/tty/tty6", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.664266 readlink("/sys/class/tty/tty6", "../../devices/virtual/tty/tty6"..., 4096) = 30
    [pid 25709] 10:17:34.664316 lstat("/sys/class/tty/tty50", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.664405 readlink("/sys/class/tty/tty50", "../../devices/virtual/tty/tty50", 4096) = 31
    [pid 25709] 10:17:34.664461 lstat("/sys/class/tty/tty12", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.664531 readlink("/sys/class/tty/tty12", "../../devices/virtual/tty/tty12", 4096) = 31
    [pid 25709] 10:17:34.664580 lstat("/sys/class/tty/tty40", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.664642 readlink("/sys/class/tty/tty40", "../../devices/virtual/tty/tty40", 4096) = 31
    [pid 25709] 10:17:34.664688 lstat("/sys/class/tty/ttyS0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.664749 readlink("/sys/class/tty/ttyS0", "../../devices/platform/serial8250/tty/ttyS0", 4096) = 43
    [pid 25709] 10:17:34.664810 openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY|O_NONBLOCK) = 91
    [pid 25709] 10:17:34.665110 lstat("/sys/class/tty/ttyS0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.665173 readlink("/sys/class/tty/ttyS0", "../../devices/platform/serial8250/tty/ttyS0"..., 4096) = 43
    [pid 25709] 10:17:34.665223 lstat("/sys/class/tty/tty30", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.665285 readlink("/sys/class/tty/tty30", "../../devices/virtual/tty/tty30"..., 4096) = 31
    [pid 25709] 10:17:34.665332 lstat("/sys/class/tty/tty59", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.665393 readlink("/sys/class/tty/tty59", "../../devices/virtual/tty/tty59", 4096) = 31
    [pid 25709] 10:17:34.665439 lstat("/sys/class/tty/tty20", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.665500 readlink("/sys/class/tty/tty20", "../../devices/virtual/tty/tty20", 4096) = 31
    [pid 25709] 10:17:34.665546 lstat("/sys/class/tty/tty4", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.665606 readlink("/sys/class/tty/tty4", "../../devices/virtual/tty/tty4"..., 4096) = 30
    [pid 25709] 10:17:34.665676 lstat("/sys/class/tty/tty49", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.665756 readlink("/sys/class/tty/tty49", "../../devices/virtual/tty/tty49", 4096) = 31
    [pid 25709] 10:17:34.665821 lstat("/sys/class/tty/tty10", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.665892 readlink("/sys/class/tty/tty10", "../../devices/virtual/tty/tty10", 4096) = 31
    [pid 25709] 10:17:34.665942 lstat("/sys/class/tty/tty39", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.666003 readlink("/sys/class/tty/tty39", "../../devices/virtual/tty/tty39", 4096) = 31
    [pid 25709] 10:17:34.666049 lstat("/sys/class/tty/tty29", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.666110 readlink("/sys/class/tty/tty29", "../../devices/virtual/tty/tty29", 4096) = 31
    [pid 25709] 10:17:34.666156 lstat("/sys/class/tty/tty57", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.666220 readlink("/sys/class/tty/tty57", "../../devices/virtual/tty/tty57", 4096) = 31
    [pid 25709] 10:17:34.666266 lstat("/sys/class/tty/tty19", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.666326 readlink("/sys/class/tty/tty19", "../../devices/virtual/tty/tty19", 4096) = 31
    [pid 25709] 10:17:34.666371 lstat("/sys/class/tty/ttyACM0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.666434 readlink("/sys/class/tty/ttyACM0", "../../devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/tty/ttyACM0", 4096) = 66
    [pid 25709] 10:17:34.666489 lstat("/sys/class/tty/ttyACM0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:17:34.666548 readlink("/sys/class/tty/ttyACM0", "../../devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/tty/ttyACM0", 4096) = 66
    [pid 25709] 10:17:34.666602 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/interface", O_RDONLY) = -1 ENOENT (No such file or directory)
    [pid 25709] 10:17:34.666760 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../busnum", O_RDONLY) = 91
    [pid 25709] 10:17:34.666892 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../devnum", O_RDONLY) = 91
    [pid 25709] 10:17:34.667004 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../idVendor", O_RDONLY) = 91
    [pid 25709] 10:17:34.667142 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../idProduct", O_RDONLY) = 91
    [pid 25709] 10:17:34.667291 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../product", O_RDONLY) = 91
    [pid 25709] 10:17:34.667411 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../manufacturer", O_RDONLY) = 91
    [pid 25709] 10:17:34.667517 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../product", O_RDONLY) = 91
    [pid 25709] 10:17:34.667622 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../serial", O_RDONLY) = 91
    (...)
    30 seconds go by, and finally the arduino java GUI gets unstuck
    Code:
    (...)
    [pid 25709] 10:18:03.680240 readlink("/sys/class/tty/tty33", "../../devices/virtual/tty/tty33"..., 4096) = 31
    [pid 25709] 10:18:03.680283 lstat("/sys/class/tty/tty61", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.680339 readlink("/sys/class/tty/tty61", "../../devices/virtual/tty/tty61", 4096) = 31
    [pid 25709] 10:18:03.680379 lstat("/sys/class/tty/tty23", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.680456 readlink("/sys/class/tty/tty23", "../../devices/virtual/tty/tty23", 4096) = 31
    [pid 25709] 10:18:03.680501 lstat("/sys/class/tty/tty7", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.680553 readlink("/sys/class/tty/tty7", "../../devices/virtual/tty/tty7"..., 4096) = 30
    [pid 25709] 10:18:03.680594 lstat("/sys/class/tty/tty51", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.680649 readlink("/sys/class/tty/tty51", "../../devices/virtual/tty/tty51", 4096) = 31
    [pid 25709] 10:18:03.680689 lstat("/sys/class/tty/tty13", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.680742 readlink("/sys/class/tty/tty13", "../../devices/virtual/tty/tty13", 4096) = 31
    [pid 25709] 10:18:03.680788 lstat("/sys/class/tty/tty41", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.680845 readlink("/sys/class/tty/tty41", "../../devices/virtual/tty/tty41", 4096) = 31
    [pid 25709] 10:18:03.680892 lstat("/sys/class/tty/ttyS1", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.680949 readlink("/sys/class/tty/ttyS1", "../../devices/platform/serial8250/tty/ttyS1", 4096) = 43
    [pid 25709] 10:18:03.681002 openat(AT_FDCWD, "/dev/ttyS1", O_RDWR|O_NOCTTY|O_NONBLOCK) = 91
    [pid 25709] 10:18:03.681172 lstat("/sys/class/tty/tty31", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681228 readlink("/sys/class/tty/tty31", "../../devices/virtual/tty/tty31"..., 4096) = 31
    [pid 25709] 10:18:03.681275 lstat("/sys/class/tty/tty21", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681333 readlink("/sys/class/tty/tty21", "../../devices/virtual/tty/tty21", 4096) = 31
    [pid 25709] 10:18:03.681374 lstat("/sys/class/tty/tty5", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681426 readlink("/sys/class/tty/tty5", "../../devices/virtual/tty/tty5"..., 4096) = 30
    [pid 25709] 10:18:03.681467 lstat("/sys/class/tty/tty11", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681536 readlink("/sys/class/tty/tty11", "../../devices/virtual/tty/tty11", 4096) = 31
    [pid 25709] 10:18:03.681577 lstat("/sys/class/tty/tty58", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681630 readlink("/sys/class/tty/tty58", "../../devices/virtual/tty/tty58", 4096) = 31
    [pid 25709] 10:18:03.681674 lstat("/sys/class/tty/tty3", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681725 readlink("/sys/class/tty/tty3", "../../devices/virtual/tty/tty3"..., 4096) = 30
    [pid 25709] 10:18:03.681774 lstat("/sys/class/tty/tty48", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681824 readlink("/sys/class/tty/tty48", "../../devices/virtual/tty/tty48", 4096) = 31
    [pid 25709] 10:18:03.681865 lstat("/sys/class/tty/tty38", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:03.681921 readlink("/sys/class/tty/tty38", "../../devices/virtual/tty/tty38", 4096) = 31
    [pid 25799] 10:18:04.121673 stat("/home/merlin/arduino/libraries/Adafruit_ILI9341/examples/graphicstest", {st_mode=S_IFDIR|0755, st_size=32, ...}) = 0
    [pid 25799] 10:18:04.121839 openat(AT_FDCWD, "/home/merlin/arduino/libraries/Adafruit_ILI9341/examples/graphicstest", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 90
    [pid 25799] 10:18:04.122196 stat("/home/merlin/arduino/libraries/Adafruit_ILI9341/examples/graphicstest/graphicstest.ino", {st_mode=S_IFREG|0644, st_size=10948, ...}) = 0
    [pid 25799] 10:18:04.122333 stat("/home/merlin/arduino/libraries/Adafruit_ILI9341/examples/graphicstest/graphicstest.ino", {st_mode=S_IFREG|0644, st_size=10948, ...}) = 0
    [pid 25799] 10:18:04.122429 stat("/home/merlin/arduino/libraries/Adafruit_ILI9341/examples/graphicstest/graphicstest.ino", {st_mode=S_IFREG|0644, st_size=10948, ...}) = 0
    [pid 25799] 10:18:04.122539 openat(AT_FDCWD, "/home/merlin/arduino/libraries/Adafruit_ILI9341/examples/graphicstest/graphicstest.ino", O_RDONLY) = 90
    [pid 25709] 10:18:04.671496 openat(AT_FDCWD, "/sys/class/tty", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 90
    [pid 25709] 10:18:04.671725 lstat("/sys/class/tty/.", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.671791 readlink("/sys/class/tty/./device", 0x7efd495db660, 4096) = -1 ENOENT (No such file or directory)
    [pid 25709] 10:18:04.671844 lstat("/sys/class/tty/..", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.671905 readlink("/sys/class/tty/../device", 0x7efd495db660, 4096) = -1 ENOENT (No such file or directory)
    [pid 25709] 10:18:04.671950 lstat("/sys/class/tty/tty28", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672008 readlink("/sys/class/tty/tty28", "../../devices/virtual/tty/tty28", 4096) = 31
    [pid 25709] 10:18:04.672058 lstat("/sys/class/tty/ptmx", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672117 readlink("/sys/class/tty/ptmx", "../../devices/virtual/tty/ptmx"..., 4096) = 30
    [pid 25709] 10:18:04.672164 lstat("/sys/class/tty/tty56", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672221 readlink("/sys/class/tty/tty56", "../../devices/virtual/tty/tty56", 4096) = 31
    [pid 25709] 10:18:04.672268 lstat("/sys/class/tty/tty18", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672331 readlink("/sys/class/tty/tty18", "../../devices/virtual/tty/tty18", 4096) = 31
    [pid 25709] 10:18:04.672376 lstat("/sys/class/tty/tty1", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672434 readlink("/sys/class/tty/tty1", "../../devices/virtual/tty/tty1"..., 4096) = 30
    [pid 25709] 10:18:04.672480 lstat("/sys/class/tty/tty46", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672538 readlink("/sys/class/tty/tty46", "../../devices/virtual/tty/tty46", 4096) = 31
    [pid 25709] 10:18:04.672583 lstat("/sys/class/tty/tty36", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672641 readlink("/sys/class/tty/tty36", "../../devices/virtual/tty/tty36", 4096) = 31
    [pid 25709] 10:18:04.672687 lstat("/sys/class/tty/tty26", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672746 readlink("/sys/class/tty/tty26", "../../devices/virtual/tty/tty26", 4096) = 31
    [pid 25709] 10:18:04.672792 lstat("/sys/class/tty/tty54", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672850 readlink("/sys/class/tty/tty54", "../../devices/virtual/tty/tty54", 4096) = 31
    [pid 25709] 10:18:04.672896 lstat("/sys/class/tty/tty16", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.672955 readlink("/sys/class/tty/tty16", "../../devices/virtual/tty/tty16", 4096) = 31
    [pid 25709] 10:18:04.673001 lstat("/sys/class/tty/tty44", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.673059 readlink("/sys/class/tty/tty44", "../../devices/virtual/tty/tty44", 4096) = 31
    [pid 25709] 10:18:04.673104 lstat("/sys/class/tty/console", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.673163 readlink("/sys/class/tty/console", "../../devices/virtual/tty/console"..., 4096) = 33
    [pid 25709] 10:18:04.673230 lstat("/sys/class/tty/tty34", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.673291 readlink("/sys/class/tty/tty34", "../../devices/virtual/tty/tty34"..., 4096) = 31
    [pid 25709] 10:18:04.673345 lstat("/sys/class/tty/tty62", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.673418 readlink("/sys/class/tty/tty62", "../../devices/virtual/tty/tty62", 4096) = 31
    [pid 25709] 10:18:04.673477 lstat("/sys/class/tty/tty24", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.673529 readlink("/sys/class/tty/tty24", "../../devices/virtual/tty/tty24", 4096) = 31
    [pid 25709] 10:18:04.673618 lstat("/sys/class/tty/tty8", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.673809 readlink("/sys/class/tty/tty8", "../../devices/virtual/tty/tty8"..., 4096) = 30
    [pid 25709] 10:18:04.673875 lstat("/sys/class/tty/tty52", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.673947 readlink("/sys/class/tty/tty52", "../../devices/virtual/tty/tty52", 4096) = 31
    [pid 25709] 10:18:04.674000 lstat("/sys/class/tty/tty14", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674066 readlink("/sys/class/tty/tty14", "../../devices/virtual/tty/tty14", 4096) = 31
    [pid 25709] 10:18:04.674118 lstat("/sys/class/tty/tty42", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674170 readlink("/sys/class/tty/tty42", "../../devices/virtual/tty/tty42", 4096) = 31
    [pid 25709] 10:18:04.674209 lstat("/sys/class/tty/ttyS2", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674260 readlink("/sys/class/tty/ttyS2", "../../devices/platform/serial8250/tty/ttyS2", 4096) = 43
    [pid 25709] 10:18:04.674313 openat(AT_FDCWD, "/dev/ttyS2", O_RDWR|O_NOCTTY|O_NONBLOCK) = 91
    [pid 25709] 10:18:04.674428 lstat("/sys/class/tty/tty32", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674482 readlink("/sys/class/tty/tty32", "../../devices/virtual/tty/tty32"..., 4096) = 31
    [pid 25709] 10:18:04.674523 lstat("/sys/class/tty/tty60", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674573 readlink("/sys/class/tty/tty60", "../../devices/virtual/tty/tty60", 4096) = 31
    [pid 25709] 10:18:04.674671 lstat("/sys/class/tty/tty22", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674748 readlink("/sys/class/tty/tty22", "../../devices/virtual/tty/tty22", 4096) = 31
    [pid 25709] 10:18:04.674788 lstat("/sys/class/tty/tty6", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674839 readlink("/sys/class/tty/tty6", "../../devices/virtual/tty/tty6"..., 4096) = 30
    [pid 25709] 10:18:04.674877 lstat("/sys/class/tty/tty50", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.674929 readlink("/sys/class/tty/tty50", "../../devices/virtual/tty/tty50", 4096) = 31
    [pid 25709] 10:18:04.674974 lstat("/sys/class/tty/tty12", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675026 readlink("/sys/class/tty/tty12", "../../devices/virtual/tty/tty12", 4096) = 31
    [pid 25709] 10:18:04.675065 lstat("/sys/class/tty/tty40", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675116 readlink("/sys/class/tty/tty40", "../../devices/virtual/tty/tty40", 4096) = 31
    [pid 25709] 10:18:04.675155 lstat("/sys/class/tty/ttyS0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675214 readlink("/sys/class/tty/ttyS0", "../../devices/platform/serial8250/tty/ttyS0", 4096) = 43
    [pid 25709] 10:18:04.675260 openat(AT_FDCWD, "/dev/ttyS0", O_RDWR|O_NOCTTY|O_NONBLOCK) = 91
    [pid 25709] 10:18:04.675531 lstat("/sys/class/tty/ttyS0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675589 readlink("/sys/class/tty/ttyS0", "../../devices/platform/serial8250/tty/ttyS0"..., 4096) = 43
    [pid 25709] 10:18:04.675638 lstat("/sys/class/tty/tty30", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675692 readlink("/sys/class/tty/tty30", "../../devices/virtual/tty/tty30"..., 4096) = 31
    [pid 25709] 10:18:04.675732 lstat("/sys/class/tty/tty59", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675785 readlink("/sys/class/tty/tty59", "../../devices/virtual/tty/tty59", 4096) = 31
    [pid 25709] 10:18:04.675826 lstat("/sys/class/tty/tty20", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675886 readlink("/sys/class/tty/tty20", "../../devices/virtual/tty/tty20", 4096) = 31
    [pid 25709] 10:18:04.675925 lstat("/sys/class/tty/tty4", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.675978 readlink("/sys/class/tty/tty4", "../../devices/virtual/tty/tty4"..., 4096) = 30
    [pid 25709] 10:18:04.676017 lstat("/sys/class/tty/tty49", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676068 readlink("/sys/class/tty/tty49", "../../devices/virtual/tty/tty49", 4096) = 31
    [pid 25709] 10:18:04.676116 lstat("/sys/class/tty/tty10", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676169 readlink("/sys/class/tty/tty10", "../../devices/virtual/tty/tty10", 4096) = 31
    [pid 25709] 10:18:04.676210 lstat("/sys/class/tty/tty39", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676261 readlink("/sys/class/tty/tty39", "../../devices/virtual/tty/tty39", 4096) = 31
    [pid 25709] 10:18:04.676300 lstat("/sys/class/tty/tty29", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676356 readlink("/sys/class/tty/tty29", "../../devices/virtual/tty/tty29", 4096) = 31
    [pid 25709] 10:18:04.676398 lstat("/sys/class/tty/tty57", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676453 readlink("/sys/class/tty/tty57", "../../devices/virtual/tty/tty57", 4096) = 31
    [pid 25709] 10:18:04.676498 lstat("/sys/class/tty/tty19", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676572 readlink("/sys/class/tty/tty19", "../../devices/virtual/tty/tty19", 4096) = 31
    [pid 25709] 10:18:04.676619 lstat("/sys/class/tty/ttyACM0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676682 readlink("/sys/class/tty/ttyACM0", "../../devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/tty/ttyACM0", 4096) = 66
    [pid 25709] 10:18:04.676743 lstat("/sys/class/tty/ttyACM0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.676813 readlink("/sys/class/tty/ttyACM0", "../../devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/tty/ttyACM0", 4096) = 66
    [pid 25709] 10:18:04.676874 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/interface", O_RDONLY) = -1 ENOENT (No such file or directory)
    [pid 25709] 10:18:04.676999 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../busnum", O_RDONLY) = 91
    [pid 25709] 10:18:04.677180 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../devnum", O_RDONLY) = 91
    [pid 25709] 10:18:04.677319 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../idVendor", O_RDONLY) = 91
    [pid 25709] 10:18:04.677437 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../idProduct", O_RDONLY) = 91
    [pid 25709] 10:18:04.677574 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../product", O_RDONLY) = 91
    [pid 25709] 10:18:04.677703 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../manufacturer", O_RDONLY) = 91
    [pid 25709] 10:18:04.677831 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../product", O_RDONLY) = 91
    [pid 25709] 10:18:04.677942 openat(AT_FDCWD, "/sys/class/tty/ttyACM0/device/../serial", O_RDONLY) = 91
    [pid 25709] 10:18:04.678056 lstat("/sys/class/tty/tty2", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.678117 readlink("/sys/class/tty/tty2", "../../devices/virtual/tty/tty2"..., 4096) = 30
    [pid 25709] 10:18:04.678165 lstat("/sys/class/tty/tty47", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.678229 readlink("/sys/class/tty/tty47", "../../devices/virtual/tty/tty47"..., 4096) = 31
    [pid 25709] 10:18:04.678272 lstat("/sys/class/tty/tty37", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.678328 readlink("/sys/class/tty/tty37", "../../devices/virtual/tty/tty37", 4096) = 31
    [pid 25709] 10:18:04.678373 lstat("/sys/class/tty/tty27", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.678437 readlink("/sys/class/tty/tty27", "../../devices/virtual/tty/tty27", 4096) = 31
    [pid 25709] 10:18:04.678483 lstat("/sys/class/tty/tty55", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.678540 readlink("/sys/class/tty/tty55", "../../devices/virtual/tty/tty55", 4096) = 31
    [pid 25709] 10:18:04.678584 lstat("/sys/class/tty/tty17", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.678798 readlink("/sys/class/tty/tty17", "../../devices/virtual/tty/tty17", 4096) = 31
    [pid 25709] 10:18:04.678847 lstat("/sys/class/tty/tty0", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.678910 readlink("/sys/class/tty/tty0", "../../devices/virtual/tty/tty0"..., 4096) = 30
    [pid 25709] 10:18:04.678953 lstat("/sys/class/tty/tty45", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679008 readlink("/sys/class/tty/tty45", "../../devices/virtual/tty/tty45", 4096) = 31
    [pid 25709] 10:18:04.679051 lstat("/sys/class/tty/tty35", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679106 readlink("/sys/class/tty/tty35", "../../devices/virtual/tty/tty35", 4096) = 31
    [pid 25709] 10:18:04.679148 lstat("/sys/class/tty/tty63", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679202 readlink("/sys/class/tty/tty63", "../../devices/virtual/tty/tty63", 4096) = 31
    [pid 25709] 10:18:04.679245 lstat("/sys/class/tty/tty25", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679300 readlink("/sys/class/tty/tty25", "../../devices/virtual/tty/tty25", 4096) = 31
    [pid 25709] 10:18:04.679351 lstat("/sys/class/tty/tty9", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679406 readlink("/sys/class/tty/tty9", "../../devices/virtual/tty/tty9"..., 4096) = 30
    [pid 25709] 10:18:04.679449 lstat("/sys/class/tty/tty53", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679505 readlink("/sys/class/tty/tty53", "../../devices/virtual/tty/tty53", 4096) = 31
    [pid 25709] 10:18:04.679557 lstat("/sys/class/tty/tty15", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679615 readlink("/sys/class/tty/tty15", "../../devices/virtual/tty/tty15", 4096) = 31
    [pid 25709] 10:18:04.679659 lstat("/sys/class/tty/tty43", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679717 readlink("/sys/class/tty/tty43", "../../devices/virtual/tty/tty43", 4096) = 31
    [pid 25709] 10:18:04.679762 lstat("/sys/class/tty/tty", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679830 readlink("/sys/class/tty/tty", "../../devices/virtual/tty/tty"..., 4096) = 29
    [pid 25709] 10:18:04.679874 lstat("/sys/class/tty/ttyS3", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.679928 readlink("/sys/class/tty/ttyS3", "../../devices/platform/serial8250/tty/ttyS3"..., 4096) = 43
    [pid 25709] 10:18:04.679975 openat(AT_FDCWD, "/dev/ttyS3", O_RDWR|O_NOCTTY|O_NONBLOCK) = 91
    [pid 25709] 10:18:04.680117 lstat("/sys/class/tty/tty33", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.680178 readlink("/sys/class/tty/tty33", "../../devices/virtual/tty/tty33"..., 4096) = 31
    [pid 25709] 10:18:04.680224 lstat("/sys/class/tty/tty61", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.680284 readlink("/sys/class/tty/tty61", "../../devices/virtual/tty/tty61", 4096) = 31
    [pid 25709] 10:18:04.680327 lstat("/sys/class/tty/tty23", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.680387 readlink("/sys/class/tty/tty23", "../../devices/virtual/tty/tty23", 4096) = 31
    [pid 25709] 10:18:04.680478 lstat("/sys/class/tty/tty7", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.680608 readlink("/sys/class/tty/tty7", "../../devices/virtual/tty/tty7"..., 4096) = 30
    [pid 25709] 10:18:04.680660 lstat("/sys/class/tty/tty51", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.680725 readlink("/sys/class/tty/tty51", "../../devices/virtual/tty/tty51", 4096) = 31
    [pid 25709] 10:18:04.680768 lstat("/sys/class/tty/tty13", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.680824 readlink("/sys/class/tty/tty13", "../../devices/virtual/tty/tty13", 4096) = 31
    [pid 25709] 10:18:04.680869 lstat("/sys/class/tty/tty41", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.680934 readlink("/sys/class/tty/tty41", "../../devices/virtual/tty/tty41", 4096) = 31
    [pid 25709] 10:18:04.680988 lstat("/sys/class/tty/ttyS1", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681052 readlink("/sys/class/tty/ttyS1", "../../devices/platform/serial8250/tty/ttyS1", 4096) = 43
    [pid 25709] 10:18:04.681109 openat(AT_FDCWD, "/dev/ttyS1", O_RDWR|O_NOCTTY|O_NONBLOCK) = 91
    [pid 25709] 10:18:04.681233 lstat("/sys/class/tty/tty31", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681300 readlink("/sys/class/tty/tty31", "../../devices/virtual/tty/tty31"..., 4096) = 31
    [pid 25709] 10:18:04.681351 lstat("/sys/class/tty/tty21", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681416 readlink("/sys/class/tty/tty21", "../../devices/virtual/tty/tty21", 4096) = 31
    [pid 25709] 10:18:04.681465 lstat("/sys/class/tty/tty5", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681534 readlink("/sys/class/tty/tty5", "../../devices/virtual/tty/tty5"..., 4096) = 30
    [pid 25709] 10:18:04.681581 lstat("/sys/class/tty/tty11", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681651 readlink("/sys/class/tty/tty11", "../../devices/virtual/tty/tty11", 4096) = 31
    [pid 25709] 10:18:04.681706 lstat("/sys/class/tty/tty58", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681770 readlink("/sys/class/tty/tty58", "../../devices/virtual/tty/tty58", 4096) = 31
    [pid 25709] 10:18:04.681817 lstat("/sys/class/tty/tty3", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681879 readlink("/sys/class/tty/tty3", "../../devices/virtual/tty/tty3"..., 4096) = 30
    [pid 25709] 10:18:04.681925 lstat("/sys/class/tty/tty48", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.681990 readlink("/sys/class/tty/tty48", "../../devices/virtual/tty/tty48", 4096) = 31
    [pid 25709] 10:18:04.682039 lstat("/sys/class/tty/tty38", {st_mode=S_IFLNK|0777, st_size=0, ...}) = 0
    [pid 25709] 10:18:04.682105 readlink("/sys/class/tty/tty38", "../../devices/virtual/tty/tty38", 4096) = 31

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,549
    You had some traction and more info on existing thread : https://forum.pjrc.com/threads/50525...ux-and-FastLED


    Reading this one the only question to answer is:
    To wait forever for USB online:: while ( !Serial );
    To wait up to 4 seconds:: while (!Serial && millis() < 4000 );

    This will turn on the LED when Teensy gets into setup and then record nd show that time and when Serial comes online.
    Code:
    uint32_t SFirst = 0;
    uint32_t SFound = 0;
    void setup() {
      SFirst = millis();
      pinMode(LED_BUILTIN, OUTPUT);
      digitalWrite( LED_BUILTIN, HIGH );
      while ( !Serial );
      SFound = millis();
      Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
      Serial.printf("Setup Entry: %d\n", SFirst);
      digitalWrite( LED_BUILTIN, LOW );
      Serial.printf("Serial Online: %d\n", SFound);
    }
    
    void loop() {
      // ...
    }

  4. #4
    Quote Originally Posted by defragster View Post
    You had some traction and more info on existing thread : https://forum.pjrc.com/threads/50525...ux-and-FastLED
    Not, really, it had been stale for over a year, and I mistakenly thought at the time that FastLED had something to do with the ttyACM serial port on teensy working so poorly (for me at least).
    Since then I have confirmed 4 things
    1) affects teensy 3.1 or 3.6 just the same
    2) been broken over multiple arduino core and teensyduino versions
    3) not dependent on what code I was running (or not a lot at least since it breaks with both SPI and FastLED bit banging).
    4) the hang is on closing the serial console window, not on compiling new code. It's just that compiling new code first closes the serial port, waits on that for whatever long it takes, and then compiles. I use serial ports with ESP32 and have no issues (but it's a better serial port with ttyUSB, not a ttyACM one).

    Thanks for your code sample, it's better than what I'm doing at init time, but ultimately the problem is obviously later than that.

  5. #5
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    8,549
    opps - Didn't look at the post dates

    Look up TyCommander - formerly TyQt on forum. Git hub is here

    When posting be sure to say what Linux is in use - I am Windows only and that changes things and easy to forget .

    But TyComm sources are there for self building - I even built it on Windows WSL so it works - of course it won't Connect there as the Serial stuff is not open across the divide it seems.

    The IDE has hung for some painful seconds at times on Windows for some recent versions - but that hang was on the BUILD - it almost seemed the FILE save and start was at fault. But I've been using a Windows CmdLine build from within my editor for some time - it kicks off the Real Arduino builder and is nice - but the work is currently Windows only not sure if the batch file could be easily moved to Linux - it should work - my update to FrankB's work is here https://github.com/Defragster/Tset
    Last edited by defragster; 06-03-2019 at 08:05 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •