Teensyduino 1.62 Released

Paul

Administrator
Staff member
Teensyduino 1.62 has been released


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

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

TODO: Article with summary of changes

No changes were made since 1.62-beta5.

Changes since Teensyduino 1.61:

Update gcc toolchain from 11.3 to 15.2
Fix Wire library compile error with new toolchain
Add Windows 64 bit toolchain for Arduino 2.3.x
Add Linux ARM 32 and 64 bit toolchains
Fix MacOS toolchains for Teensy 2
Update all toolchains - remove unused stuff to reduce download size
Fix SPI compile time init on Teensy 4
Update teensy_size, print white text in Arduino 2.3.x
Fix compiler warnings in MANY libraries
Add Optimize Faster with Nano Libc on Teensy 4
Disable maybe uninitialized warnings
Reduce C++ STL bloat with empty __verbose_terminate_handler (thanks jmarsh)
Fix compiler warning in USB_MIDI InputRead example
Fix compiler warnings in ssd1351 library
Fix lag between compile and upload on Arduino IDE 2.3.x when serial monitor open
Workaround for Serial+MTP serial monitor reconnect after upload on Windows
 
Downloaded, and rebuilt MTP picture viewer and it still works :D

Note: with current IDE releases, As soon as I close the preferences with the updated boards list, Arduino
automatically reloads the board file, and detects that Teensy board can be updated.
 
Downloaded, and rebuilt MTP picture viewer and it still works :D

Note: with current IDE releases, As soon as I close the preferences with the updated boards list, Arduino
automatically reloads the board file, and detects that Teensy board can be updated.
Will second what @KurtE said. I tested MTP with my simple MTP test sketch to check SD Card, progmem, f4 different flash chips etc. Worked no issues.
 
Something changed for the better with this release over TD1.62B5. Starting with TD1.61B1 up to TD1.62.B5, I would compile and run my DiskioMB library for the T4.1. This is a terminal version of the Micro Box mini OS. Running the 'ls' command on a EXFAT formatted MSC drive with enough files and directories causes the listing to pause at the page() function before continuing. At that point the red LED on the T4.1 would flash seven times once and the flash eight times continuously until a terminal key was pressed.
This is the page() function:
Code:
//----------------------------------------------------------------
// Wait for input after lncnt lines have been displayed.
// Used with listDir().
//----------------------------------------------------------------
void diskIO::page(void) {
#ifdef TalkToMe
  Serial.printf(F("page()...\r\n"));
  Serial.printf(F("lncnt = %d\r\n"),lncnt);
#ifdef USE_TFT
  Serial.printf(F("tft.bottommarg()-1 = %d\r\n"),tft.bottommarg()-1);
#endif
#endif
  char chx;
  lncnt++;
#ifdef USE_TFT
  if (lncnt < tft.bottommarg()-2)
#endif
#ifdef USE_VGA
  if(lncnt < vga4bit.getTheight()-1)
#else
  if (lncnt < 35 )
#endif
  return;
  Serial.printf("more>");   

#if defined(USE_TFT) || defined(USE_VGA)
  chx = getchar();
#else
  while(!Serial.available()); <------- The program is here when red LED is flashing codes.
  chx = Serial.read();
#endif
  if (chx == '\n')
    chx = ' ';
  Serial.printf("\n");
  lncnt = 0;
}

It is waiting at "while(!Serial.available());". The red LED stops flashing codes 8 when a key is pressed. The issue is repeatable. I have tried to isolate the problem without success. I also have not been able to create a small program that duplicates the issue. There are many libraries involved:

Code:
Memory Usage on Teensy 4.1:
  FLASH: code:284144, data:64916, headers:8312   free for files:7769092
   RAM1: variables:148960, code:275448, padding:19464   free for local variables:80416
   RAM2: variables:88704  free for malloc/new:435584
/home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/../tools/stdout_redirect /tmp/arduino_build_301499/DiskIOMB.ino.lst /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump -d -S -C /tmp/arduino_build_301499/DiskIOMB.ino.elf
Multiple libraries were found for "SD.h"
 Used: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/SD
 Not used: /home/wwatson/arduino-1.8.19-TD1.62B5/libraries/SD
Using library DiskIO at version 3.0.6 in folder: /home/wwatson/Arduino/libraries/DiskIO
Using library SD at version 2.0.0 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/SD
Using library SdFat at version 2.1.2 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/SdFat
Using library SPI at version 1.0 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/SPI
Using library USBHost_t36 at version 0.2 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/USBHost_t36
Using library TeensyEXT4 at version 3.1.0 in folder: /home/wwatson/Arduino/libraries/TeensyEXT4
Using library LittleFS at version 1.0.0 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/LittleFS
Using library Audio at version 1.3 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/Audio
Using library SerialFlash at version 0.5 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/SerialFlash
Using library Arduino-Teensy-Codec-lib at version 0.32 in folder: /home/wwatson/Arduino/libraries/Arduino-Teensy-Codec-lib
Using library Time at version 1.6.1 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/Time
Using library EEPROM at version 2.0 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/EEPROM
Using library Wire at version 1.0 in folder: /home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/avr/libraries/Wire
/home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/../tools/teensy_post_compile -file=DiskIOMB.ino -path=/tmp/arduino_build_301499 -tools=/home/wwatson/arduino-1.8.19-TD1.62B5/hardware/teensy/../tools -board=TEENSY41 -reboot -port=/sys/devices/pci0000:00/0000:00:02.1/0000:01:00.0/usb1/1-2 -portlabel=/dev/ttyACM0 Serial -portprotocol=Teensy
Anyway the problem goes away when updating to TD1.62 final release and I only bring up the issue for reference in case somebody else runs into the same issue. Also, no pin settings are being changed. Hardware used is Paul's T4.1 breakout board with a T4.1, the mem board and audio board version 4.0.
:unsure:
 
Has anyone created a request to PlatformIO to update their stuff? Likewise for Visual Micro?

We should tell them about the new toolchain and to update the default command line options for compiling and linking.
 
It is waiting at "while(!Serial.available());". The red LED stops flashing codes 8 when a key is pressed. The issue is repeatable. I have tried to isolate the problem without success. I also have not been able to create a small program that duplicates the issue. There are many libraries involved:
As a note: I see here another red flash code 8, here related with Serial. Contrary to what I wrote in other thread (0.62beta4) I still have (however, not 100% reproducible) red flash code 8 on my program (very likely related to SAI interacting with hardware, but could also be Serial). I realized, that 1.62 ASM code is different to code generated with1.61. Could there be some issues within cores/Teensy4 that are surfacing with new version?. BTW compiling code does not generate warnings.

Edit. It seems that replacing a frequent (once per second) called Serial.printf() with a series of Serial.print() statements removed some issues I observed (faster, 600 MHz, Serial)
Edit: after some time of "cleaning up" red flash code 8 returned.
 
Last edited:
I have a rather very complex app running on a T4.1 that involves SAI, USB Host, SPI Slave, I2C, GPIO,PSRAM and more

Im using VSC with PlatformIO.
Since upgrading to TD1.60 I am now seeing my application hang in several places with no apparent reason.

Im not sure if this is directly related, but since it started after the upgrade - I can’t help but “blame” the update.
Anyone else experiencing this kind of behavior?
 
Something I forgot to mention is that my issue in post #4 happened again but ONLY happens when in "Faster" mode. It does not happen in any other of the optimization modes...
 
Back
Top