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

Thread: Teensyduino 1.57 Beta #1

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

    Teensyduino 1.57 Beta #1

    Here is a first beta test for Teensyduino 1.57.


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

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

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

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

    MacOS (Catalina to Monterey)
    https://www.pjrc.com/teensy/td_157-b...S_Catalina.zip

    Old MacOS (Lion to Mojave)
    https://www.pjrc.com/teensy/td_157-b...inoInstall.dmg

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


    Changes since Teensyduino 1.56:

    USBHost_t36 USBDrive & USBFilesystem (wwatson,KurtE,mjs513)
    SdFat update to 2.1.2, fixes file append bug
    Wire library support slave mode on Teensy 4
    Workaround MacOS serial monitor crash
    Add breadcrumb feature to CrashReport
    Improve AudioInputAnalog on Teensy 4
    Add AudioOutputPWM on Teensy 4 (Mark Tillotson)
    Tlc5940 support for Teensy 4
    Update ADC library
    EEPROM fix get() & put() with String (Luni64)
    Ethernet allow use of other SPI ports (KurtE)
    SdFat FsVolume::begin allows explicit partition location
    SdFat support FAT12 & single FAT on Circuit Python (KurtE)
    SdFat volume name functons (KurtE)
    SD fix listfiles example on Teensy LC
    SD update SdFat_Usage example with other SPI ports
    SD add setMediaDetectPin() for card detection (KurtE)
    Increased use of yield() in blocking functions
    IPAddress != operator (Shawn Silverman)
    Dynamic AudioConnection on Teensy 4 (Jonathan Oakley)
    MTP handle host cancel & status control transfer
    LittleFS getMediaName (mjs513)
    LittleFS support 255 char filenames
    OctoWS2811 getPixel() supports RGBW (Tobias Johansson)
    QuadEncoder fix home and index trigger (mjs513)
    QuadEncoder setCompareValue() (mjs513)
    boards.txt & platform.txt updated for Arduino 2.0 beta
    Add pluggable discovery & monitor for Arduino 2.0 beta

  2. #2
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,843
    Downloaded. Win 11 install on IDE 1.8.19 went properly.
    <edit>: not even a system warning about file from download on execution.

    T_4.1 BUILTIN_SDCARD ListFiles built and ran properly ... all 120,726 lines worth!

  3. #3
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,843
    @Paul: just thought to read the end lines of CONSOLE from install and build p#2:
    Code:
    Multiple libraries were found for "SD.h"
     Used: C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\libraries\SD
     Not used: C:\T_Drive\arduino-1.8.19\libraries\SD
    Using library SD at version 2.0.0 in folder: C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\libraries\SD 
    Using library SdFat at version 2.1.0 in folder: C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\libraries\SdFat 
    Using library SPI at version 1.0 in folder: C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\libraries\SPI 
    C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\tools\teensy-tools\1.56.1
    Having installed the IDE 2.0 - even though running TDE 1.8.19 it is using the 1.56.1 tree tested 'back then'.

    See this drive folder where unzipped 1.8.19 is installed - where TeensyDuino 1.57b1 has placed the new files:
    Code:
     Directory of C:\T_Drive\arduino-1.8.19\hardware\teensy\avr
    
    01/29/2022  02:51 PM    <DIR>          .
    12/20/2021  11:37 AM    <DIR>          ..
    01/19/2022  06:08 PM               725 boards.local.txt
    05/06/2022  05:52 PM            83,394 boards.txt
    01/03/2022  09:44 PM    <DIR>          cores
    05/06/2022  05:52 PM            10,987 keywords.txt
    12/20/2021  11:37 AM    <DIR>          libraries
    05/06/2022  05:52 PM             7,589 platform.txt
    Seems IDE 1.8.19 give preference to Hardware in the %appdata% folder.

  4. #4
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,843
    To confirm the IDE was closed to remove>>: C:\Users\Tim\AppData\Local\Arduino15\packages\teen sy
    > could not delete the folder because Teensy.exe and Teensy_ports were still active!
    <edit>, BTW: killing those tasks allowed full delete to complete

    So now the 1.57b1 install is in use and indeed Listfile.ino builds and runs:
    Code:
    Multiple libraries were found for "SD.h"
     Used: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SD
     Not used: C:\T_Drive\arduino-1.8.19\libraries\SD
    Using library SD at version 2.0.0 in folder: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SD 
    Using library SdFat at version 2.1.2 in folder: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SdFat 
    Using library SPI at version 1.0 in folder: C:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SPI
    Last edited by defragster; 05-07-2022 at 05:07 AM.

  5. #5
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,117
    Morning All
    See everyone was busy last night.

    No problem on installing the the 1.57-beta1. As @defragster said this time no blue screens from Windows complaining about security.

    Ran my updated MTP_Integrity Test sketch (has a few options to test multiple things with).

    Breadcrumb: Saw this on startup do not know what the breadcrumbs mean so:
    Code:
    No Crash Data To Report
      Hopefully all is well, but certain types of crashes can't be reported:
    	stuck in an infinite loop (technically, hardware still running properly)
    	remaining in a low power sleep mode
    	access to certain peripherals without their clock enabled (eg, FlexIO)
    	change of CPU or bus clock speed without use of glitchless mux
      Breadcrumb #1 was 2705474578 (0xA1424412)
      Breadcrumb #2 was 4234545148 (0xFC6607FC)
      Breadcrumb #3 was 3439104072 (0xCCFC9048)
      Breadcrumb #4 was 170496750 (0xA2992EE)
      Breadcrumb #5 was 3875607432 (0xE7011388)
    Tested Remove and replace on External SD Card using the Audio Shield:
    Code:
    ### EXT1(0) removed dt:301000
    ... Not showing all the MTP debug stuff here....
    ### EXT1(0) inserted dt:1694000
    *MTP_class::send_Event(400b)
    then it showed up in the list on in windows explorer

    USB/MTP:
    As shown on the MSC thread it picks up the 2 external USB Drives:
    Code:
    ##USB Drive: 0 connected
    
    Partition Table
    	part,boot,bgnCHS[3],type,endCHS[3],start,length
    *** GPT Disk WIP ***
    GPT guard:	1,0,0x0,0x2,0x0,0xEE,0xFE,0xBF,0xDB,1,4294967295
    pt_#0:	2,0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0
    pt_#0:	3,0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0
    pt_#0:	4,0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0
    	 < unused area starting at: 0 length 242075647 >
    
    GPT partition header revision: 10000
    LBAs current:1 backup:242075647 first:34 last:242075614
    Disk GUID:494E6C4B-0928-4119-6EED-8BD052C8A7BAStart LBA Array: 2 Count: 128 size:128
    Part	 Type Guid, Unique Guid, First, last, attr, name
    0	EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, 466E5E58-6453-84BB-6CDD-3B813E5167A3, 2048, 60520447, 0, 
    >>> Microsoft Basic Data Partition
    1	EBD0A0A2-B9E5-4433-87C0-68B6B72699C7, 08F18C4C-41DD-48E2-2784-EFD893305C7C, 60520448, 242073599, 0, 
    >>> Microsoft Basic Data Partition
        EXFAT:
    3	00000000-0000-0000-0000-000000000000, 00000000-0000-0000-0000-000000000000, 0, 0, 0, 
    Found new Volume:0
    
    @@@@@@@@@@@@@@@ NEW Drives @@@@@@@@@@@
    
    ##USB Drive: 1 connected
    
    Partition Table
    	part,boot,bgnCHS[3],type,endCHS[3],start,length
    FAT32:	1,0,0x20,0x21,0x0,0xC,0xFE,0xFF,0xFF,2048,47298560
    Extend:	2,0,0xFE,0xFF,0xFF,0xF,0xFE,0xFF,0xFF,47300608,73844736
    exFAT:	2:1,0,0x20,0x21,0x0,0x7,0xFE,0xFF,0xFF,47300672(64),73844672 (0)
    pt_#0:	3,0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0
    pt_#0:	4,0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0,0
    Found new Volume:1
    and the drive list:
    Code:
    Dump Storage list(7)
    store:0 storage:10001 name:PgmIndx fs:20011068 pn:
    store:1 storage:20001 name:EXT1 fs:20011630 pn:
    store:2 storage:30001 name:RAM0 fs:20011428 pn:EXTMEM
    store:3 storage:40001 name:RAM1 fs:200114f4 pn:EXTMEM
    store:4 storage:50001 name:PROGM fs:20011208 pn:PROGRAM
    store:5 storage:60001 name:USB0-GPTxFat fs:20011b0c pn:
    store:6 storage:70001 name:USB1-FAT32-P fs:20011fa0 pn:
    NOTE: Right now only the first partition of the multiple partition drive is picked up - known issue to be fixed in later beta.

    As a quick test I wrote @KurtE's index file to one of the drives without an issue:
    Code:
    Write Large Index File
    ........................................................................................................................................................................ Total time to write 22015988 byte: 42368.27 seconds
    
    	Big write KBytes per second 519.63 
    
    done.
    and writing a Big file and small file (Tim's method)
    Code:
    Start Big write of 2048000 Bytes.........................
    Big write /0_2MBfile.txt took  0.78 Sec for 2048000 Bytes : file3.size()=2048000
    	Big write KBytes per second 2633.68 
    
    Bytes Used: 367394816, Bytes Total:92951019520
    
    Start Big write of 25124864 Bytes............................................................
    Big write /0_bigfile.txt took  9.34 Sec for 25124864 Bytes : file3.size()=25122816
    	Big write KBytes per second 2690.03 
    
    Bytes Used: 392560640, Bytes Total:92951019520

  6. #6
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,117
    Just as a followup I did update usb_desc to use MTP+SERIAL plus I had already uninstalled the package version in appdata for IDE2 at least for now - just makes it easier to update libraries and make changes. Besides not thrilled with IDE2 yet - there are still several outstanding PRs/Issues that need to be incorporated.

    Guess maybe will test I2C slave since I never did that before.

  7. #7
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,316
    Paul - I had wondered if this beta would also show up as a new version for the Arduino boards packages...

    i.e. if you had put the pieces in place to use the newer stuff in Arduino_cli that might better support headless...

    I did confirm this morning the IDE 2 does not see new board updates. So I am assuming not. looks like I will need to remove it and/or simply continue
    using the build I have, where I grab all of the pieces out of <sketches>/libraries/... and symbolic link into cores and ...

  8. #8
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,316
    Paul, I am also curious about having multiple Teensy installs using the Arduino15 stuff as mentioned versus how I have multiple Robotis OpenCM for example where one is in the Arduino15 and the others are in:
    <sketches>/hardware/...

    That is I tried building my Circuitpython test with new TD beta in 1.8.19 ran it from 1.8.19...
    Code:
    Using library USBHost_t36 at version 0.2 in folder: C:\Users\kurte\Documents\Arduino\libraries\USBHost_t36 
    Using library SdFat at version 2.1.2 in folder: C:\Users\kurte\Documents\Arduino\libraries\SdFat 
    Using library SPI at version 1.0 in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\libraries\SPI 
    Using library MTP_Teensy at version 1.0.0 in folder: C:\Users\kurte\Documents\Arduino\libraries\MTP_Teensy 
    Using library LittleFS at version 1.0.0 in folder: C:\Users\kurte\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.56.1\libraries\LittleFS
    Also in 1.8.19 I have a dev version of OpenCM (probably way out of date, but...), I also have the main boards package installed.

    Click image for larger version. 

Name:	screenshot.jpg 
Views:	1 
Size:	349.7 KB 
ID:	28316
    Code:
    "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\OpenCM904\\tools\\opencm_gcc\\5.4.0-2016q2/bin/arm-none-eabi-objcopy" -O binary "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_180226/read_write_ax.ino.elf" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_180226/read_write_ax.ino.bin"
    Using library DynamixelSDK at version 0.0.1 in folder: C:\Users\kurte\Documents\Arduino\hardware\opencm904\OpenCM904\libraries\DynamixelSDK 
    "C:\\Users\\kurte\\AppData\\Local\\Arduino15\\packages\\OpenCM904\\tools\\opencm_gcc\\5.4.0-2016q2/bin/arm-none-eabi-size" -A "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_180226/read_write_ax.ino.elf"
    Sketch uses 46464 bytes (39%) of program storage space. Maximum is 116736 bytes.
    Global variables use 8804 bytes of dynamic memory.
    Maybe I will try a hack again back in (sketches)\Hardware to point to new teensy install...

  9. #9
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,205
    Quote Originally Posted by KurtE View Post
    Paul - I had wondered if this beta would also show up as a new version for the Arduino boards packages...
    Nope. I automated building the package zip files (though it's currently broken on MacOS), but updating the package index is still a very manual process. I didn't do it for this beta.

    I'm not planning to put much work into the new packages until Arduino fixes issue #769. Yeah, people wanting headless support from Arduino CLI could benefit even if the GUI isn't properly supported. And if #769 doesn't get fixed, I'll do that after 1.57 is released, and maybe also 1 or 2 times as we get closer to 1.57 release. Maybe.

    But I do believe we need a patch in the Java code to force use of the libraries from the Teensyduino installer and ignore any other Teensy packages. People can still use the packages with an unpatched copy of Arduino 1.8.19, and of course with Arduino 2.0 beta. But when using a copy of Arduino which has been modified by Teensyduino, the installer's files should always be used no matter what packages exist elsewhere. Not quite sure how to do that, but in a future where the packages are more easily findable, we need this in the 1.57 release.

  10. #10
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    8,117
    I2C Slave Mode - Seems to be working. Since I don't seem to do anything easy. I used the sketches from this post https://forum.pjrc.com/threads/69607...l=1#post300929 with the Master on a T4.1 and a T4 acting as a slave.

    On slave I see:
    Code:
    sending (32 bytes)
    sending (32 bytes)
    sending (32 bytes)
    and on the master I get:
    Code:
    read: done
    0
    1
    1
    1
    3.00
    0.00
    6.00
    7.00
    
    read: done
    0
    1
    2
    0
    4.00
    0.00
    0.00
    0.00
    
    read: done
    0
    1
    2
    2
    1.00
    3.00
    4.00
    0.00

  11. #11
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    10,316
    Quick update: I un-installed the teensy IDE package.
    So now building with new beta on 1.8.19


    Note: I am still building with my fork of github of a few projects like SDFat, USBHost_t36... but are (or at least were ) in sync with the ones in beta.

    Right now I am using the main branch of the MTP_Teensy project, which is pretty much in sync with what was my fast_start branch.

    Note several of the examples that deal with MSC will not currently build as WIP to migrate the MSC support into USBHost and that is still a WIP.

    (Note: I put back in the changes for MTP+Serial)

    I have since then tried building and running a few sketches including:

    (MTP_Teensy) Simple_mtp_ili9341_picture_view.ino which uses ILI9341_t3, does not use external libraries for some other bitmap formats.
    (MTP_Teensy) CircutMicroPython.ino - experiments plugging in a CircuitPython or a MicroPython board to usbhost... Still playing with this one.

    mtp_tft_picture_view (own project) - this is what the simple version was split off from. Actually we had this in the mtp_teensy, and then moved it out...
    It does like the other one, but also optionally can use JPEGDec to decode jpeg files and PNGdec to handle PNG files, plus can do scalling, plus we have code in it to configure for several
    different displays. ILI9341 (either ILI9341_t3 or ILI9341_t3n), ILI9488, ST7735 or ST7789, RA8875 or RA8876. Right now running on 7" RA8876

    So far everything still appears to be working

  12. #12
    Paul, I have a question about calling yield() from the various "available" functions. These functions don't fit the pattern of calling yield() while waiting for something in hardware to finish, and I think therefore they should not call yield(). For example, for a UART, you might create a task that has a loop like in the first snippet below, where it waits by calling yield(). The second snippet below shows what it would have to look like to get the same behavior. I've looked at a number of Arduino cores and other systems with support for RTOS, and none of them call yield() or otherwise wait within available().

    ---------------------------------
    if available() does NOT call yield()
    -----------------------------------
    Code:
      while (!available()) {
        yield();
      }
      read()
      etc.

    ---------------------------------
    if available() calls yield()
    -----------------------------------
    Code:
      available();  // calls yield() internally, does not return until data is available
      read()
      etc.

  13. #13
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    26,205
    The behavior of Serial.available() is not changed to wait until data is available.

  14. #14
    Quote Originally Posted by PaulStoffregen View Post
    The behavior of Serial.available() is not changed to wait until data is available.
    Oh, sorry, now I see it's only in USB serial. Why did you decide to add it there, or was it already there?

  15. #15
    Senior Member
    Join Date
    Apr 2021
    Location
    Cambridgeshire, UK
    Posts
    337
    Note that dynamic audio connection for the Teensy 3.x is available in PR#642

Posting Permissions

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