Teensyduino 1.42 Beta #7

Status
Not open for further replies.

Paul

Administrator
Staff member
Here is a seventh beta test for Teensyduino 1.42.

The main new feature is a "Teensy" section in the Tools > Ports menu
which tries to show Teensy in all modes, not just Serial. New native
(no Java serial library) serial monitor code is also with these ports.


Old beta download links removed. Please use the latest version:
https://www.pjrc.com/teensy/td_download.html


Changes since Teensyduino 1.42-beta6

Handle attempt to reopen serial port, clicking button while Arduino compiles
Windows: teensy_serialmon detect orphaned from Arduino IDE condition
 
Installed - tormented it by IDE #1 - open T_3.6 ( as RAW_HID ), Start Upload, { open - close open } Tsermon a few times during compile - and entered text to echo on active Tsermon window.

Both uploads below fail - but there are no extra copies of Tsermon or Tports and the Loader/Verbose 'callback C17E' messages persist. And TelNet works with this list info:
list
usb:0/140000/0/8/1 \\?\hid#vid_16c0&pid_0486&mi_01#9&33df2e22&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} (Teensy 3.6) RawHID
usb:0/140000/0/8/2 COM11 (Teensy LC) Serial

Orange IDE #1 T_3.6 FAIL text:
Error opening HID device
Windows Error Info: The process cannot access the file because it is being used by another process.
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
** Perhaps RAW_HID acts this way?

Opened IDE #2 to T_LC: selected port - set USB=Serial as before was Serial, did similar open and close of Tsermon:
Orange IDE #2 FAIL text:
Unable to open COM11 for reboot request
Windows Error Info: Access is denied.
more ideas... https://forum.pjrc.com/threads/40632?p=126667&viewfull=1#post126667
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.
** Don't think there was any reason for this except the 'OFFLINE' command is sent as compile starts - and opening port after that allows Tsermon to consume the port.

<EDIT> - this was following both above failures <EDIT>
As before the TLoader 'sketch info': "T3BaseBlink.ino.hex, 1% used" - suggested it was ready to upload T_3.6 - but button push on T_LC worked - then the text was changed to : "T3BaseBlink.ino.hex, 13% used"

IDE #1 'Upload' to T_3.6 as RAW_HID worked at this time with no error or Button.

From Above fails: View attachment b7_UploadFail_log.txt
Log for Upload Works: View attachment b7_UploadsWork_log.txt

After that did another Upload to each in turn worked with no button or error. T_3.6 still RAW_HID and it is working, but now going '[Offline]' during compile/upload where above it stayed active - preventing actual TLoader's upload as noted with initial error text above.

Again - confirming - Only ONE Tports and ONE EACH Tsermon between the two open IDE's. And on Closing both IDE's there are no Orphaned Processes.

<edit>: reopened T_LC - upload good, open IDE #2 T_3.6 was RAW_HID - Upload as Serial - Good.
 
Last edited:
Orange IDE #1 T_3.6 FAIL text:

Error opening HID device
Windows Error Info: The process cannot access the file because it is being used by another process.
Teensy did not respond to a USB-based request to enter program mode.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.

** Perhaps RAW_HID acts this way?

This is indeed correct behavior for HID. Likewise for Serial.

When you click Upload, Arduino automatically closes the serial monitor. If you open it again while Arduino is still compiling, then you can expect uploading to fail with "Error opening HID device". Arduino's uploading process (actually teensy_reboot) can't open the HID device to send the reboot request, because you opened the serial monitor again.

In an ideal world, this message ought to be smarter. Someday I would love to find a way to get info about which process actually has the device already opened. With quite a bit of work inside Arduino, this case could probably be detected since we can know the serial monitor was opened again, but it would require a path from the serial monitor state to the upload which calls teensy_reboot (which is a native program not having access to the Java environment) so it's not simple to put this into the Arduino system.
 
Last edited:
As before the TLoader 'sketch info': "T3BaseBlink.ino.hex, 1% used" - suggested it was ready to upload T_3.6 - but button push on T_LC worked - then the text was changed to : "T3BaseBlink.ino.hex, 13% used"

This is known cosmetic issue that won't be fixed for 1.42.

Computing the % used is done based on the last Teensy you programmed. Actually, the size is from the last board Teensy Loader recognized, regardless of whether it was programmed. When not in Auto mode, it's possible to detect a board but not program it.

In a future version I'll avoid showing "% used" until Teensy Loader actually sees the hardware.
 
All good. Started IDE #1 - will open IDE #2 'in some time' and confirm all is well.

Waited - Beta 7 all running well for typical expected use of two Teensy's with two IDE instances under Windows 10.

Only forced/confused anomalies are cosmetic and worked out through normal user interface. No hidden processes created as used.
 
Last edited:
Anyone else had a chance to try 1.42-beta7?

Unless anyone finds more bugs (or I turn any up in the next day or two), this is very likely to become the final 1.42. Now's the last chance to tell me about anything you want to see fixed before the final 1.42 release.
 
Paul: A few Audio changes early on - and the added Teensy Ports and Sermon features - was much else touched needing tested? { T_3.5 got more RAM, USB ID informs of Teensy Type without connecting }

I had 4 T's online yesterday - 2 IDE's - got Ports and uploads to 3 LC/3.6/3.5 then ignored the 2nd 3.6 :: All Good running and closed.

Just opened 4 IDE's connected to each then Upload and Tsermon worked and all closed with no orphans.

Swapped my SSD yesterday - much faster building finally - just hope it works through 5 yr warranty. Funny a 256GB drive for same $76 as 256 micro SD flash.

Installed and did a simple verify on second Win 10 machine!

I just tried to Verify this :: ...\hardware\teensy\avr\libraries\Audio\examples\Tutorial\Part_3_02_Fourier_Transform
And got this:
Using library Bounce in folder: T:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce (legacy)
'AudioMemory' was not declared in this scope

[ similar for : ...\hardware\teensy\avr\libraries\Audio\examples\Tutorial\Part_2_07_Filters ]:
Code:
T:\arduino_1.8.5_142b4\arduino-builder -dump-prefs -logger=machine -hardware T:\arduino_1.8.5_142b4\hardware -hardware t:\tcode\hardware -tools T:\arduino_1.8.5_142b4\tools-builder -tools T:\arduino_1.8.5_142b4\hardware\tools\avr -built-in-libraries T:\arduino_1.8.5_142b4\libraries -libraries t:\tcode\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180,opt=o2std,keys=en-us -ide-version=10805 -build-path T:\TEMP\arduino_build_109326 -warnings=none -build-cache T:\TEMP\arduino_cache_536319 -verbose T:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Audio\examples\Tutorial\Part_3_02_Fourier_Transform\Part_3_02_Fourier_Transform.ino
T:\arduino_1.8.5_142b4\arduino-builder -compile -logger=machine -hardware T:\arduino_1.8.5_142b4\hardware -hardware t:\tcode\hardware -tools T:\arduino_1.8.5_142b4\tools-builder -tools T:\arduino_1.8.5_142b4\hardware\tools\avr -built-in-libraries T:\arduino_1.8.5_142b4\libraries -libraries t:\tcode\libraries -fqbn=teensy:avr:teensy36:usb=serial,speed=180,opt=o2std,keys=en-us -ide-version=10805 -build-path T:\TEMP\arduino_build_109326 -warnings=none -build-cache T:\TEMP\arduino_cache_536319 -verbose T:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Audio\examples\Tutorial\Part_3_02_Fourier_Transform\Part_3_02_Fourier_Transform.ino
Using board 'teensy36' from platform in folder: T:\arduino_1.8.5_142b4\hardware\teensy\avr
Using core 'teensy3' from platform in folder: T:\arduino_1.8.5_142b4\hardware\teensy\avr
Detecting libraries used...
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\cores\teensy3" "T:\TEMP\arduino_build_109326\sketch\Part_3_02_Fourier_Transform.ino.cpp" -o "nul"
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\cores\teensy3" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce" "T:\TEMP\arduino_build_109326\sketch\Part_3_02_Fourier_Transform.ino.cpp" -o "nul"
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\cores\teensy3" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce" "T:\TEMP\arduino_build_109326\sketch\AudioSampleGuitar.cpp" -o "nul"
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\cores\teensy3" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce" "T:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce\Bounce.cpp" -o "nul"
Generating function prototypes...
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w  -g -Wall -ffunction-sections -fdata-sections -nostdlib -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\cores\teensy3" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce" "T:\TEMP\arduino_build_109326\sketch\Part_3_02_Fourier_Transform.ino.cpp" -o "T:\TEMP\arduino_build_109326\preproc\ctags_target_for_gcc_minus_e.cpp"
"T:\arduino_1.8.5_142b4\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "T:\TEMP\arduino_build_109326\preproc\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/precompile_helper" "T:\arduino_1.8.5_142b4\hardware\teensy\avr/cores/teensy3" "T:\TEMP\arduino_build_109326" "T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr/cores/teensy3" "T:\TEMP\arduino_build_109326/pch/Arduino.h" -o "T:\TEMP\arduino_build_109326/pch/Arduino.h.gch"
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\TEMP\arduino_build_109326/pch" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\cores\teensy3" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce" "T:\TEMP\arduino_build_109326\sketch\AudioSampleGuitar.cpp" -o "T:\TEMP\arduino_build_109326\sketch\AudioSampleGuitar.cpp.o"
"T:\arduino_1.8.5_142b4\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++14 -Wno-error=narrowing -fno-rtti -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -D__MK66FX1M0__ -DTEENSYDUINO=142 -DARDUINO=10805 -DF_CPU=180000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\TEMP\arduino_build_109326/pch" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\cores\teensy3" "-IT:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce" "T:\TEMP\arduino_build_109326\sketch\Part_3_02_Fourier_Transform.ino.cpp" -o "T:\TEMP\arduino_build_109326\sketch\Part_3_02_Fourier_Transform.ino.cpp.o"
Part_3_02_Fourier_Transform: In function 'void setup()':
Part_3_02_Fourier_Transform:40: error: 'AudioMemory' was not declared in this scope
   AudioMemory(10);

                 ^

Part_3_02_Fourier_Transform:41: error: 'sgtl5000_1' was not declared in this scope
   sgtl5000_1.enable();

   ^

Part_3_02_Fourier_Transform:43: error: 'SPI' was not declared in this scope
   SPI.setMOSI(SDCARD_MOSI_PIN);

   ^

Part_3_02_Fourier_Transform:45: error: 'SD' was not declared in this scope
   if (!(SD.begin(SDCARD_CS_PIN))) {

         ^

Part_3_02_Fourier_Transform:54: error: 'mixer1' was not declared in this scope
   mixer1.gain(0, 0.5);

   ^

Part_3_02_Fourier_Transform:63: error: 'playSdWav1' was not declared in this scope
   playSdWav1.play("SDTEST1.WAV");

   ^

Part_3_02_Fourier_Transform: In function 'void loop()':
Part_3_02_Fourier_Transform:94: error: 'fft1024_1' was not declared in this scope
   if (fft1024_1.available()) {

       ^

Part_3_02_Fourier_Transform:110: error: 'mixer1' was not declared in this scope
     mixer1.gain(2, 0.0);

     ^

Part_3_02_Fourier_Transform:114: error: 'playMem1' was not declared in this scope
     playMem1.stop();

     ^

Part_3_02_Fourier_Transform:115: error: 'playSdWav1' was not declared in this scope
     playSdWav1.play(filenames[fileNumber]);

     ^

Part_3_02_Fourier_Transform:122: error: 'mixer1' was not declared in this scope
     mixer1.gain(0, 0.0);

     ^

Part_3_02_Fourier_Transform:125: error: 'playSdWav1' was not declared in this scope
     playSdWav1.stop();

     ^

Part_3_02_Fourier_Transform:126: error: 'playMem1' was not declared in this scope
     playMem1.play(AudioSampleGuitar);

     ^

Part_3_02_Fourier_Transform:132: error: 'mixer1' was not declared in this scope
     mixer1.gain(0, 0.0);

     ^

Part_3_02_Fourier_Transform:135: error: 'playSdWav1' was not declared in this scope
     playSdWav1.stop();

     ^

Part_3_02_Fourier_Transform:136: error: 'playMem1' was not declared in this scope
     playMem1.stop();

     ^

Part_3_02_Fourier_Transform:137: error: 'waveform1' was not declared in this scope
     waveform1.begin(1.0, noteFrequency[noteNumber], WAVEFORM_SINE);

     ^

Part_3_02_Fourier_Transform:137: error: 'WAVEFORM_SINE' was not declared in this scope
     waveform1.begin(1.0, noteFrequency[noteNumber], WAVEFORM_SINE);

                                                     ^

Part_3_02_Fourier_Transform:143: error: 'waveform1' was not declared in this scope
     waveform1.amplitude(0);

     ^

Using library Bounce in folder: T:\arduino_1.8.5_142b4\hardware\teensy\avr\libraries\Bounce (legacy)
'AudioMemory' was not declared in this scope

<edit> : this is Beta 7 - I just stopped renaming the 'arduino_1.8.5_142b4' at beta 4
Verify build of this worked: ...\hardware\teensy\avr\libraries\Audio\examples\Effects\Chorus
 
Hi Paul, not sure if you saw my post here with debug data on the Win enumeration issue.

Also, maybe I am wrong but I think that in usb_dec.h, there seem to be two redundant endpoint definitions 7 and 8 for USB type USB_EVERYTHING.
 
Those tutorial examples aren't meant to compile "out of the box" They go with the tutorial PDF...

I just tried to Verify this :: ...\hardware\teensy\avr\libraries\Audio\examples\Tutorial\Part_3_02_Fourier_Transform
And got this:
Part_3_02_Fourier_Transform: In function 'void setup()':
Part_3_02_Fourier_Transform:40: error: 'AudioMemory' was not declared in this scope

Did you draw the diagram has shown in the tutorial PDF, export it from the design tool, then copy it where the code has this?

Code:
///////////////////////////////////
// copy the Design Tool code here
///////////////////////////////////

The errors you got are exactly what happens if you skip this step.
 
I have only tried it for a few builds. So far no problem.

Any word on Arduino 1.8.6?
 
Any word on Arduino 1.8.6?

Just a false alarm on my part. Over the last couple years, whenever they pulled in translations (they use a 3rd party service to solicit & collect translations of all the strings from English to the many other languages) it meant a release was only days away. When I saw Cristian do this and make a dozen or so other minor commits a couple weeks ago, I mistakenly concluded 1.8.6 was likely to come within days. I was wrong.

Unless things change, I'm going to wrap up 1.42 this week. It's time.

I still want to investigate the Linux terminal line discipline issue, and do a fresh round of testing here on 3 platforms. But no major changes expected, unless more bugs turn up.

If Arduino does happen to release 1.8.6 soon, then I guess we'll have a 1.43 release where the only new feature is support for Arduino 1.8.6.
 
Those tutorial examples aren't meant to compile "out of the box" They go with the tutorial PDF...
...
Code:
///////////////////////////////////
// copy the Design Tool code here
///////////////////////////////////

The errors you got are exactly what happens if you skip this step.

False alarm on my part … wanted to see how long a compile took and see something from Audio work - I went back to those not taking that into account as I was about to sign off.
 
Status
Not open for further replies.
Back
Top