Teensyduino 1.60 Released

Paul

Administrator
Staff member
Teensyduino 1.60 has been released


Support for Arduino IDE 2.0.4 and later is available by adding this package index URL in File > Preferences.


Article with summary of new features and changes:


Since 1.60-beta6, the only change is a minor update to ST7735_t3 library.

Changes since Teensyduino 1.59:

Update FlexIO_t4, ILI9488_t3, LittleFS, QuadEncoder, ShiftPWM
SoftwareSerial fix TX on Teensy 4, fix RX on Teensy 3 and 4
Fix __cxa_guard_release on Teensy 3 (jmarsh)
Fix CCM_ANALOG_PLL_SYS_DIV_SELECT define (A-Dunstan)
Fix makeTime() leap year (A-Dunstan)
Add C++ new aligned (A-Dunstan)
Fix HardwareSerial XBAR pins 7, 8, 36 on Teensy 4 (KurtE)
Fix HardwareSerial receive with setRX on Teensy 4 (sndsgd)
Fix HardwareSerial serialEvent on Teensy 3
Check non-const pin number with digitalWriteFast
Fix extmem_realloc with NULL on Teensy 4.1
FS class virtual destructor
Fix __SSAT return type
Audio fix TDM2 input and output (Jonathan Oakley)
Audio fix stuck AudioEffectFade with no input (Jonathan Oakley)
Audio fix AudioEffectFreeverbStereo (Synvox)
Audio fix AudioSynthToneSweep buffer overflow (Steven Hazel)
Audio improve AudioEffectReverb (Eric Brombaugh)
Audio MidiSynth examples updated with PROGMEM for samples
Audio fix for Teensy LC code (Mark Tillotson)
Teensy Loader wait longer for large flash erase
MacOS properly sign utility programs
Linux check for missing /etc/udev/rules.d/00-teensy.rules file
Suppress pointless C++ ABI warnings
MacOS arm64+x86_64 universal binary built on Sequioa with Xcode16, but gcc is still x86_64 only
Linux x86_64 built with Ubuntu 22.04, previously was Ubuntu 14.04
Linux armhf built with Raspbian 12, previously was Raspbian 10
Linux aarch64 built with Raspbian 12, previously was Ubuntu 20.04 on nVidia Jetson TX2
Windows built by new machine, but should be same as prior versions
Installers for Arduino 1.8.x use better compression
Fix erroneous "Teensy should be selected from teensy ports" message
MacOS support for Arduino 1.8.19 discontinued
Linux i686 (32 bit) support discontinued
Audio effect envelope: don't re-start release if noteOff() called (Jonathan Oakley)
Audio effect granular: add guard macros (Jonathan Oakley)
Audio effect reverb: fix reverb cut off when incoming data stops (Jonathan Oakley)
Add VS code plugin for Lockable Teensy features on Arduino IDE 2.3.x
Automatically find key.pem in IDE 1.8 or IDE 2.3 sketchbook locations
teensy_secure add "keyfile" option to show key.pem pathname
Teensy Loader built with latest wxWidgets 3.2.6 on all platforms
Fix Teensy Loader toolbar icons on Windows
Fix Teensy Loader toolbar on MacOS
SD Improve SDIO media presence detection
SdFat SPI driver avoid 512 byte stack usage (KurtE)
Add FS name()
USB Keyboard add optional NRKO
LittleFS simplify Winbond chip names
LittleFS add FS name() and mediaPresent()
LittleFS optimize getMediaName()
LittleFS update Fujitsu FRAM (mjs513)
SerialFlash fix use of alternate SPI ports (KurtE)
ST7735_t3 support 320x480 (KurtE)
ST7735_t3 fix colors with setRotation(2) (Jonathan Oakley)
USBHost_t36 USBFilesystem add name() and mediaPresent()
USBHost_t36 KeyboardController delete debug messages (Tristan Rowley)
Update code security plugin for Arduino IDE 2.3.x
Support for 16 MByte PSRAM chip (thanks Jonathan Oakley)
Increase QSPI clock speed from 88 MHz to 105.6 MHz
LittleFS detect QSPI setup, don't assume 8MB PSRAM offset
Fix DMA TCD copy out of order by compiler optimization (jmarsh)
FS class and LittleFS use constexpr constructor
Improve PLL PFD setup, hopefully fixes weird crashes
Remove delays and forced optimize, not needed with PFD fix
Fix AudioMemory with optimize Smallest Code with LTO
DMAChannel default channel preemption settings
SdFat examples recommend at most 25 MHz for SPI
CrashReport minor changes to printed message (Shawn Silverman)
Wire: Use glitch filter in slave mode
Wire: Fix slave mode onReceive() for repeat start
USB Keyboard define GUI key names
USB MIDI receive return channel=0 for system messages
USB MTP improve ability to use in custom USB device
USBHost_t36: recover from device errors during enumeration
Update ST7735_t3 library
 
Last edited:
It may be worth updating the testing and instructions for installing Teensyduino on Raspbian, since it's now 64-bit and the ARM32 version doesn't work...
 
Is this any good?
Wonder if we can now have 2x 16MB PSRAM's to get a total of 32MB :rolleyes:


1771439845060.png
 
Two is absolutely twice as good
Got a twin set T_4.1 from @KenHahn and edited a copy of the PJRC PSRAM 8MB test and found no issues.

Filled one 16MB with data Fixed and Random as the original with cache_delete, then from end to start MemCpy copied 1st 16MB to the 2nd 16MB, then did compare of the expected value test on the 2nd 16MB. Doing memcpy backwards seemed it would be fun and in odd sized groups to see if it hit any boundary issues.

// 16777216 bytes to move end to start :: 1019, 16431*1021, 146

Considered dynamic alter of the middle 16431 sets of 1021 bytes, but didn't get back to it, just in case the odd efforts hit even on boundary that mattered, though typing that just moving a byte from the start to the end block would do that without huge shift cascading through.

Coded that up to just slide start bytes to end bytes and keep the repeat blocks the same size. Quick test under way with just 2 fixed values to prove the memcpy math works ... shifting 1026 times of the 1021 block move - coming up on 950 passes with just two fixed and no issues ... code says PSRAM's running at 120 MHz.

Even the FIXED test iterating will take an hour+ on just two values. Will alter to run ALL 50+ values one time to test values, then alter counts to run just One Fixed and One Random for the remainder for boundary testing.
 
Did you roll your own PSRAM test, or try my revised one? I know the latter can be provoked to fail if prefetch is enabled, e.g. by PR#708. Some work is needed to create a stable speed increase, which @jmarsh has quite rightly declined to do until he can get his hands on the hardware.

Note for other readers - I believe the 16MB PSRAM is working fine with Teensyduino 1.60 as-is, no need to worry!
 
I am getting an error about not having GLIBC 2.33 and 2.34 on my system, and my linux repo is only handing out 2.31.

I get this in Arduino 2 after a succesful update to 1.60 by the IDE, brought on by attempting to compile anything.
I also get it trying a workaround and installing for the older IDE, not sucessful in installing. Checking that shows no Teensyduino installed so 1.59 got clobbered...


AVlinux, based on MX linux, so essentialy Ubuntu.
$ uname -a
Linux Brick 6.0.0-10.1-liquorix-amd64 #1 ZEN SMP PREEMPT_DYNAMIC liquorix 6.0-6~mx21+1 (2022-11-30) x86_64 GNU/Linux


Arduino 2.whateverItIsNow says it is up to date. It's been forever since I posted an SOS so forgive me if I forgot all the things.
 
Last edited:
Able to roll back to 1.59 in both IDE versions.

For whatever it might be worth, It isn't going to kill me to update the OS. But before I clobber a familiar daily driver, I thought I would note the issue, wait and see. I looked at updating glibc myself, I can think of other things I would rather do.
 
Last edited:
Considering its more than 3 years old I think a kernel update would be worthwhile. The current version is 6.18.9
 
Yeah, I updated the build systems for every OS. The Linux x86-64 binaries are now build on Ubuntu 22.04. Version 1.60 is likely to not work with Linux distros much older the Ubuntu 22.04.

Prior versions were built on Ubuntu 14.04. That's great for compatibility with very old Linux systems, but the compiled binaries were having a variety of problems with newer Linux systems.
 
I’m a bit confused (possibly because I simply haven’t found the right documentation…). Should I expect Teensyduino 1.60 to install and work on a 2020 M1 Mac (i.e. Apple silicon), using an ARM build of Arduino 2.x? Or does it need the Intel build and Rosetta?
 
I’m a bit confused (possibly because I simply haven’t found the right documentation…). Should I expect Teensyduino 1.60 to install and work on a 2020 M1 Mac (i.e. Apple silicon), using an ARM build of Arduino 2.x? Or does it need the Intel build and Rosetta?
Yes, it runs great on Apple silicon with Arduino 2.3.8.

Thanks for all the work Paul !
 
Arduino lists two builds for macOS, one for Intel and one for ARM:
1772813239661.png

Somewhere "under the hood" of the Arduino 2.x Boards manager, it figures out what Teensyduino to download and install, unlike 1.x where it's the user's responsibility. On an Intel Mac, for me, it all just worked. On an ARM Mac, it worked, but said "please install Rosetta". That worked too, but I thought it a bit odd that I'd got the Intel one installed by default (Arduino's fault, I assume: it seems to do some OS detection at download time). So I uninstalled that, and installed the ARM one instead, but then Teensyduino didn't work. For me.

But I do make a couple of changes to the system, which may well have messed things up. Since a proper reinstall is a bit painful, I thought I'd ask what I hoped was a simple question: "Does Teensyduino for macOS work with the ARM build of Arduino 2.x?". I seems hard to get a straight answer. From the horse's mouth would be good, but he's apparently off in another field right now...
 
From the start of a typical compile:
Detecting libraries used...
/Users/xx/Library/Arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall .....
 
Short simple answer: with Rosetta2 installed, everything should work on Apple silicon Macs.

Longer answer...

Starting with 1.60, all the PJRC compiled binaries are Universal 2 applications with both ARM64 (Apple M-series silicon) and Intel X86-64 sections. This includes the Teensy Loader app and all the command line utilities like "teensy_post_compile", "teensy_reboot", etc.

However, the gcc toolchain used to compile programs is still built only as X86-64. This is the last component which isn't native ARM64. It was built by ARM, not PJRC, and for the version we're still using they only built it for X86-64. ARM has published newer toolchains. We're likely to update to a new toolchain in 1.61 or 1.62. However, ARM's latest gcc toolchain is built only for ARM64, so if we update to the latest it's likely to mean future Teensyduino will no longer work on Intel-based Macs.

Right now for 1.60, we're only publishing 1 download for MacOS, with the X86-64 toolchain and ARM64+X86-64 utilities, so you will get exactly the same files for Teensyduino regardless of which version from Arduino you are running.
 
If you'd like to verify the Universal 2 status really has ARM64, it can be done in Terminal with the "file" command.

Here's a screenshot showing the result for the files installed by version 1.60 installed by Arduino IDE 2.3.8 on a M1 Mac running MacOS 26.2 (Tahoe)

1772816620328.png
 
Back
Top