Teensyduino 1.54 Beta #10

Status
Not open for further replies.

Paul

Administrator
Staff member
Here is a tenth beta test for Teensyduino 1.54.

Digital signatures have changed on Windows. Edge/IE might show a dire warning.
Please click the site is safe button.

Install into a clean copy of Arduino if you previously installed beta3 or beta4.


Linux 32 bit:
https://www.pjrc.com/teensy/td_154-beta10/TeensyduinoInstall.linux32

Linux 64 bit:
https://www.pjrc.com/teensy/td_154-beta10/TeensyduinoInstall.linux64

Linux ARM:
https://www.pjrc.com/teensy/td_154-beta10/TeensyduinoInstall.linuxarm

Linux ARM64:
https://www.pjrc.com/teensy/td_154-beta10/TeensyduinoInstall.linuxaarch64

MacOS 10.10 to 11.4:
https://www.pjrc.com/teensy/td_154-beta10/Teensyduino_MacOS_Catalina.zip

MacOS 10.8 to 10.14:
https://www.pjrc.com/teensy/td_154-beta10/TeensyduinoInstall.dmg

Windows:
https://www.pjrc.com/teensy/td_154-beta10/TeensyduinoInstall.exe


Changes since Teensyduino 1.54-beta9:

Fix startup bug on Teensy 4
Fix emulated EEPROM corruption bug on Teensy LC
Fix typo in Audio TDM input documentation
Update FlexIO_t4 (from KurtE)
LittleFS persist ramdisk (Defragster)
 
Installed td 1.54 b10 on Win 10 over IDE 1.8.15 - Install good and no problems w/LittleFS LFSIntegrity onto T_4.0.

Ramdisk note - Primary RAM / RAM1 is always zeroed on any restart to won't persist.
Does work with DMAMEM / RAM2 : using LFSIntegrity {DMAMEM char buf[490000];} found an anomaly filling half of disk with a 'B'igfile then 'R'estart and 'b'igfile delete does a forever delete. using 256 byte blocks for file of size 223232 leaves something about the long file chain file unwritten. Will add .flush to see if it triggers safe use. Other I/O after 'B' is safe so not a lfs problem. Will move to T_4.1 PSRAM and try similar.
>> .flush() didn't fix ?
 
Installed 1.54b10 over the top of 1.54b9 on Win10 Pro x64. No problems, but I haven't tried anything exotic.

Pete
 
Ok - installed 1.54b10 over 154b9 on Win10 home x64 with no issues. This time I didn;t even get the windows block install screen :)

defragster said:
Ramdisk note - Primary RAM / RAM1 is always zeroed on any restart to won't persist.
Does work with DMAMEM / RAM2 : using LFSIntegrity {DMAMEM char buf[490000];} found an anomaly filling half of disk with a 'B'igfile then 'R'estart and 'b'igfile delete does a forever delete. using 256 byte blocks for file of size 223232 leaves something about the long file chain file unwritten. Will add .flush to see if it triggers safe use. Other I/O after 'B' is safe so not a lfs problem. Will move to T_4.1 PSRAM and try similar.

Tried to duplicate on a T4.0 and can't seem to duplicate the issue. Filled T4 more than half way, did a restart, then did the 'b' to delete and deleted without an issue.

More testing on LittleFS issues in post starting at: https://forum.pjrc.com/threads/58033-LittleFS-port-to-Teensy-SPIFlash?p=281594&viewfull=1#post281594 and following.
 
Likewise I installed over B9 on 1.8.15 Windows 10 64 bit... No problems. And Yeah I did not get the windows block message. Hopefully that will be true for others who have not installed some of these betas as well.

I have not tried the littlefs stuff, but have tried out a few usb host programs, with the Glorious Model O mouse. and the two programs still work... (Have not tried to debug yet on how to get this up to 1000fps yet)

Will play with some other stuff, will try littleFS later if it looks like there is something to help to try to debug
 
UPDATE LittleFS working properly :: Did wipe of IDE 1.8.15 folder and fresh unZIP and TD 1.54b10 install and LittleFS is fine DMAMEM/RAM2 for RAM_DISK

Not sure what caused the build error - but clean installs and all is well for T_4.0 and T_4.1 as tested for Persistent RamDisk on Warm Restart.

ALSO: On Win10 download of Beta 10 I did not get a System warning 'BLOCKED' on the TeensyInstall.exe download, meant to add that to post #2.
 
I get this warning:
Code:
C:\Arduino\hardware\teensy\avr\libraries\SdFat\src\ExFatLib\ExFatPartition.cpp: In member function 'bool ExFatPartition::freeChain(uint32_t)':
C:\Arduino\hardware\teensy\avr\libraries\SdFat\src\ExFatLib\ExFatPartition.cpp:225:5: warning: 'next' may be used uninitialized in this function [-Wmaybe-uninitialized]
  225 |     if ((cluster + 1) != next || status == 0) {
      |     ^~
 
Weird:

I'm using Pauls Teensy4 + CS42448 board he sent me some time aqo for testing. No other Hardware, only well known, good active speakers.
F_CPU 150MHz.
I was listeing radio through my PC, using the board as external USB-Dac in this case (want to test something, later).

Suddenly, without touching, without uploading something, just listening (in fact I was some meters away) it stopped working.
USB seemed dead. Button worked, and the red LED was switched on after pressing it - but Teensy could not be found by the PC. USBView showed a corrupted descriptor.

Disconnected, waited 10 minutes. Tried again. Nothing. Pressed button. Now, I was able to reflash, and it works again.


What was this?
 
Code:
Unable to open COM16 for reboot request
  Windows Error Info: Zugriff verweigert
  more ideas... https://forum.pjrc.com/threads/40632?p=126667&viewfull=1#post126667
Previously selected Teensy port is offline.
  [COLOR=#ff0000]2[/COLOR] other Teensy boards found.  Please select
  a Teensy from the Tools > Ports menu.
Unable to open COM16
The message is not correct. There is only one other Teensy connected (via usb Audio)
2021-06-24 09_25_02-sketch_jun23a _ Arduino 1.8.14.png
 
AudioProcessorUsage() has dropped from a correct .52 to .02.

Continuous overruns (usb_audio_overrun_count) with pulseaudio/linux until I fix usb_audio.cpp with:

Code:
if (f) {
                int diff = AUDIO_BLOCK_SAMPLES/2 - (int)c;

                if (diff > 0)
                        feedback_accumulator = 45.0 * (1<<24);       // faster
                else 
                        feedback_accumulator = 44.0 * (1<<24);       // slower

                //feedback_accumulator += diff * 1;
 
@jonr: What Teensy model?
And is it AudioInputUSB or AudioOutputUsb?

@Paul: There is an open PR re: Muting Audio Usb
 
I'm using teensy 4 with AudioInputUSB.

Of minor interest, I also tried gcc 10 with -fanalyzer. Everything I compiled except SDfat was warning free.
 
Following warning
Code:
Using board 'teensy35' from platform in folder: C:\Users\zimmer\Documents\arduino-1.8.15\hardware\teensy\avr
Using core 'teensy3' from platform in folder: C:\Users\zimmer\Documents\arduino-1.8.15\hardware\teensy\avr
[COLOR="#FF0000"]Warning: Board teensy:avr:teensy32 doesn't define a 'build.board' preference. Auto-set to: AVR_TEENSY32[/COLOR]
Detecting libraries used...
Seems there is something missing
 
@Paul:
We should update the USB Waveplayer example. It uses AudioOutputAnalog.. not a good choice for T4.

Or, we should provide a clock source for USB. Should be doable on T4.
I could add a dummy I2S Clock, if you want. But I need a reaction here. I'm not going to work on this without knowing wether it gets merged or not.

Reminder: Teensy LC: Waveplayer needs an update.
 
Last edited:
Or, we should provide a clock source for USB. Should be doable on T4.
I did once a audio object that was acting like a input/output object (was based on a timer similar to adc) only to handle updates.
i.e. a dedicated clock module could be an option
 
Following warning
Code:
Using board 'teensy35' from platform in folder: C:\Users\zimmer\Documents\arduino-1.8.15\hardware\teensy\avr
Using core 'teensy3' from platform in folder: C:\Users\zimmer\Documents\arduino-1.8.15\hardware\teensy\avr
[COLOR="#FF0000"]Warning: Board teensy:avr:teensy32 doesn't define a 'build.board' preference. Auto-set to: AVR_TEENSY32[/COLOR]
Detecting libraries used...
Seems there is something missing

Just looked in the boards.txt file for the teensy and it looks like its there.
Code:
teensy31.build.board=TEENSY32
So not sure why its not picking it up. Also I am not seeing that error when I compile for T3.5. I am using the latest Core
 
Just looked in the boards.txt file for the teensy and it looks like its there.
Code:
teensy31.build.board=TEENSY32
So not sure why its not picking it up. Also I am not seeing that error when I compile for T3.5. I am using the latest Core

I see the warning for all teensies T32,T35,T36,T40,T41 (A1.8.15; TD154b10; Win10)
by adding

Code:
teensy32.build.board=TEENSY32
Warning disappears
 
I see the warning for all teensies T32,T35,T36,T40,T41 (A1.8.15; TD154b10; Win10)
by adding

Code:
teensy32.build.board=TEENSY32
Warning disappears

Hmm - thats strange. I am using IDE 1.54 but with the latest core (as of yesterday for all the new fault handling) but I am not seeing any warnings. But to be honest I never saw that warning before today? I attaching my boards.txt file that got installed as part of 1.54.b10 install - can you give that a try. Trying to figure out if we have different boards files?

View attachment boards.txt
 
@WMXZ and @mjs513 - I have not seen this warning. I am running 1.8.15 TD latest plus update cores...
Code:
C:\arduino-1.8.15\arduino-builder -dump-prefs -logger=machine -hardware C:\arduino-1.8.15\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools C:\arduino-1.8.15\tools-builder -tools C:\arduino-1.8.15\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries C:\arduino-1.8.15\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=en-us -ide-version=10815 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_293461 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_958442 -verbose C:\arduino-1.8.15\examples\01.Basics\Blink\Blink.ino
C:\arduino-1.8.15\arduino-builder -compile -logger=machine -hardware C:\arduino-1.8.15\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools C:\arduino-1.8.15\tools-builder -tools C:\arduino-1.8.15\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries C:\arduino-1.8.15\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=en-us -ide-version=10815 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_293461 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_958442 -verbose C:\arduino-1.8.15\examples\01.Basics\Blink\Blink.ino
Using board 'teensy31' from platform in folder: C:\arduino-1.8.15\hardware\teensy\avr
Using core 'teensy3' from platform in folder: C:\arduino-1.8.15\hardware\teensy\avr
Detecting libraries used...
Wonder if you are running a modified boards.txt to support MTP with Serial? and/or using boards.local.txt?
 
@WMXZ and @mjs513 - I have not seen this warning. I am running 1.8.15 TD latest plus update cores...
Code:
C:\arduino-1.8.15\arduino-builder -dump-prefs -logger=machine -hardware C:\arduino-1.8.15\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools C:\arduino-1.8.15\tools-builder -tools C:\arduino-1.8.15\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries C:\arduino-1.8.15\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=en-us -ide-version=10815 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_293461 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_958442 -verbose C:\arduino-1.8.15\examples\01.Basics\Blink\Blink.ino
C:\arduino-1.8.15\arduino-builder -compile -logger=machine -hardware C:\arduino-1.8.15\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools C:\arduino-1.8.15\tools-builder -tools C:\arduino-1.8.15\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries C:\arduino-1.8.15\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=en-us -ide-version=10815 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_293461 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_958442 -verbose C:\arduino-1.8.15\examples\01.Basics\Blink\Blink.ino
Using board 'teensy31' from platform in folder: C:\arduino-1.8.15\hardware\teensy\avr
Using core 'teensy3' from platform in folder: C:\arduino-1.8.15\hardware\teensy\avr
Detecting libraries used...
Wonder if you are running a modified boards.txt to support MTP with Serial? and/or using boards.local.txt?

I run boards with MTP serial text before T4.1
will later try without modifications
something like
Code:
menu.usb=USB Type
menu.speed=CPU Speed
menu.opt=Optimize
menu.keys=Keyboard Layout


teensy41.menu.usb.mtpserial=MTP Disk Serial (Experimental)
teensy41.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL

teensy40.menu.usb.mtpserial=MTP Disk Serial (Experimental)
teensy40.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL

teensy36.menu.usb.mtpserial=MTP Disk SERIAL (Experimental)
teensy36.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL

teensy35.menu.usb.mtpserial=MTP Disk SERIAL (Experimental)
teensy35.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL

teensy41.name=Teensy 4.1
 
@Paul:
We should update the USB Waveplayer example. It uses AudioOutputAnalog.. not a good choice for T4.

Or, we should provide a clock source for USB. Should be doable on T4.
I could add a dummy I2S Clock, if you want. But I need a reaction here. I'm not going to work on this without knowing wether it gets merged or not.

Reminder: Teensy LC: Waveplayer needs an update.
It would be nice if all of the audio examples that access either the flash memory or the SD card had #ifdef's so the correct SPI pins are selected on the Teensy 4.0/4.1 compared to the Teensy 3.2/3.5/3.6. Even if they didn't have #ifdef's, add comments about the Teensy 4.0/4.1 defaults. It gets depressing to answer the same old question about using the examples time and time again.
 
I run boards with MTP serial text before T4.1
will later try without modifications

Found it:
I used
Code:
teensy32.menu.usb.mtpserial=MTP Disk SERIAL (Experimental)
teensy32.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
and not
Code:
teensy31.menu.usb.mtpserial=MTP Disk SERIAL (Experimental)
teensy31.menu.usb.mtpserial.build.usbtype=USB_MTPDISK_SERIAL
so Arduino was looking for teensy32, but in boards.txt there is only teensy31
will update githup
 
AudioProcessorUsage() has dropped from a correct .52 to .02.

Continuous overruns (usb_audio_overrun_count) with pulseaudio/linux until I fix usb_audio.cpp with:

Code:
if (f) {
                int diff = AUDIO_BLOCK_SAMPLES/2 - (int)c;

                if (diff > 0)
                        feedback_accumulator = 45.0 * (1<<24);       // faster
                else 
                        feedback_accumulator = 44.0 * (1<<24);       // slower

                //feedback_accumulator += diff * 1;

jonr,
i printed the overuns on with my win10 pc.
there are a few on start, but that's all.

unfortunately, i can't test with a linux box.
 
I understand, this one is going to be difficult to duplicate. But think about the control logic - there is no reason to keep adding more and more to the feedback_accumulator and then slowly decrease it. Why "diff * 1" for a bin point 24 number? And note that sometimes the PC saves power by sending no audio - the feedback_accumulator shouldn't increase to absurd values that take a long time to come down to a reasonable value (see "+= 3500" code).

On the other hand, such a change would need testing on all platforms....
 
Status
Not open for further replies.
Back
Top