Teensyduino 1.57 Beta #3

Paul

Administrator
Staff member
Here is a third beta test for Teensyduino 1.57.


Linux 32 bit:
https://www.pjrc.com/teensy/td_157-beta3/TeensyduinoInstall.linux32

Linux 64 bit:
https://www.pjrc.com/teensy/td_157-beta3/TeensyduinoInstall.linux64

Linux ARM:
https://www.pjrc.com/teensy/td_157-beta3/TeensyduinoInstall.linuxarm

Linux ARM64:
https://www.pjrc.com/teensy/td_157-beta3/TeensyduinoInstall.linuxaarch64

MacOS - Catalina to Monterey
https://www.pjrc.com/teensy/td_157-beta3/Teensyduino_MacOS_Catalina.zip

Old MacOS - Lion to Mojave
https://www.pjrc.com/teensy/td_157-beta3/TeensyduinoInstall.dmg

Windows:
https://www.pjrc.com/teensy/td_157-beta3/TeensyduinoInstall.exe

Arduino IDE 2.0.0-rc7 (all systems, as version 1.56.53):
https://www.pjrc.com/teensy/td_156/package_teensy_index.json



Changes since Teensyduino 1.56-beta2:

Improve Wire slave mode on Teensy 4
Fix for Arduino CLI & IDE 2.0 packages messing up Teensy on Arduino 1.8.x.
Support headless compile (but not yet upload) on Arduino CLI
Add Serial+MTP USB Type
Add function descriptions for Arduino IDE 2.0.0-rc7
SD, Ethernet, LiquidCrystal override Arduino 2.0.0-rc7 builtin libs (KurtE, PerT)
Audio TDM examples
Audio S/PDIF fixes on Teensy 4 (Jonathan Oakley)
 
Installed on W10 both 1.8.19 and IDE.

Works. Not sure serial + mtp was added to boards.txt for 3.x

Edit confirmed that:

Code:
teensy41.menu.usb.serialmtp=Serial + MTP Disk (Experimental)
teensy41.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL

USB Type was not added to T3.x... should be something like::
Code:
teensy36.menu.usb.mtp=MTP Disk (Experimental)
teensy36.menu.usb.mtp.build.usbtype=USB_MTPDISK
[COLOR="#FF0000"]teensy36.menu.usb.serialmtp=Serial + MTP Disk (Experimental)
teensy36.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL[/COLOR]
Code
Did confirm I could build for T3.6 with this code as I had the following in local.boards.txt
Code:
#Beta 2 added MTP + Serial for t4.x
#teensy41.menu.usb.serialmtp=MTP Disk Serial (Experimental)
#teensy41.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL

#teensyMM.menu.usb.serialmtp=MTP Disk Serial (Experimental)
#teensyMM.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL

#teensy40.menu.usb.serialmtp=MTP Disk Serial (Experimental)
#teensy40.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL

teensy36.menu.usb.serialmtp=MTP Disk SERIAL (Experimental)
teensy36.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL

teensy35.menu.usb.serialmtp=MTP Disk SERIAL (Experimental)
teensy35.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL

teensy31.menu.usb.serialmtp=MTP Disk SERIAL (Experimental)
teensy31.menu.usb.serialmtp.build.usbtype=USB_MTPDISK_SERIAL
teensy31.menu.speed.144=144 MHz (overclock)
 
Last edited:
win10 laptop unzipped ide 2.0.rc7, added board mgr link p#1
Installed the Teensy boards

Opened example BlinkWithoutDelay and selected board T_4.1 and did Verify with no Teensy connected, maybe missed error popup that fades.

Saw error after other changes to opened IDE 2.0 - so opened BlinkWithoutDelay, exited and saved to start fresh with it open.

Built that example got Error:
Error: Request compile failed with message: Compilation error: exec: "C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\tools\teensy-tools\1.56.53/teensy_secure": file does not exist


Here are the contents of that directory - that exe is missing:
Code:
 Directory of C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\tools\teensy-tools\1.56.53

06/12/2022  10:35 PM    <DIR>          .
06/12/2022  10:35 PM    <DIR>          ..
06/12/2022  10:32 PM            25,088 mktinyfat.exe
06/12/2022  10:32 PM            17,920 precompile_helper.exe
06/12/2022  10:32 PM            12,800 stdout_redirect.exe
06/12/2022  10:32 PM            10,256 T4Security.jar
06/12/2022  10:32 PM         4,483,816 teensy.exe
06/12/2022  10:32 PM            16,384 teensy_gateway.exe
06/12/2022  10:32 PM            43,520 teensy_ports.exe
06/12/2022  10:32 PM            26,624 teensy_post_compile.exe
06/12/2022  10:32 PM            46,592 teensy_reboot.exe
06/12/2022  10:32 PM            13,312 teensy_restart.exe
06/12/2022  10:32 PM            47,104 teensy_serialmon.exe
06/12/2022  10:32 PM            69,632 teensy_size.exe
 
Not sure serial + mtp was added to boards.txt for 3.x

Yup, I forgot to add them to boards.txt.

Edited my copy just now, so they'll be in 1.57-beta4.



Here are the contents of that directory - that exe is missing:
Code:
 Directory of C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\tools\teensy-tools\1.56.53

06/12/2022  10:35 PM    <DIR>          .
06/12/2022  10:35 PM    <DIR>          ..
06/12/2022  10:32 PM            25,088 mktinyfat.exe
06/12/2022  10:32 PM            17,920 precompile_helper.exe
06/12/2022  10:32 PM            12,800 stdout_redirect.exe
06/12/2022  10:32 PM            10,256 T4Security.jar
06/12/2022  10:32 PM         4,483,816 teensy.exe
06/12/2022  10:32 PM            16,384 teensy_gateway.exe
06/12/2022  10:32 PM            43,520 teensy_ports.exe
06/12/2022  10:32 PM            26,624 teensy_post_compile.exe
06/12/2022  10:32 PM            46,592 teensy_reboot.exe
06/12/2022  10:32 PM            13,312 teensy_restart.exe
06/12/2022  10:32 PM            47,104 teensy_serialmon.exe
06/12/2022  10:32 PM            69,632 teensy_size.exe

That is very strange. Maybe it was eaten by Windows Defender?

This is the file Arduino downloaded to install the files in that directory.

https://www.pjrc.com/teensy/td_157-beta3/teensy-tools-windows.tar.bz2

You can see teensy_secure.exe is inside that archive together with the others. It's not published as a separate file. Arduino can only download it by fetching that archive which has all the files that are supposed to be in that directory. How you could end up without 1 of the files when they're all downloaded as a group in a single archive is a mystery to me.
 
...
That is very strange. Maybe it was eaten by Windows Defender?

This is the file Arduino downloaded to install the files in that directory.

https://www.pjrc.com/teensy/td_157-beta3/teensy-tools-windows.tar.bz2

You can see teensy_secure.exe is inside that archive together with the others. It's not published as a separate file. Arduino can only download it by fetching that archive which has all the files that are supposed to be in that directory. How you could end up without 1 of the files when they're all downloaded as a group in a single archive is a mystery to me.

Strange indeed ... Win 11 Desktop and Win 10 laptop both downloaded that .tar. and extracted tools folder.

Indeed that teensy_secure.exe is present on both, and is executable as extracted. So nothing seems to be interfering when doing it manually using 7-Zip for access?
 
Good Morning all
Finally got the PI4 updated and operational last night or rather early this morning and started playing with IDE2.0. The PI4 is running Ubuntu-MATE-20.04 to start and the desktop is fairly windows like.

So ran my mtp-integrity-sketch to see how MTP was behaving on the PI4. Interesting how it shows it self in Ubuntu Mate.

first connects to the T4 disks faster than windows and shows as a device (phone) on the desktop.
Screenshot at 2022-06-13 06-49-58.png

when I open the device:
Screenshot at 2022-06-13 06-27-41.png
Did a right click on the QSPI disk and checked its properties and looks it gets the number of items on the disk right but free space shows as zero and the total bytes is strange

Now I guess I will see if I can get the too talking to each other
 
Installing on windows now.

First update of Arduino 2rc7:
  • the board manager shows that 1.56.1 is installed and shows the dropdown for the new install version of 1.56.53???? Any reason for the 53 vs 3 - not an issue just curious.
  • Interesting side note though is that in my windows setup it shows the Teensy SD library in the examples under T4.1, with the PI SD for Teensy does not show.
  • Did check to see if teensy_secure.exe was in the tools directory and it was

Install for 1.8.19 went smoothly - no issues.
 
... new install version of 1.56.53???? Any reason for the 53 vs 3 - not an issue just curious.

Short answer is it's pretty much an arbitrary choice on my part. ;)

Arduino's version numbers are meant to follow a convention called semantic versioning. According to the official spec, at least as I understand it, this should probably be called "1.57.0-beta.3". Whether Arduino's Boards Manager supports beta suffix, and how well, I don't know. Rather than spend time exploring this, I just added 50 and made the minor version 56, so it'll sort properly on a list using only the 3 numbers.
 
...
That is very strange. Maybe it was eaten by Windows Defender?

This is the file Arduino downloaded to install the files in that directory.
...

Back to this laptop - opened IDE 2
In board Mgr selected The Teensy 1.56.1 marked installed

Clicked INSTALL and it proceeded to reinstall:
Code:
...
Upgrading platform teensy:avr@1.56.53 with teensy:avr@1.56.1
Uninstalling teensy:teensy-tools@1.56.53, tool is no more required
Tool teensy:teensy-tools@1.56.53 uninstalled
Configuring platform.
Platform teensy:avr@1.56.1 installed

When it was complete this time there is a: "C:\Users\Tim\AppData\Local\Arduino15\packages\teensy\tools\teensy-tools\1.56.1\teensy_secure.exe"

Not sure anything changed with WINDOWS on the computer since last install to not 'reject' the file ... seems like the IDE installer may have just made a misstep?
 
I'm trying this on Ubuntu but for some reason it's giving me this:

Checking Arduino 1.8.13:
version: "lib/version.txt" file missing
Does not match Arduino 1.8.13.

And it repeats this for all versions...

Mind you I tried a 1.8.19 install and then a 2.1 using the corresponding Teensyduino installers. Still the same error. I tried as sudo too. Nothing.

Any help would be appreciated!
Thanks!
 
I'm trying this on Ubuntu but for some reason it's giving me this:

Checking Arduino 1.8.13:
version: "lib/version.txt" file missing
Does not match Arduino 1.8.13.

And it repeats this for all versions...

Mind you I tried a 1.8.19 install and then a 2.1 using the corresponding Teensyduino installers. Still the same error. I tried as sudo too. Nothing.

Any help would be appreciated!
Thanks!

How did you install the Arduino? Did you download from arduino.cc?
As mentioned in the download and install instructions: https://www.pjrc.com/teensy/td_download.html
Note: Arduino from Linux distro packages is not supported.

Good luck.
 
Installed ok on Mac Catalina 10.15.7
Still haven't managed to crash the serial monitor with b1 or b3. Skipped b2.

FYI on another minor issue:
With 1.57b1 I often got a situation when uploading a program where if Teensy loader window was behind the Arduino terminal window the upload wouldn't happen and Arduino would show on the bottom left 'Uploading...' (forever? but still responsive). Then if I moved the terminal window to expose Teensy loader it would magically start loading. Had never seen that before, maybe a macOS background issue. I was trying to reliably reproduce this problem so I could report it, but couldn't. Some sessions it would happen nearly every time others not so much. I think I ruled out the program I was loading or the one running on the Teensy. Did seem to happen more with 4.1 than 3.2 and maybe more with a lot of apps running.

So far with 1.57b3 I haven't been able to get this to happen. so yah! It was a minor issue anyway but you never know.
 
FYI on another minor issue:
With 1.57b1 I often got a situation when uploading a program where if Teensy loader window was behind the Arduino terminal window the upload wouldn't happen and Arduino would show on the bottom left 'Uploading...' (forever? but still responsive). Then if I moved the terminal window to expose Teensy loader it would magically start loading. Had never seen that before, maybe a macOS background issue. I was trying to reliably reproduce this problem so I could report it, but couldn't. Some sessions it would happen nearly every time others not so much. I think I ruled out the program I was loading or the one running on the Teensy. Did seem to happen more with 4.1 than 3.2 and maybe more with a lot of apps running.

This happens to me on TD1.56 on both a 2016 Macbook Pro and a 2020 M1 both with the latest Mac OS
 
@Paul - you may see this CrashReport.breadcrumb() example below on other thread - Just modified existing Data_Access_Violation example. As indicated by the attached output - it works as expected.

ALSO: On laptop I saw that MalwareBytes was responsible for 'Quarantine' of the teensy_secure.exe on first use as it was detected as 'some known evil' app.
> I'm not on that computer now, but I save a screen shot.
> Did an install - and then before running ran MalwareBytes which identified the file as 'evil' and suggested quarantine, and I had to mark it as an exception to ignore.
> Not sure if that EXE was recompiled for IDE 2.0? It never triggered before on this desktop in use - in fact the build of the example below was on a LOCKED T_4.1 from IDE 1.8.19 install, where this machine also has MalwareBytes.

... see post #17 and github.com/PaulStoffregen/MyFault/pull/17
 
Last edited:
Quick notes on things hopefully in next beta or release:

Boards.txt - for T3.x Serial + MTP (mentioned earlier in thread)

USBHost_t36 - USBFillesystem files - I believe are not currently reading/writing Dates and Times.
The header file was still checking for a #define we were using during developement:
Code:
#ifdef FS_FILE_SUPPORT_DATES
changed to:
Code:
#if TEENSYDUINO >= 156
https://github.com/PaulStoffregen/USBHost_t36/pull/93

(Other USBHost stuff if TD release is out a ways)

SD Library - If card is removed and new card inserted and/or at times with format. The total size and Free/used size often times give you previous SDFat cached values.
https://github.com/PaulStoffregen/SD/pull/43
returns 0 for both of these values, if the last attempt to begin the FS failed (either begin failed or mediaInserted returned false).

Edit: IDE2 Teensy-monitor.exe - issues on Windows (Sketch will not see anything on Serial.read() unless there is a Serial.write...

More details in: https://forum.pjrc.com/threads/5354...Teensy-Support?p=308929&viewfull=1#post308929
 
Last edited:
@Paul: Looking at p#15 code - it does exemplify - but contrived and not at all the best.

This seems like a better DEMO using the same code, see github.com/PaulStoffregen/MyFault/pull/17
Code:
// MyFault - collection of examples to trigger fault exceptions

// Example for :  void breadcrumb(unsigned int num, unsigned int value) {
// num is a value 1 to 6 for possible unique storage entries
//

void setup() {
  if ( !CrashReport ) {
    CrashReport.breadcrumb( 1, 0x5000000 | __LINE__ ); // Upper bits hold '5' perhaps indicating func() for ref, lower bits show line #
    CrashReport.breadcrumb( 2, millis() );
    Serial.begin(9600);
    CrashReport.breadcrumb( 3, millis() );
    while (!Serial && millis() < 4000 );
    CrashReport.breadcrumb( 4, millis() );
    Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
    CrashReport.breadcrumb( 5, millis() );
    CrashReport.breadcrumb( 6, 0xdeadbeef );
    *(volatile uint32_t *)0x30000000 = 0; // causes Data_Access_Violation
  }
  else {
    while (!Serial && millis() < 4000 );
    Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
    Serial.print(CrashReport);
  }
}

void loop() {
}

/* sample output

C:\T_Drive\tCode\T4\CrashBreadCrumbs\CrashBreadCrumbs.ino Jul 10 2022 15:21:11

C:\T_Drive\tCode\T4\CrashBreadCrumbs\CrashBreadCrumbs.ino Jul 10 2022 15:21:11
CrashReport:
  A problem occurred at (system time) 15:21:44
  Code was executing from address 0x1F2
  CFSR: 82
  (DACCVIOL) Data Access Violation
  (MMARVALID) Accessed Address: 0x30000000
  Temperature inside the chip was 56.82 °C
  Startup CPU clock speed is 600MHz
  Reboot was caused by auto reboot after fault or bad interrupt detected
  Breadcrumb #1 was 83886089 (0x5000009)
  Breadcrumb #2 was 300 (0x12C)
  Breadcrumb #3 was 363 (0x16B)
  Breadcrumb #4 was 363 (0x16B)
  Breadcrumb #5 was 363 (0x16B)
  Breadcrumb #6 was 3735928559 (0xDEADBEEF)

*/
 
@defragster,
Thanks, I was wondering where the 'Data_Access_Violation example' came from.

I wondered a bit too ... that was 13 months ago ...

And in response to TD1.57b1 comment:
...
Can't wait to throw some 'BreadCrumbs', any documentation I missed?
...

Knew there was an 'ask' for documentation ... so made that sample.

That came about from another crash thread. There are also 4 DWORDS in 1062's RTC that work (and work faster as their battery/(power on) backing doesn't take a cache flush for RAM2)
see: pjrc.com/threads/66076-Teensy-4-x-s-1062-MCU-has-16-bytes-of-NVRAM-on-RTC-unit
 
win10 laptop unzipped ide 2.0.rc7, added board mgr link p#1
Installed the Teensy boards

Hello,

Can someone tell me what the above means? I have installed the latest 2.0rc8 and have been unable to install the latest teensyduino into the IDE 2.0. I can only install it into 1.8.xxx. I assume the "added board mgr link p#1" is how IDE 2.0 finds out about the install but I cannot find how that is done.

Any help would be appreciated. Thanks.
 
With IDE 2.0rc8 installed - going to Board Manager should show supported boards including "Teensy" when this is added to the 'Preferences / Addiional Board Manager URL' list

https://www.pjrc.com/teensy/td_156/package_teensy_index.json

Finding the entry for PJRC / Teensy it will show the version installed or allow installing from there.

The downloadable TD installer only worked for the IDE 1.8.x family. The ID 2.x installs from the online URL's
 
Hello,

Can someone tell me what the above means? I have installed the latest 2.0rc8 and have been unable to install the latest teensyduino into the IDE 2.0. I can only install it into 1.8.xxx. I assume the "added board mgr link p#1" is how IDE 2.0 finds out about the install but I cannot find how that is done.

Any help would be appreciated. Thanks.

There is also more details up on the forum thread: https://forum.pjrc.com/threads/53548-Arduino-CLI-Alpha-Release-Teensy-Support
 
Thanks to KurtE and defragster for your quick replies. I was able to install the Teensy code from the URL. I promise to improve my forum search skills so I won't trouble y'all with questions that have already been answered.

Moving ahead, it appears that IDE 2.0 is not usable. My "real" development activity takes place in a lab that is isolated from the internet. Unless I can install everything from files I can download and copy I cannot use it.

Again, thank you for your help on this.
 
OOPS! Spoke too soon:

Failed to install platform: teensy:avr.
Error: 13 INTERNAL: Cannot install tool teensy:teensy-compile@1.56.1: moving extracted archive to destination dir: rename C:\Users\ptt1957\AppData\Local\Arduino15\tmp\package-3824465983\tools c:\Users\ptt1957\AppData\Local\Arduino15\packages\teensy\tools\teensy-compile\1.56.1: Access is denied.

Since I was running IDE 2.0 as administrator, I'm not sure where that came from...

No reply needed unless you know what's going on. I can always use the new teensyduino installer with my old 1.8.xx.

Thanks
 
...
No reply needed unless you know what's going on. I can always use the new teensyduino installer with my old 1.8.xx.

Thanks

Not sure about the error - there may be some odd permissions setting. Is the USER_Account=ptt1957 not an admin but only Limited User? Perhaps the installer doesn't complete fully under the "IDE 2.0 as administrator"?

The IDE 2 is in early days ... still evolving Beta toward a 'Release version'. For the use case noted the IDE 1.8.x sounds like the best solution. IDE 2 will require Internet connection, and the code is just getting close to usable for Teensy usage as IDE adds support for the features and function present in the IDE 1.8.x.
 
Back
Top