Forum Rule: Always post complete source code & details to reproduce any issue!
Page 1 of 5 1 2 3 ... LastLast
Results 1 to 25 of 110

Thread: Teensyduino 1.48 Beta #1

Hybrid View

  1. #1
    Administrator Paul's Avatar
    Join Date
    Oct 2012
    Posts
    341

    Teensyduino 1.48 Beta #1

    Here is a first beta test for Teensyduino 1.48.


    Linux 32 bit:
    https://www.pjrc.com/teensy/td_148-b...nstall.linux32

    Linux 64 bit:
    https://www.pjrc.com/teensy/td_148-b...nstall.linux64

    Linux ARM:
    https://www.pjrc.com/teensy/td_148-b...stall.linuxarm

    Linux ARM64:
    https://www.pjrc.com/teensy/td_148-b...l.linuxaarch64

    Mac OS-X:
    https://www.pjrc.com/teensy/td_148-b...inoInstall.dmg

    Windows:
    https://www.pjrc.com/teensy/td_148-b...inoInstall.exe


    Changes since Teensyduino 1.47:

    Support for Arduino 1.8.10
    Drop support for old Arduino versions 1.0.6, 1.6.5 and 1.8.1
    Improve Serial Monitor efficiency, Arduino 1.8.9 & 1.8.10 only
    Update FastLED to 3.3.1, fixes compile error on Teensy LC (Daniel Garcia)
    Fix more than 2 IntervalTimer instances on Teensy 4.0
    Fix Teensy 4.0 low power mode for 24 MHz (Defragster)
    Teensy 4.0 SPI signal drive strength changed on Teensy 4.0 (KurtE)
    Fix I2S output on Teensy 3.0


    The Serial Monitor improvement still has debug printing to Arduino's console. You'll see messages there as you open and close the serial monitor, or connect and disconnect Teensy. If you get any messages in red, especially any Java exceptions, please report them on this thread.

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    Installs on macOS 10.15 Catalina beta 19A558d. Didn't compile the Blink example for T4.0 in a first attempt, got an error message telling that Arduino could not access the hardware directory which is buried inside the Arduino.app by Teensyduino.

    Had to go into System Preferences - Privacy and to grant full disk access to the Arduino.app manually. Now, it works like a charm!

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    @Theremingenieur - Do you have a Teensy 4.0 handy? Any chance you could run the USB print speed test and let me know how 10.15 does?

    On 10.14 Mojave it still uses a lot more CPU than Windows or Linux, but at least the Arduino IDE doesn't seem to give out of memory exceptions.

  4. #4
    With USB Print Test on ManPro trashcan 12 core, 10.14.5:

    Arduino serial monitor
    =================
    210,000 - 250,000. Mostly down the lower end.

    Kernel Task : 185%
    teensy_serialmon: 65%
    Arduino: 37%
    Window Server: 15%


    cat /dev/cu.usbmodem61562001
    =========================
    240,000 - 250,000.

    Kernel Task: 200%
    Terminal : 60%

    Hangs after a few secs, Kernel Task stays at 130% until cat stopped


    screen /dev/cu.usbmodem61562001
    ============================
    240,000 - 250,000.

    Kernel Task: 200%
    Terminal : 110%
    Screen : 85%


    So pretty high CPU here but the Serial monitor and screen command seem to run fine.


    Edit: Looking into the hang here I knocked up some FILE* code here and get the hang, breaking into the debugger it is in __read_nocancel, interestingly continuing the debugger "fixes" the issue. Until the next time...

    Edit2: Using open(), read() with O_NONBLOCK gets rid of the hang.
    Last edited by AndyCap; 09-21-2019 at 09:52 AM.

  5. #5
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    I have (naturally) a Teensy 4.0 handy!

    USB print speed test does between 240,000 and 248,000 lines per second. CPU usage is rather high :
    Click image for larger version. 

Name:	Capture d’écran 2019-09-14 à 10.09.46.jpg 
Views:	99 
Size:	25.4 KB 
ID:	17591

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    I guess lower CPU use was a long shot. Pretty sure Apple hasn't changed much about that part of the OS in quite a long time.

    If you leave it running, does the serial monitor ever stop or freeze up, or Java start throwing exceptions about running out of memory?

  7. #7
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    It did run for about 10 minutes until serial output simply stopped without any error message in the Arduino console :
    Click image for larger version. 

Name:	Capture d’écran 2019-09-14 à 10.40.02.jpg 
Views:	65 
Size:	83.6 KB 
ID:	17593
    Arduino does not longer eat CPU (2%) but kernel remains on about 70% from which I guess that the Teensy keeps sending.

  8. #8
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Quote Originally Posted by Theremingenieur View Post
    It did run for about 10 minutes until serial output simply stopped without any error message in the Arduino console :
    Click image for larger version. 

Name:	Capture d’écran 2019-09-14 à 10.40.02.jpg 
Views:	65 
Size:	83.6 KB 
ID:	17593
    Arduino does not longer eat CPU (2%) but kernel remains on about 70% from which I guess that the Teensy keeps sending.
    Thierry - when it stops - add another Teensy or plug in or remove some other USB device - mouse - flash drive. Any chance that makes it restart?

    257K is a good speed - a shame it dies and eats so much of the CPU.

  9. #9
    Senior Member
    Join Date
    May 2015
    Posts
    386
    Quote Originally Posted by Theremingenieur View Post
    It did run for about 10 minutes until serial output simply stopped without any error message in the Arduino console :
    Click image for larger version. 

Name:	Capture d’écran 2019-09-14 à 10.40.02.jpg 
Views:	65 
Size:	83.6 KB 
ID:	17593
    Arduino does not longer eat CPU (2%) but kernel remains on about 70% from which I guess that the Teensy keeps sending.
    10 minutes? does the screen/power saver kick in then?

  10. #10
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    Quote Originally Posted by DaQue View Post
    10 minutes? does the screen/power saver kick in then?
    No, it was running on external power supply and the mouse pointer in the top left corner to prevent the power saver to kick in. I know how to do a software test setup.

  11. #11
    Senior Member
    Join Date
    May 2015
    Posts
    386
    Quote Originally Posted by Theremingenieur View Post
    No, it was running on external power supply and the mouse pointer in the top left corner to prevent the power saver to kick in. I know how to do a software test setup.
    That's cool, I don't. I should have added something about me being newebish...

  12. #12
    Junior Member
    Join Date
    Sep 2019
    Posts
    15
    Moved to beta 3 thread.

  13. #13
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    Relaunched it. Keeping an eye on it and will tell later.

  14. #14
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    Closing and re-opening the Serial Monitor shows that the brave Teensy 4.0 continues working. But the serial monitor stalls in arbitrary intervals.

  15. #15
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    Ok. Had to find an USB hub first... Restarted everything then, with the T4 connected through a passive USB-Hub and an USB-C adapter to the MacBook. Waited for the serial monitor stalling. Then unpacked and connected a brand new T3.2. This made the serial monitor run again. Observations continue...

    But I must say that I personally do not see that serial monitor stalling as an important issue. None of my projects is made to flood the Serial monitor with so much data and I’d guess that most other real world projects do neither. To me, it looks rather like an academic thing...

  16. #16
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Quote Originally Posted by Theremingenieur View Post
    Ok. Had to find an USB hub first... Restarted everything then, with the T4 connected through a passive USB-Hub and an USB-C adapter to the MacBook. Waited for the serial monitor stalling. Then unpacked and connected a brand new T3.2. This made the serial monitor run again. Observations continue...

    But I must say that I personally do not see that serial monitor stalling as an important issue. None of my projects is made to flood the Serial monitor with so much data and I’d guess that most other real world projects do neither. To me, it looks rather like an academic thing...
    Thanks for that … it was just a TEST - I get stalling on Win 10 when I resize a BUSY window - it was happening intermittently, though I stopped waiting for that when I spend a couple seconds resizing a busy window it stalls. Then any USB device arriving or departing would wake the T_SerMon code and it would start again.

    When Paul gets to look at it - it will be interesting for him to know it acts the same on both platforms to help him reproduce - and perhaps resolve - the issue especially since his Win 10 system hardware is less plentiful. Also interesting you noted the MAC core was still eating lots of cycles - on Windows it drops off over 50% of a lesser number when that happens.

  17. #17
    Junior Member
    Join Date
    Sep 2019
    Posts
    5
    Quote Originally Posted by Theremingenieur View Post
    None of my projects is made to flood the Serial monitor with so much data and I’d guess that most other real world projects do neither. To me, it looks rather like an academic thing...
    I don't agree. Sometimes you have a "hard" problem that requires printing a lot of debug info. It would be very annoying if the debugging sometimes "broke" making finding the real problem even more difficult. Such bugs should be squashed whenever possible.

  18. #18
    Quote Originally Posted by Theremingenieur View Post
    Ok. Had to find an USB hub first... Restarted everything then, with the T4 connected through a passive USB-Hub and an USB-C adapter to the MacBook. Waited for the serial monitor stalling. Then unpacked and connected a brand new T3.2. This made the serial monitor run again. Observations continue...

    But I must say that I personally do not see that serial monitor stalling as an important issue. None of my projects is made to flood the Serial monitor with so much data and I’d guess that most other real world projects do neither. To me, it looks rather like an academic thing...
    For many people it is, but even then, the program should still work without crashing. I, however, could easily generate 50MB/s of serial data to a PC, though I'm not able to get that on the USBHS implementation. I recall that I'm seeing around 7MB/s right now on T4. I use a Python GUI to log it all at that speed using multiple threads (uses like 2% CPU). But from time to time I need to use the Arduino monitor to quickly debug and I hate that it will quickly crash the thing if I turn on a data stream. Fixing it will be very appreciated.

  19. #19
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    20,786
    Quote Originally Posted by rew View Post
    Such bugs should be squashed whenever possible.
    The serial monitor stopping after several minutes on Macintosh definitely is a bug. I will eventually fix it. The important question right now is whether to hold off releasing 1.48. My feeling is even with this unfortunate bug, overall the serial monitor speed & stability is a huge improvement compared to 1.47 where Java quickly runs out of memory.



    Quote Originally Posted by dukeblue219 View Post
    I, however, could easily generate 50MB/s of serial data to a PC, though I'm not able to get that on the USBHS implementation. I recall that I'm seeing around 7MB/s right now on T4.
    Yup, that sounds about right. So far I've not put a lot of optimization into the Teensy side, since the serial monitor was causing Java to run out of memory at even this speed.

    I'm just 1 guy. I have to prioritize my engineering time. My decision to improve the Arduino side first doesn't mean we're forever going to be stuck with 15% of the theoretical maximum speed. I can and I will optimize it to be able to run much faster.

    Whether it will ever get to 50 Mbyte/sec is unknown. That pretty close to the theoretical maximum bulk endpoint maximum with 480 Mbit/sec USB.

    For comparison, with Teensy 3.2 we get about 1.0 to 1.1 Mbyte/sec. The theoretical max is 1.2 Mbyte/sec.



    I use a Python GUI to log it all at that speed using multiple threads (uses like 2% CPU).
    Any chance you might share this Python GUI (or a stripped down version) for the sake of performance testing?


    But from time to time I need to use the Arduino monitor to quickly debug and I hate that it will quickly crash the thing if I turn on a data stream. Fixing it will be very appreciated.
    Well yeah, that's what this new beta version is about, improving the serial monitor so Java does run out of memory and crash. And also Arduino 1.8.10 support.

  20. #20
    Quote Originally Posted by PaulStoffregen View Post
    I'm just 1 guy. I have to prioritize my engineering time. My decision to improve the Arduino side first doesn't mean we're forever going to be stuck with 15% of the theoretical maximum speed. I can and I will optimize it to be able to run much faster.

    Whether it will ever get to 50 Mbyte/sec is unknown. That pretty close to the theoretical maximum bulk endpoint maximum with 480 Mbit/sec USB.
    Understood. I have no complaints as it is right now. Certainly if I needed a fixed high-bandwidth solution an FPGA would be a more logical choice, with more headaches for me. I really appreciate the several-x increase in Teensy-to-PC throughput from 3.6 to 4.0.
    For comparison, with Teensy 3.2 we get about 1.0 to 1.1 Mbyte/sec. The theoretical max is 1.2 Mbyte/sec.
    That pretty much matches my experience as well.
    Any chance you might share this Python GUI (or a stripped down version) for the sake of performance testing?
    Sure. It's just a little Python3 with QT5. I probably can't share it publicly today, though. It's not proprietary by any means, but the work was done while working for the US Govt, which means I need to clear it for release (but it also means the taxpayers are entitled to it). Can I share it with you (and select others) directly?

  21. #21
    Senior Member
    Join Date
    Dec 2015
    Location
    LA
    Posts
    137
    Quote Originally Posted by PaulStoffregen View Post
    The serial monitor stopping after several minutes on Macintosh definitely is a bug. I will eventually fix it. The important question right now is whether to hold off releasing 1.48. My feeling is even with this unfortunate bug, overall the serial monitor speed & stability is a huge improvement compared to 1.47 where Java quickly runs out of memory.
    Aside from the monitor speed stuff, on Mac 10.14.6 I've had several issues with programs compiling and or running differently between Arduino 1.8.10-TD1.48B1 and 1.8.9-TD1.47, on both T4 and T3.6. I got tired of trying to figure it out and just assumed you and others would move on to 1.48beta 2 so I went back to 1.8.9 & TD1.47. If your really looking to release 1.48 I can try to post something. My problems did seem to be more Arduino 1.8.10 or library related.

  22. #22
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    Quote Originally Posted by bicycleguy View Post
    Aside from the monitor speed stuff, on Mac 10.14.6 I've had several issues with programs compiling and or running differently between Arduino 1.8.10-TD1.48B1 and 1.8.9-TD1.47, on both T4 and T3.6. I got tired of trying to figure it out and just assumed you and others would move on to 1.48beta 2 so I went back to 1.8.9 & TD1.47. If your really looking to release 1.48 I can try to post something. My problems did seem to be more Arduino 1.8.10 or library related.
    Anything you can show as a problem is important.

    The update to 1.48 was presented in short order to support IDE 1.8.10. Some few changes expected to be good had been introduced since the release of 1.47. Paul spent free time not getting boards built/tested/packed/shipped trying to assure the SerMon would not choke and crash the IDE given 7X higher speed Teensy USB output.

    So any indications of bad or broken behavior can only be fixed given details and perhaps repro steps. What things are involved in not working the same? Even knowing if it is with a particular device or library could identify changes from the 1.47 release.

  23. #23
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,544
    After reanimating it by plugging the T3.2 (blinking in factory/hid mode) it ran until stalling again. Then, un-plugging and re-plugging the T3.2 makes no more effect, but un-plugging and re-plugging the T4.0 restarts the counting and re-animates the serial monitor window which I had left open.

  24. #24
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,078
    @Paul: Did UNZIP of 1.8.10 on Windows 10. TeensyInstaller ran well - no issues. IDE 1.8.10 must not be on KNOWN list yet as I had to tell Windows to RUN ANYWAY. Had to Approve JAVA as usual - then upload worked to a T4.

    Second sketch uploaded was my long line LPS test - resize for a MINUTE and it never stalled. Did again across both monitors and back to the big one and no issue from smallest size with lots of line shifting.

    The LPS reported in that sketch is about what it was at 220K+ and CPU is 6% to 8%.

    Running 8+ minutes and 3rd and 4th set of resize - No Problem - more than I could ever do before. And nothing of note in the console:
    Code:
    Sketch uses 13968 bytes (0%) of program storage space. Maximum is 2031616 bytes.
    Global variables use 20240 bytes (1%) of dynamic memory, leaving 1028336 bytes for local variables. Maximum is 1048576 bytes.
    T:\arduino_1.8.10\hardware\teensy/../tools/teensy_post_compile -file=lps_test.ino -path=T:\TEMP\arduino_build_888535 -tools=T:\arduino_1.8.10\hardware\teensy/../tools -board=TEENSY40 -reboot -port=usb:0/140000/0/8/7 -portlabel=hid#vid_16c0&pid_0478 Bootloader -portprotocol=Teensy 
    TeensyPipeMonitor open usb:0/140000/0/8/7
    opened, dev=COM37, name=Serial
    >> 1500 seconds still running fine with resize. Started 2nd T4 - using TyComm as Sermon. TyComm 85K to 112 lps and using 27% of CPU for 2nd T4.

    Will be running the next few hours ...
    Last edited by defragster; 09-14-2019 at 12:33 PM.

  25. #25
    Senior Member
    Join Date
    Aug 2017
    Posts
    149
    @Paul -

    I just setup Arduino 1.8.10 and TD 1.48 B1 on one my Linux computers. I was playing with HelloSerialMonitor. I selected the 'Show Timestamp' checkbox and nothing happened.
    Tried Arduino 1.8.9 Serial Monitor which is setup with TD 1.47 and the time stamps were showing.
    Has this been disabled in Arduino 1.8.10?

Posting Permissions

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