Teensyduino 1.62 Beta #4 - Release Candidate

Paul

Administrator
Staff member
This fourth beta test for Teensyduino 1.62 is meant to be a release candidate.

Arduino 2.3.x: Copy this URL to Arduino IDE File > Preferences (Arduino IDE > Settings on MacOS).

https://www.pjrc.com/teensy/td_162-beta4/package_teensy_0.62.4_index.json

Use Boards Manager to install Teensy version 0.62.4
(to refresh versions, Shift-Ctrl-P and click "Arduino: Update Package Index")


Arduino 1.8.x, Linux 64 bit:

Arduino 1.8.x, Linux ARM:

Arduino 1.8.x, Linux ARM64:

Arduino 1.8.x, Windows:


Changes since 1.62-beta3:

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
 
Last edited:
Back in beta2, @h4yn0nnym0u5e asked if I want community help. Well, this is the moment! I can fix known issues, but I can't test everything and find all unknown problems.

Please test this release candidate with any large projects you have, especially anything that hasn't yet been tried with the beta3 or beta2.

I know we have other much more exciting conversations about hardware, but stable software is the bedrock needed to build anything. I will personally be testing a large number of programs this afternoon and all Tuesday. If all looks good and nobody turns up any serious issues, my hope is to finalize 1.62 on Wednesday.
 
If using Arduino IDE, please test with 2.3.8 or 1.8.19. Do not use the latest 2.3.9 version. A nasty bug was found where some programs aren't properly recompiled on 2.3.9. They'll almost certainly release 2.3.10 soon.

Also, if you have a working Raspberry Pi or other ARM SBC running 64 bit "aarch64" Linux machine set up, please give it a try with Arduino 1.8.19 and the Teensyduino installer. Linux aarch64 is the one system I currently don't have any working laptop or destop setup, only a "headless" Raspberry Pi 5 which I use the compile. Maybe tomorrow I'll try to set up VNC or get my old Jetson TX2 temporarily set up with the keyboard, monitor, mouse (and table / desk). But taking time away from the the 4 platforms most people actually use (Windows, MacOS Apple Silicon, MacOS Intel-based, and Linux x86_64) doesn't seem so useful.
 
Last edited:
Last night the 4,000 deep 'Code4Code' running from FLASH was built and run on T_4.1 and also on the @Dogbone06 DevBoard 5 using IDE 1.8.19 no problem. Also good on an older locked T_4.1.
1780944564839.png

Did install on IDE 2 that is 2.3.9 and built as well as did the Tetris no problem.

IDE 2 still gives FONT error building the @KenHahn MINI DEMO that works fine on IDE 1.

Some couple of things built on both IDE's no build/run problems or warnings seen.

The other beta/day IDE 1 started build of something that takes some time - then started IDE 2 at the same time and IDE 2 finished first? Have not revisited or time tested. On a 13th Gen i7 with 16 cores/24 logical. Should try that again when IDE 2 - with 2.3.10 update.
 
Started going through some sketches and libraries
So far:
1. OpenGL on mini-dev board.
2. NXPMotionsense
3 USBHost Bluetooth Joystick

They all ran but received a whole bunch of warnings that I don't remember seeing some of the before. But nothing earth shattering.

End of day now but want to try a few more things tomorrow.

UPDATE:
1. Tried the GetSurreal XV-11 firmware which uses PWM, PIDv1.2, and SerialCommand libs. Compile and runs without errors.
2. Compiled FlexCan example and saw no errors on compile.
3. BNO080/BNO086 using sparkfun library - no issues on compiling or running.
4. Tested Bolder Eigen and IMU Libraries - no issues
5. Lidar Lite V3 lib - compiles an runs no issues
6. Adafruit SD1306 lib - compiles no issues and runs.
 
Last edited:
@PaulStoffregen

Been playing with 1.61.4 and decided your MTP_Teensy library (https://github.com/PaulStoffregen/MTP_Teensy) and tried the example that you posted a while ago:

C++:
#include <SD.h>
#include <USBHost_t36.h>
#include <MTP_Teensy.h>
#include <LittleFS.h>
#define CS_PIN BUILTIN_SDCARD
USBHost myusb;
USBHub hub1(myusb);
USBDrive mydrive1(myusb);
USBDrive mydrive2(myusb);
USBDrive mydrive3(myusb);
USBDrive mydrive4(myusb);
USBDrive mydrive5(myusb);
USBFilesystem mydisk1(myusb);
USBFilesystem mydisk2(myusb);
USBFilesystem mydisk3(myusb);
USBFilesystem mydisk4(myusb);
USBFilesystem mydisk5(myusb);
LittleFS_SPI    sNand3;
LittleFS_SPI    sNand4;
LittleFS_SPI   sFlash5;
LittleFS_SPI   sFlash6;
uint32_t LFSRAM_SIZE = 65536; // probably more than enough...
static const uint32_t file_system_size = 1024 * 512;
LittleFS_RAM lfsram;
LittleFS_Program lfsProg; // Used to create FS on the Flash memory of the chip
void setup() {
  Serial.begin(9600);
  MTP.begin();
  SD.begin(CS_PIN);
  MTP.addFilesystem(SD, "SD Card");
  myusb.begin();
  MTP.addFilesystem(mydisk1, "USB Disk1");
  MTP.addFilesystem(mydisk2, "USB Disk2");
  MTP.addFilesystem(mydisk3, "USB Disk3");
  MTP.addFilesystem(mydisk4, "USB Disk4");
  MTP.addFilesystem(mydisk5, "USB Disk5");
  //Memboard configuration
  sNand3.begin(3, SPI);
  MTP.addFilesystem(sNand3, "sNand3");
  sNand4.begin(4, SPI);
  MTP.addFilesystem(sNand4, "sNand4");
  sFlash5.begin(5, SPI);
  MTP.addFilesystem(sFlash5, "sflash5");
  sFlash6.begin(6, SPI);
  MTP.addFilesystem(sFlash6, "sflash6");
  if (lfsProg.begin(file_system_size)) {
    MTP.addFilesystem(lfsProg, "Program");
  } else {
    Serial.println("Error starting Program Flash storage");
  }
  if (lfsram.begin(LFSRAM_SIZE)) {
    Serial.printf("Ram Drive of size: %u initialized\n", LFSRAM_SIZE);
    MTP.addFilesystem(lfsram, "RAM");
  }
  Serial.println("\nSetup done");
}
void loop() {
  MTP.loop();
  myusb.Task();
  // do other things here...
  static elapsedMillis msec;
  if (msec > 500) {
    msec = 0;
    Serial.printf("mediaPresent = %s %s %s %s %s\n",
                  (mydisk1.mediaPresent() ? "Yes" : "No "),
                  (mydisk2.mediaPresent() ? "Yes" : "No "),
                  (mydisk3.mediaPresent() ? "Yes" : "No "),
                  (mydisk4.mediaPresent() ? "Yes" : "No "),
                  (mydisk5.mediaPresent() ? "Yes" : "No "));
  }
}

and having issues:

Rich (BB code):
FQBN: teensy:avr:teensy41
Using board 'teensy41' from platform in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4
Using core 'teensy4' from platform in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4

Detecting libraries used...
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\arduino\sketches\743117B5759D51292466051D3D037351\sketch\New_MTP_TEST.ino.cpp.merged
Alternatives for SD.h: [SD@1.2.4 SD@2.0.0]
ResolveLibrary(SD.h)
  -> candidates: [SD@1.2.4 SD@2.0.0]
Alternatives for SdFat.h: [SdFat@2.1.2]
ResolveLibrary(SdFat.h)
  -> candidates: [SdFat@2.1.2]
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
  -> candidates: [SPI@1.0]
Alternatives for USBHost_t36.h: [USBHost_t36@0.2]
ResolveLibrary(USBHost_t36.h)
  -> candidates: [USBHost_t36@0.2]
Alternatives for LittleFS.h: [LittleFS@1.0.0]
ResolveLibrary(LittleFS.h)
  -> candidates: [LittleFS@1.0.0]
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SD\src\SD.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatDbg.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatFile.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatFilePrint.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatFileWrite.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatFormatter.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatName.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatPartition.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\ExFatVolume.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\ExFatLib\upcase.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatDbg.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatFile.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatFileLFN.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatFilePrint.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatFileSFN.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatFormatter.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatName.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatPartition.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FatLib\FatVolume.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FreeStack.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FsLib\FsFile.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FsLib\FsNew.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\FsLib\FsVolume.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\MinimumSerial.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SdCard\SdCardInfo.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SdCard\SdSpiCard.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SdCard\SdioTeensy.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiArtemis.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiChipSelect.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiDue.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiESP.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiParticle.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiSTM32.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiSTM32Core.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\SpiDriver\SdSpiTeensy3.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\FmtNumber.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\FsCache.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\FsDateTime.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\FsName.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\FsStructs.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\FsUtf.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\PrintBasic.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\common\upcase.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\iostream\StdioStream.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\iostream\StreamBaseClass.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\iostream\istream.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat\src\iostream\ostream.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SPI\SPI.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\BluetoothConnection.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\MassStorageDriver.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\SerEMU.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\USBFilesystemFormatter.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\adk.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\antplus.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\bluetooth.cpp
Alternatives for EEPROM.h: [EEPROM@2.0]
ResolveLibrary(EEPROM.h)
  -> candidates: [EEPROM@2.0]
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\digitizer.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\ehci.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\enumeration.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\hid.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\hub.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\joystick.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\keyboard.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\keyboardHIDExtras.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\memory.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\midi.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\mouse.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\print.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\rawhid.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36\serial.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\LittleFS\src\LittleFS.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\LittleFS\src\LittleFS_NAND.cpp
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\LittleFS\src\littlefs\lfs.c
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\LittleFS\src\littlefs\lfs_util.c
Using cached library dependencies for file: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\EEPROM\EEPROM.cpp
Generating function prototypes...
Using cached sketch with function prototypes.
Compiling sketch...
"C:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-tools\\0.62.4/precompile_helper" "C:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4/cores/teensy4" "C:\\Users\\Merli\\AppData\\Local\\arduino\\sketches\\743117B5759D51292466051D3D037351" "C:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\15.2.1/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -Wno-psabi -Wno-maybe-uninitialized -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=160 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4/cores/teensy4" "C:\\Users\\Merli\\AppData\\Local\\arduino\\sketches\\743117B5759D51292466051D3D037351/pch/Arduino.h" -o "C:\\Users\\Merli\\AppData\\Local\\arduino\\sketches\\743117B5759D51292466051D3D037351/pch/Arduino.h.gch"
Using previously compiled file: C:\Users\Merli\AppData\Local\arduino\sketches\743117B5759D51292466051D3D037351\pch\Arduino.h.gch
"C:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\15.2.1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -Wno-psabi -Wno-maybe-uninitialized -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=160 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Merli\\AppData\\Local\\arduino\\sketches\\743117B5759D51292466051D3D037351/pch" "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4\\cores\\teensy4" "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4\\libraries\\SD\\src" "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4\\libraries\\SdFat\\src" "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4\\libraries\\SPI" "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4\\libraries\\USBHost_t36" "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4\\libraries\\LittleFS\\src" "-IC:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\0.62.4\\libraries\\EEPROM" "C:\\Users\\Merli\\AppData\\Local\\arduino\\sketches\\743117B5759D51292466051D3D037351\\sketch\\New_MTP_TEST.ino.cpp" -o "C:\\Users\\Merli\\AppData\\Local\\arduino\\sketches\\743117B5759D51292466051D3D037351\\sketch\\New_MTP_TEST.ino.cpp.o"
D:\Users\Merli\Documents\Arduino\Teensy4_MTP_Test_Sketches\New_MTP_TEST\New_MTP_TEST.ino: In function 'void setup()':
D:\Users\Merli\Documents\Arduino\Teensy4_MTP_Test_Sketches\New_MTP_TEST\New_MTP_TEST.ino:34:3: error: 'MTP' was not declared in this scope
   34 |   MTP.begin();
      |   ^~~
D:\Users\Merli\Documents\Arduino\Teensy4_MTP_Test_Sketches\New_MTP_TEST\New_MTP_TEST.ino: In function 'void loop()':
D:\Users\Merli\Documents\Arduino\Teensy4_MTP_Test_Sketches\New_MTP_TEST\New_MTP_TEST.ino:67:3: error: 'MTP' was not declared in this scope
   67 |   MTP.loop();
      |   ^~~
Multiple libraries were found for "SD.h"
  Used: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SD
  Not used: C:\Users\Merli\AppData\Local\Arduino15\libraries\SD
Using library SD at version 2.0.0 in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SD
Using library SdFat at version 2.1.2 in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SdFat
Using library SPI at version 1.0 in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\SPI
Using library USBHost_t36 at version 0.2 in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\USBHost_t36
Using library LittleFS at version 1.0.0 in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\LittleFS
Using library EEPROM at version 2.0 in folder: C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.62.4\libraries\EEPROM
exit status 1

Compilation error: 'MTP' was not declared in this scope

Does even seem like it finding the library which I confirmed I have in th arduino libraries library. Note havent really tested this in awhile. Also are you planning on incorporating MTP in the Core libraries?
 
Does even seem like it finding the library which I confirmed I have in th arduino libraries library. Note havent really tested this in awhile. Also are you planning on incorporating MTP in the Core libraries?
MTP was already added to the core library several versions ago, that's why it's not looking for the separate library.
 
MTP was already added to the core library several versions ago, that's why it's not looking for the separate library.
Thanks - told you haven't played with it yet in a while.

Still doesn't explain why its not working,
 
Also, it looks like you didn’t select an MTP-capable option in Tool/USB Type
Completely forgot about that! If I remember right I use to get a message that I forgot to select MTP Serial. Its been awhile since I played. Been playing with the Arduino Uno Q. @PaulStoffregen - please dont ever make a board like that, its been fun playing but a pain - still like teensy best.

Change Serial to Serial+MTP and no issues with test sketch.
 
I have done some random building of some of my old stuff. Not running into too many issues.
Although my projects that use my old BioloidSerial library are failing to build. The errors are not caused by the changes to this release, but
due to a release or two ago, with some Hacked up code, to be able to do half duplex support:
```
#if defined(__IMXRT1052__) || defined(__IMXRT1062__)
void dxlInit(long baud, Stream* pstream, int direction_pin, int tx_pin, int rx_pin ) {
// Need to enable the PU resistor on the TX pin
s_paxStream = pstream;
s_direction_pin = direction_pin; // save away.
HardwareSerial *pserial = nullptr;
if (pstream == &Serial1) {pserial = &Serial1; s_pkuart = &IMXRT_LPUART6; Serial.println("Serial1");}
else if (pstream == &Serial2) {pserial = &Serial2; s_pkuart = &IMXRT_LPUART4; Serial.println("Serial2");}
else if (pstream == &Serial3) {pserial = &Serial3; s_pkuart = &IMXRT_LPUART2; Serial.println("Serial3");}
else if (pstream == &Serial4) {pserial = &Serial4; s_pkuart = &IMXRT_LPUART3; Serial.println("Serial4");}
else if (pstream == &Serial5) {pserial = &Serial5; s_pkuart = &IMXRT_LPUART8; Serial.println("Serial5");}
else if (pstream == &Serial6) {pserial = &Serial6; s_pkuart = &IMXRT_LPUART1; Serial.println("Serial6");}
else if (pstream == &Serial7) {pserial = &Serial7; s_pkuart = &IMXRT_LPUART7; Serial.println("Serial7");}

if (pserial) {
pserial->begin(baud);
if (tx_pin != -1) pserial->setTX(tx_pin);
if (rx_pin != -1) pserial->setRX(rx_pin);

if (s_direction_pin == -1) {
// UART0_C1 |= UART_C1_LOOPS | UART_C1_RSRC;
s_pkuart->CTRL |= LPUART_CTRL_LOOPS | LPUART_CTRL_RSRC;
// volatile uint32_t *reg = portConfigRegister(tx_pin);
// *reg = PORT_PCR_DSE | PORT_PCR_SRE | PORT_PCR_MUX(3) | PORT_PCR_PE | PORT_PCR_PS; // pullup on output pin;
} else {
pserial->transmitterEnable(s_direction_pin);
}
}
setRX(0);
}
#else
```
As setTX/setRX methods no longer exist on the HardwareSerial class. Paul abstracted that class to allow FlexIO Serial ports...
Probably simple fix, in that code needs to change HardwareSerial -> HardwareSerialIMXRT
 
Completely forgot about that! If I remember right I use to get a message that I forgot to select MTP Serial. Its been awhile since I played. Been playing with the Arduino Uno Q. @PaulStoffregen - please dont ever make a board like that, its been fun playing but a pain - still like teensy best.
:D - It is a pain, but also some interesting stuff as well.

Sorry, I am also distracted, as trying to get a Pull Request into Zephyr code base, for changes to the Camera Support. I both appreciate and curse the process of getting stuff in. It requires code reviews from multiple people, Picky code formatting, etc...
 
Something I am seeing when using the Serial+MTP config, every time I modify code and upload a new sketch I have to close/re-open the arduino serial monitor because it won't auto-reconnect (Teensy waits at while (!Serial);)

(Slightly related: Serial has the option of a callback function for received characters but it would also be nice to have one for line changes e.g. DTR/RTS.)
 
Last edited:
did you try and modify it to something like
Code:
while(!Serial && millis() < 5000)

of course you can change the 5000 to something else
The issue is not the code, it is the Arduino IDE not reconnecting automatically after an upload. This works with any config except Serial+MTP.
 
The issue is not the code, it is the Arduino IDE not reconnecting automatically after an upload. This works with any config except Serial+MTP.
just gave it a try and it seems to work for me, i.e., I can leave the serial monitor open with out issue
1781020923951.png
 
Arduino IDE not reconnecting automatically after an upload
When IDE 2 first started I saw that often, made me glad for TyCommander all over again - and still.

This "platform.local.txt" fixes everything. - just have to drop it back in after each new TD update. Still 'delegates' to Teensy Loader - but lets the Teensy be selected for upload and always reconnects and support multiple USB as well as multiple Teensy.
Code:
tools.teensyloader.cmd.path=T:\T_Drive\TyComm\TyCommanderC.exe
tools.teensyloader.upload.pattern="{cmd.path}" upload --autostart --wait --delegate "{build.path}/{build.project_name}.hex"
 
If I remember right I use to get a message that I forgot to select MTP Serial.

Maybe you're remembering experience with Arduino IDE 1.8.19? The old IDE has java code to give advice for certain types of compile errors. It's just simple regex and probably only works with English, but really a nice feature for those common cases. The Teensyduino installer adds several messages to that java code, for the compiler errors where Tools > USB Type needs to be set.

As far as I know, Arduino IDE 2.3.x doesn't have any way to do this. I really wish they would bring that feature back.
 
it is the Arduino IDE not reconnecting automatically after an upload. This works with any config except Serial+MTP.

Are you seeing this on Mac, Linux or Windows? Arduino IDE version 2.3.x or 1.8.19?

Does the same device detection problem happen with Teensyduino 1.61?

It could something I missed in the port detection code, since Serial+MTP is newer than all the others. There are basically 6 versions of that stuff, as the new IDE works completely different, and of course USB device detection requires native OS APIs that are completely different between the 3 operating systems.

If all signs look like code on the Teensy side is fine, I'll probably dive into this for 1.63. Main focus of 1.62 is the new toolchain.
 
Are you seeing this on Mac, Linux or Windows? Arduino IDE version 2.3.x or 1.8.19?
Windows 10 with Arduino IDE 2.3.10.
Does the same device detection problem happen with Teensyduino 1.61?
Yes, I think that's when it started.
It could something I missed in the port detection code, since Serial+MTP is newer than all the others. There are basically 6 versions of that stuff, as the new IDE works completely different, and of course USB device detection requires native OS APIs that are completely different between the 3 operating systems.

If all signs look like code on the Teensy side is fine, I'll probably dive into this for 1.63. Main focus of 1.62 is the new toolchain.
Reproducible sample:
C:
#include <SD.h>

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWriteFast(LED_BUILTIN, LOW);

  Serial.begin(0);
  while(!Serial);

  puts("Starting MTP...");
  MTP.begin();
  MTP.addFilesystem(SD, "SD CARD");

  puts("Loop is starting");
  digitalWriteFast(LED_BUILTIN, HIGH);
}

void loop() {
  MTP.loop();
}
With the serial monitor already open, upload the sketch twice. The board stops at while (!Serial); (with the LED unlit) until the serial monitor is closed and reopened. Without waiting for Serial to be ready the Teensy continues, and the IDE appears to be connected, but none of the serial logging appears because it's actually not.
 
Without waiting for Serial to be ready the Teensy continues, and the IDE appears to be connected, but none of the serial logging appears because it's actually not.
This seems like what I had seen in the past - not necessarily MTP. After working - the Sermon had to be closed as it would not auto connect.

That seems to be working IDE 2.3.10 running code below Serial - but built MTP it won't get into loop() until SerMon closed and re-opened - then loop() starts.

Code:
#include <SD.h>

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  digitalWriteFast(LED_BUILTIN, LOW);

  Serial.begin(0);
  while (!Serial)
    ;

  puts("Starting ...");
  //MTP.begin();
  //MTP.addFilesystem(SD, "SD CARD");

  puts("Loop is starting");
  digitalWriteFast(LED_BUILTIN, HIGH);
}

uint32_t lpCnt = 0;
elapsedMillis foo;
void loop() {
//  MTP.loop();
  if (foo > 2000) {
    lpCnt++;
    Serial.printf("Loop %ld\n", lpCnt);
    foo = 0;
  }
}
 
Back
Top