Teensyduino 1.61 Released

Paul

Administrator
Staff member
Teensyduino 1.61 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

Since 1.60-beta1, the only change is a minor scaling back of the CPU voltage boost around 500 MHz.

Changes since Teensyduino 1.60:

Update .EHEX secure mode update for compatibility with bootloader 1.09
Add Tools > CPU Speed options for 60, 90, 120, 180, 240 MHz on Teensy 4.x
Adjust Teensy 4.x CPU voltage calculation
Audio library improve resilience to other libraries using large DMA - only with I2S1 so far
Audio library prevent unnecessary DMA channel allocation for PWM output ( Jonathan Oakley)
SD library add example programs mediaPresent.ino and SdFat_Usage_FourCards.ino
ST7735_t3 library break large updates into multiple SPI transactions (Defragster)
USBHost_t36 library add support for CP2105 dual serial
SdFat library allow use of BUILTIN_SDCARD to init SDIO on Teensy 4.x (jmarsh)
Fix USB MIDI on Teensy 2.0
Define UINT8_MAX on Teensy 2.0
Add missing bit defines for I2S registers on Teensy 4.x
Define FlexSPI LUT for flash memory reading on Teensy 4.x
Clean up unused stuff from Teensy 4.x startup code
Update sample Makefile comments/instructions
Teensy Loader show more hardware info in Verbose Info window
Delete all "Teensy 4 Security" plugin files with Arduino 2.3.x Boards Manager uninstall
 
1.61 updated in IDE 2 I rarely use.

Worked for the ASCIItable example.

As usual sketch that works in IDE 1 fails as it stumbles over FONT redef's including ILI9341?
This is with @KenHahn MINI board with T-4.1 and "ST7796_t3.h" display

here's a snippet for two font files - comicsans not even included:
Code:
c:/users/timlabs/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ST7735_t3-dev-big-screen-t4\objs.a(st7735_t3_font_Arial.c.o):t:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4\src/st7735_t3_font_Arial.c:459: multiple definition of `Arial_11'; C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ILI9341_fonts\ILI9341_fonts.a(font_Arial.c.o):t:\T_Drive\tCode\libraries\ILI9341_fonts\src/font_Arial.c:459: first defined here
c:/users/timlabs/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ST7735_t3-dev-big-screen-t4\objs.a(st7735_t3_font_Arial.c.o):t:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4\src/st7735_t3_font_Arial.c:331: multiple definition of `Arial_10'; C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ILI9341_fonts\ILI9341_fonts.a(font_Arial.c.o):t:\T_Drive\tCode\libraries\ILI9341_fonts\src/font_Arial.c:331: first defined here
c:/users/timlabs/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ST7735_t3-dev-big-screen-t4\objs.a(st7735_t3_font_Arial.c.o):t:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4\src/st7735_t3_font_Arial.c:208: multiple definition of `Arial_9'; C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ILI9341_fonts\ILI9341_fonts.a(font_Arial.c.o):t:\T_Drive\tCode\libraries\ILI9341_fonts\src/font_Arial.c:208: first defined here
c:/users/timlabs/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ST7735_t3-dev-big-screen-t4\objs.a(st7735_t3_font_Arial.c.o):t:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4\src/st7735_t3_font_Arial.c:89: multiple definition of `Arial_8'; C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ILI9341_fonts\ILI9341_fonts.a(font_Arial.c.o):t:\T_Drive\tCode\libraries\ILI9341_fonts\src/font_Arial.c:89: first defined here
c:/users/timlabs/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ST7735_t3-dev-big-screen-t4\objs.a(st7735_t3_font_ComicSansMS.c.o):t:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4\src/st7735_t3_font_ComicSansMS.c:16046: multiple definition of `ComicSansMS_96'; C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ILI9341_fonts\ILI9341_fonts.a(font_ComicSansMS.c.o):t:\T_Drive\tCode\libraries\ILI9341_fonts\src/font_ComicSansMS.c:16046: first defined here
c:/users/timlabs/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ST7735_t3-dev-big-screen-t4\objs.a(st7735_t3_font_ComicSansMS.c.o):t:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4\src/st7735_t3_font_ComicSansMS.c:10894: multiple definition of `ComicSansMS_72'; C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ILI9341_fonts\ILI9341_fonts.a(font_ComicSansMS.c.o):t:\T_Drive\tCode\libraries\ILI9341_fonts\src/font_ComicSansMS.c:10894: first defined here
c:/users/timlabs/appdata/local/arduino15/packages/teensy/tools/teensy-compile/11.3.1/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ST7735_t3-dev-big-screen-t4\objs.a(st7735_t3_font_ComicSansMS.c.o):t:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4\src/st7735_t3_font_ComicSansMS.c:7906: multiple definition of `ComicSansMS_60'; C:\Users\TimLabs\AppData\Local\arduino\sketches\4C4322C68864574FE63E5E402E26FAC8\libraries\ILI9341_fonts\ILI9341_fonts.a(font_ComicSansMS.c.o):t:\T_Drive\tCode\libraries\ILI9341_fonts\src/font_ComicSansMS.c:7906: first defined here
 
Last edited:
As usual sketch that works in IDE 1 fails as it stumbles over FONT redef's including ILI9341?

Is the sketch one of these 11 examples, or something else I don't have?

Please give me all the code (that isn't one of the published example programs) and specific steps to reproduce this problem on a fresh install of Arduino IDE 2.3.8 with Teensyduino 1.61 installed by Boards Manager.

Maybe ST7735_t3 needs to improve the way it has copied some of the font stuff? Or maybe this is a subtle problem with the way arduino_cli (inside Arduino IDE 2) is handling local copies of library files? Without the ability to reproduce the problem, I just can't do much more than guess.
 
As usual sketch that works in IDE 1 fails as it stumbles over FONT redef's including ILI9341?
This is with @KenHahn MINI board with T-4.1 and "ST7796_t3.h" display
My guess is it has to do with your changes to the library to change:
dot_a_linkage=false

Before when it was true, it did not include a file if no one references it... Now it includes all of them...
 
Before when it was true, it did not include a file if no one references it... Now it includes all of them...
Yeah I remember in some of the libraries I had to change that to false to make it link back to font library correctly going to try now.

EDIT: I just ran the ILI_Ada_Font_test4 sketch which tests the ILI9341 fonts and the adafruit fonts. Had no issues with compile errors - loaded and ran fine. Check the st7735 with dot_a_linkage=false.

Running on @KenHahn's MINI board with T-4.1 and "ST7796_t3.h" display as well.

NOTE: these are the fonts that are included in the sketch

C++:
const ili_fonts_test_t font_test_list[] = {
  {&Arial_12, nullptr,  "Arial_12", ST7735_WHITE, ST7735_WHITE},
  {&Arial_12_Bold, nullptr,  "ArialBold 12", ST7735_YELLOW, ST7735_YELLOW},
  {&ComicSansMS_12, nullptr,  "ComicSansMS 12", ST7735_GREEN, ST7735_GREEN},
  {&DroidSans_12, nullptr,  "DroidSans_12", ST7735_WHITE, ST7735_WHITE},
  {&Michroma_12, nullptr,  "Michroma_12", ST7735_YELLOW, ST7735_YELLOW},
  {&Crystal_16_Italic, nullptr,  "CRYSTAL_16", ST7735_BLACK, ST7735_YELLOW},
  {&Chancery_16_Italic, nullptr,  "Chancery_16_Italic", ST7735_GREEN, ST7735_GREEN},
  {&OpenSans16, nullptr,  "OpenSans 16", ST7735_RED, ST7735_YELLOW},
  {nullptr, &FreeMono9pt7b,  "GFX FreeMono9pt7b", ST7735_WHITE, ST7735_WHITE},
  {nullptr, &FreeMono9pt7b,  "GFX FreeMono9pt7b", ST7735_RED, ST7735_YELLOW},
  {nullptr, &FreeSerif9pt7b,  "GFX FreeSerif9pt7b", ST7735_WHITE, ST7735_WHITE},
  {nullptr, &FreeSerif9pt7b,  "GFX FreeSerif9pt7b", ST7735_RED, ST7735_YELLOW},

} ;
 
Last edited:
something else I don't have
That ... opps ... I knew @KurtE and @mjs513 would get it ...

The problem is IDE 1 builds it JUST FINE. @KenHahn and I had tons of issues with inconsistent builds grabbing stuff doing sample work on his MINI. Not using IDE 2 it seemed the issue was gone because of change "dot_a_linkage=false".

I'm under the weather and just cancelled a needed exhaust repair visit so wasn't up to finding a published example. It seems I'm using the "ST7735_t3-dev-big-screen-t4" branch variant for that display from @h4yn0nnym0u5e

And the source is showing the issue IDE 2 only is attached.

IDE 1:
Code:
Multiple libraries were found for "ST7796_t3.h"
 Used: T:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4
 Not used: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\ST7735_t3
Multiple libraries were found for "font_Arial.h"
 Used: T:\T_Drive\tCode\libraries\ILI9341_fonts
 Not used: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\ILI9341_fonts
 Not used: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\ILI9341_t3
Multiple libraries were found for "SD.h"
 Used: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SD
 Not used: T:\T_Drive\arduino-1.8.19\libraries\SD
 Not used: T:\T_Drive\tCode\libraries\SD
Multiple libraries were found for "Audio.h"
 Used: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\Audio
 Not used: T:\T_Drive\tCode\libraries\Audio_-_Adafruit_Fork
Using library ST7735_t3-dev-big-screen-t4 at version 1.2.1 in folder: T:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4
Using library SPI at version 1.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SPI
Using library ILI9341_fonts at version 1.0 in folder: T:\T_Drive\tCode\libraries\ILI9341_fonts
Using library Adafruit_FT6206_Library at version 1.1.0 in folder: T:\T_Drive\tCode\libraries\Adafruit_FT6206_Library
Using library Adafruit_BusIO at version 1.17.1 in folder: T:\T_Drive\tCode\libraries\Adafruit_BusIO
Using library Wire at version 1.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\Wire
Using library TeensyUserInterface at version 1.3.1 in folder: T:\T_Drive\tCode\libraries\TeensyUserInterface
Using library Audio at version 1.3 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\Audio
Using library SD at version 2.0.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SD
Using library SdFat at version 2.1.2 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SdFat
Using library SerialFlash at version 0.5 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SerialFlash
Using library Bounce2 at version 2.55 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\Bounce2
Using library LittleFS at version 1.0.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS
Using library USBHost_t36 at version 0.2 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\USBHost_t36
Using library EEPROM at version 2.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\EEPROM
Using library QNEthernet_WIFI at version 0.36.0-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI

IDE 2: "exit status 1"
Code:
Multiple libraries were found for "font_Arial.h"
  Used: T:\T_Drive\tCode\libraries\ILI9341_fonts
  Not used: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\ILI9341_t3
Multiple libraries were found for "Audio.h"
  Used: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\Audio
  Not used: T:\T_Drive\tCode\libraries\Audio_-_Adafruit_Fork
Multiple libraries were found for "SD.h"
  Used: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\SD
  Not used: C:\Users\TimLabs\AppData\Local\Arduino15\libraries\SD
  Not used: T:\T_Drive\tCode\libraries\SD
Multiple libraries were found for "ST7796_t3.h"
  Used: T:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4
  Not used: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\ST7735_t3
Using library ST7735_t3 at version 1.2.1 in folder: T:\T_Drive\tCode\libraries\ST7735_t3-dev-big-screen-t4
Using library SPI at version 1.0 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\SPI
Using library ILI9341_fonts at version 1.0 in folder: T:\T_Drive\tCode\libraries\ILI9341_fonts
Using library Adafruit FT6206 Library at version 1.1.0 in folder: T:\T_Drive\tCode\libraries\Adafruit_FT6206_Library
Using library Adafruit BusIO at version 1.17.1 in folder: T:\T_Drive\tCode\libraries\Adafruit_BusIO
Using library Wire at version 1.0 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\Wire
Using library TeensyUserInterface at version 1.3.1 in folder: T:\T_Drive\tCode\libraries\TeensyUserInterface
Using library Audio at version 1.3 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\Audio
Using library SD at version 2.0.0 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\SD
Using library SdFat at version 2.1.2 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\SdFat
Using library SerialFlash at version 0.5 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\SerialFlash
Using library Bounce2 at version 2.55 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\Bounce2
Using library LittleFS at version 1.0.0 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\LittleFS
Using library USBHost_t36 at version 0.2 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\USBHost_t36
Using library EEPROM at version 2.0 in folder: C:\Users\TimLabs\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.61.0\libraries\EEPROM
Using library QNEthernet_WIFI at version 0.36.0-snapshot in folder: T:\T_Drive\tCode\libraries\QNEthernet_WIFI
exit status 1
 

Attachments

  • Teensy_41_Demo_Mini_Platform_Menus_Tetris.ino
    55.4 KB · Views: 17
Update .EHEX secure mode update for compatibility with bootloader 1.09

Let's see if I understand this right: Bootloaders bought today would ship with 1.09. So they would not work with Teensy Loader version 1.60 or below? Need to use 1.61?

I run 1.58 in a few projects that I don't touch, they work. Will they work with a new bootloader that runs 1.09?
 
This backwards compatibility limit only applies to Lockable Teensy when locked into secure mode.

It's the .EHEX file encryption, not Teensy Loader. To work with 1.09 bootloader when the hardware is locked in secure mode, you need .EHEX data built by 1.61. You could hypothetically copy a .EHEX file created by 1.61 to another computer which has Teensy Loader 1.60 or 1.59. As long at the .EHEX file was created to 1.61, it can be programmed onto secured Lockable Teensy by an older version of Teensy Loader.

You could also take a .HEX file created by an older version like 1.58 and use the "teensy_secure" command line utility to encrypt it (either by copying the .HEX to the computer with 1.61, or by copying teensy_secure and your key.pem file to the computer with 1.58). As long as the .EHEX file is created by teensy_secure from 1.61 or later, it can work with the 1.09 bootloader.

Again, none of this matters for standard Teensy. It only applies to lockable Teensy in secure mode.


EDIT: There are some cases where 1.09 bootloader may work anyway. So if you do try using a 1.09 bootloader with older software and it seems to work fine, please understand there are other cases where an old .EHEX file would not work. I am limited in how much I can talk about the encryption and security measures by the NXP NDA, but I will summarize "it's complicated". I poured a lot of work into making Teensy's support for secure mode as simple and painless to use as possible, but unfortunately this issue with backwards compatibility with a necessary compromise needed to achieve the goal of making it feel as simple as regular Arduino code loading.
 
Last edited:
I have some Teensys in the field that will probably never get the new bootloader because I only upgrade them via OTA methods. Will EHEX files generated with Teensyduino 1.61 still work with those Teensys?
 
This backwards compatibility limit only applies to Lockable Teensy when locked into secure mode.

It's the .EHEX file encryption, not Teensy Loader. To work with 1.09 bootloader when the hardware is locked in secure mode, you need .EHEX data built by 1.61. You could hypothetically copy a .EHEX file created by 1.61 to another computer which has Teensy Loader 1.60 or 1.59. As long at the .EHEX file was created to 1.61, it can be programmed onto secured Lockable Teensy by an older version of Teensy Loader.

You could also take a .HEX file created by an older version like 1.58 and use the "teensy_secure" command line utility to encrypt it (either by copying the .HEX to the computer with 1.61, or by copying teensy_secure and your key.pem file to the computer with 1.58). As long as the .EHEX file is created by teensy_secure from 1.61 or later, it can work with the 1.09 bootloader.

Again, none of this matters for standard Teensy. It only applies to lockable Teensy in secure mode.


EDIT: There are some cases where 1.09 bootloader may work anyway. So if you do try using a 1.09 bootloader with older software and it seems to work fine, please understand there are other cases where an old .EHEX file would not work. I am limited in how much I can talk about the encryption and security measures by the NXP NDA, but I will summarize "it's complicated". I poured a lot of work into making Teensy's support for secure mode as simple and painless to use as possible, but unfortunately this issue with backwards compatibility with a necessary compromise needed to achieve the goal of making it feel as simple as regular Arduino code loading.
All I should have to do is replace the teensy_secure.exe correct? That would solve it, without having to upgrade to 1.61 completely?
 
Last edited:
I have some Teensys in the field that will probably never get the new bootloader because I only upgrade them via OTA methods. Will EHEX files generated with Teensyduino 1.61 still work with those Teensys?
That's my exact question, how is this new ehex affects old secured teensies that are already in the field?
 
Should mention, that Norton is having a fit over this...
1779809773464.png


Should only take a few hours....

Oops meant to put this in:
 
Last edited:
Back
Top