Teensyduino 1.54 Beta #6

Status
Not open for further replies.

Paul

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

Install into a clean copy of Arduino if you previously installed beta3 or beta4.
SdFat-beta was renamed to SdFat. You may end up with conflicting duplicates if
installing over the top of beta3 or beta4.



Edit: Links removed. Please use 1.54-beta9
https://forum.pjrc.com/threads/67252-Teensyduino-1-54-Beta-9


Changes since Teensyduino 1.54-beta5:

Fix multiple def with EEPROM put() & get()
Update FlexCAN_t4
Update NativeEthernet
Update RadioHead
Update ST7735_t3
Update SdFat to 2.0.5.beta1
Wire lib Scanner example updated
Audio waveform synth add bandwidth limited waveforms (Mark Tillotson)
Fix audio design tool conflict with DAC & PWM outputs (manicken)
Fix audio compile errors with Teensy LC (Frank B)
Add I2S output for Teensy LC (Frank B)
Add PT8211 output for Teensy LC (Frank B)
Add support for SGTL5000 in I2S master mode
Fix bug in SGTL5000 BiQaud filter calculation (Graham Whaley)
Fix minor bug in S/PDIF resampling (alex6679)
Add Play/Pause function to WAV player (standarddeviant)
Fix waveform synth discontinuities in phase modulation (Mark Tillotson)
Fix buzzing noise in FreeVerb due to numerical truncation (matt venn)
SGTL5000 support for switching headphones to input signal (Jurgen Beliën)
Add JavaScript version of wav2sketch (Matt Bradshaw)
Add LittleFS NAND & FRAM support (MJS513)
Add LittleFS LFSintegrity test program (Defragster)
Add OctoWS2811 RGBW LED support
Add OctoWS2811 VideoDisplay example for Teensy 4.x
USBHost_t36 add MassStorageDriver work-in-progress (wwatson)
USBHost_t36 Serial driver support for Teensy seremu (KurtE)
Update WS2812Serial for extra Teensy 4.1 pins
Improve serial emulation for non-serial USB types
 
Apparently my Windows code signing cert expires in 2 days! If you use Windows, please let me know if you see any warnings or security notices?

Lately I've been lagging pretty badly on the software wide, with updates to the web pages, releasing the T4 bootloader chip, and work with 1170 (which I'm sad to say is currently stalled on JTAG issues). So this beta6 installer is meant to roll up the *many* changes since November.

My plan is to spend the next several days on software, mostly focused on MTP and USB host MSC. I also plan to improve T4 audio ADC input - if not perfect, I want it to be more usable by the 1.54 release. If there's other stuff I should look into, now's the time to mention it. ;)
 
Just installed TD 1.54_beta6 over 1.54_beta5 and installed no errors or warnings on a Windows 10 Home x64. Now on to the fun stuff.

Mike

PS. Good timing on getting B6 out before the cert expired :)
 
LFSIntegrity Updated

TD 1.54 b6 installed fine here on Win 10!

No problem with a few sketch uploads.

Tested this to work (and posted extended code):: Problem-reading-from-SD-card-directly-into-PSRAM

As for LFSintegrity.ino - it has a BUILD BREAK when using RAM disk - the added speedBench() code reused a simple var buf[] for alignment - renamed to bufA32[].
Code:
[ATTACH]23617._xfImport[/ATTACH]
Also done was some cleanup for any intrepid users - though still geeky code for function:
> Beta 6 code includes myfs.formatUnused not in Beta 5 : removed the 'RELEASE' notes etc
--> testing on QSPI NOR is 5X faster when media is formatted before use
> When 'a' autoformat enabled - added printf to show it is working
> made the clock_isr() code that shows how many yield calls from LFS code off by default - with yet another #ifdef
 
TeensyDuino 1.54 in Beta since October 2020 has added and addressed quite a few things. Here are the notes Paul left in each of those beta releases for reference to date.

Paul: Not noted::
> "KurtE/T3X_SerialX_AddMemory" :: 20 Nov 2020
> "Add smalloc from https://github.com/electrorys/smalloc" :: 25 Oct 2020
Code:
// Only these functions (defined in wiring.h) are intended to be
// used from Arduino sketches and libraries.
//
//   void *extmem_malloc(size_t size);
//   void extmem_free(void *ptr);
//   void *extmem_calloc(size_t nmemb, size_t size);
//   void *extmem_realloc(void *ptr, size_t size);

If any of these changes get used and show issues - please post:
Code:
[U]Changes since Teensyduino 1.54-beta5:  {2/6/2021} Beta 6[/U]
 >> see post#1

[U]Changes since Teensyduino 1.54-beta4:  {11/9/2020 } Beta 5[/U]

File & FS classes improved - many changes!
Add LittleFS library - lots of new stuff here...
FS open() supports FILE_WRITE_BEGIN mode
SdFat-beta renamed to SdFat
Add delayNanoseconds() on Teensy 2.0, LC, 3.x
Print class support for 64 bit integers
DMAChannel attachInterrupt(isr, priority) (WMXZ)
Update NativeEthernet
SD listfiles example improved
Fix Audio PT8211 issue on Teensy 4.x
Improve Audio simultaneous WAV playing
Fix USB issue for MTP to run at 600 MHz
Fix double space on copy from serial monitor on Windows
Configurable MIDIx16 port names (vjmuzik)
Support for no USB (vjmuzik)

Known / Suspected bugs:

Selecting text in serial monitor gives visually wrong results
NativeEthernet WebClient example may hang


[U]Changes since Teensyduino 1.54-beta3:  {11/4} Beta 4[/U]

Update NativeEthernet
Audio: Improve simultaneous WAV playing & add SimultaneousPlay test
SD default to 16 MHz SPI clock
Serial Monitor fix double spaced lines copied to clipboard
Serial Monitor avoid auto horizontal scroll on very long lines
Serial Monitor fix memory leak on MacOS

[U]Changes since Teensyduino 1.54-beta2:  {11/1} Beta 3[/U]

Add File base class and FS.h header
Add SdFat-beta library
Replace SD library with wrapper which uses SdFat
SoftwareSerial improvements on Teensy 3.5, 3.6, 4.1

[U]Changes since Teensyduino 1.54-beta1: {10/23} Beta 2[/U]

Fix 1.54-beta1 startup problem on Teensy 4.1
EEPROM put/get handle String and warn for incompatible classes (luni64)
Add _extram_start & _extram_end for Teensy 4.1
Update Bounce2


[U]Changes since Teensyduino 1.53: {10/22} Beta 1[/U]

Support for MicroMod
Fix SPI with DAM to cached memory on Teensy 4.x
Support alternate Wire3 pins on Teensy 4.1
Improve map() function
Show Serial.printf format warnings
Fixes for HAB secure boot
Update imxrt.h comments for RT1060 Reference Manual, Rev 2
AsyncAudioInputSPDIF3 bugs fixed
synth_tonesweep update?
NativeEthernet & FNET update
ILI9341_t3
QuadEncoder
RadioHead
ST7735_t3
USBHost_t36
XPT2046_Touchscreen
Wait up to 6.2 seconds for Teensy to reboot (was 5 seconds)


[U]What was changed in TD 1.53 release: { 7/1/2020 }[/U]
The full list of changes since Teensyduino 1.52:

Support for Arduino 1.8.13
Reduce EventResponder and yield() overhead (KurtE)
Audio design tool checks I/O compatibility (thanks to Frank's JavaScript work)
Update audio design tool documentation
Speed up ILI9341_t3 and add setClock (Larry Bank)
USBHost_t36 add Keyboard attachRawPress & attachRawRelease (David "plugz")
Fix DmxSimple on Teensy 4.0 (Adam Demuri)
add pgmspace.h (not avr folder) compatability for Teensy 4.0
minor updates to SD and Wire examples
Improve C++ STL support
Fix compiler warnings in several library examples
Update libraries: FastLED, MIDI, RA8875, Adafruit_NeoPixel, FlexCAN, FlexCAN_T4, ILI9488_t3
Entropy library support for Teensy 4.x random number hardware
ILI9341_t3 proportional font rendering speedup (Larry Bank)
Audio: add rectifier effect and vocoder example by Bradley Sanders
Fix serialEventUSB1 & serialEventUSB2 on Teensy 4.x (KurtE)
Add MIDIUSB.h compatibility on Teensy 4.x
Check hardware serial FIFO in avalable and peek (KurtE)
Remove libraries: Adafruit_GFX, Adafruit_CC3000, Adafruit_RA8875, openGLCD, ST7565
Add SPI.end() on Teensy 4.x (KurtE)
Fix PT8211 output on Teensy 4.x
Fix USB BDT clear at startup on Teensy 3.x (Memotech-Bill)
Add digitalToggle(pin)
Fix numerical overflow in Audio CPU usage on Teensy 4.x
Remane addStorage to addMemory
Add Teensy 3.5/3.6 hardware random to Entropy (Manitou)
Fix ILI9341_r4 readcommand() & add readScanLine() on Teensy 4.x
Installer will delete old/stale libraries
Linux installer checks udev rules
Libraries updated: ADC, ILI9488_t3, RA8875
Fix audio library on Teensy LC
Fix ST7735_t3 spitftbitmap example (KurtE)
 
Last edited:
There was work on Memory Used display :: malloc-free-for-EXTMEM-and-DTCM

Current code as :: github.com/FrankBoesing/imxrt-size

Change needed to build platform.txt:
Code:
recipe.hooks.postbuild.4.pattern.windows=cmd /c "{runtime.hardware.path}\..\tools\arm\bin\arm-none-eabi-gcc-nm -n {build.path}\{build.project_name}.elf | {runtime.hardware.path}\..\tools\imxrt-size"
recipe.hooks.postbuild.4.pattern.linux=bash -c "{runtime.hardware.path}/../tools/arm/bin/arm-none-eabi-gcc-nm -n {build.path}/{build.project_name}.elf | {runtime.hardware.path}/../tools/imxrt-size"
recipe.hooks.postbuild.4.pattern.macosx=bash -c "....

Output looks something like :
Code:
RAM1:  7.28% of 512 kB used.
   Code (ITCM):               5.89 kB
   Variables (DTCM):          5.25 kB
   Available for Variables: 474.75 kB

RAM2:  2.36% of 512 kB used.
   Variables (DMAMEM):       12.09 kB
   Available for Heap:      499.91 kB

EXTMEM: 15.16 kB used.

FLASH:  0.22% of 7936 kB used.
   Code and Constants:      17.75 kB

Working for Windows and Linux ... MAC dev needed ...
 
Just by way of a quick update:

1. "Fix multiple def with EEPROM put() & get()" verified. After updating to Beta6 reran the sketch which had the problem and no errors.
2. MTP core changes seem to be working. After updating the core was playing with @KurtE's branch of MTP testing various Flash (NOR and NANDs) with no errors on compile. Teensy and the chips were identified in Windows 10 properly but still some issue on transferring large files from PC to Teensy. See MTP responder thread for gory details.
 
Installed on Win10x64 Home.

All the following compiled and ran on T4.1 without problems (except the ever present warning about using Timelib.h vs Time.h):

OV7670 Camera test with JPG compression and SerialUSB1 image uploads
Uses:
tojpeg Jpeg compression library
Dual Serial USB
OV7670 library
PXP library


Slideshow Test
Uses:
SD library
PXP library
Slideshow library
ILI9341_t3n


Transition Test--PXP textbox transitions for ILI9341
Uses:
Transitions library (Work in progress)
PXP library
ILI9341_t3n

ADC_5CH_Demo (posted yesterday)
Uses:
ADC
SD
 
I was answering a query on the audio library, and I opened up the Part_3_03_TFT_Display example. Unfortunately, this example looks like it has not been updated for the Teensy 4.1 (and even the 3.5/3.6 are only mentioned in commented out code).

It may be helpful to newbies if somebody could go through the audio examples, and make sure the pins listed reflect the current Teensys, preferably with #ifdef's but if not at least with comments.
 
Windows 10 x64 V 20H2
Arduino IDE 1.8.13

GD23ZUTX runs without issues at this moment. SdFat with the SDIO reader of the teensy 4.1 runs very fine, like a well greased motor.


THX again
 

Changes needed to disable the default size tool for specific boards:
(in Boards.txt)
Code:
teensy41.upload.maximum_data_size=
teensy41.upload.maximum_size=


teensy40.upload.maximum_data_size=
teensy40.upload.maximum_size=


teensyMM.upload.maximum_data_size=
teensyMM.upload.maximum_size=
(empty entries)
 
There was work on Memory Used display :: malloc-free-for-EXTMEM-and-DTCM

Current code as :: github.com/FrankBoesing/imxrt-size

Change needed to build platform.txt:
Code:
recipe.hooks.postbuild.4.pattern.windows=cmd /c "{runtime.hardware.path}\..\tools\arm\bin\arm-none-eabi-gcc-nm -n {build.path}\{build.project_name}.elf | {runtime.hardware.path}\..\tools\imxrt-size"
recipe.hooks.postbuild.4.pattern.linux=bash -c "{runtime.hardware.path}/../tools/arm/bin/arm-none-eabi-gcc-nm -n {build.path}/{build.project_name}.elf | {runtime.hardware.path}/../tools/imxrt-size"
recipe.hooks.postbuild.4.pattern.macosx=bash -c "....
I have not played with it, but I wonder if instead of the postbuild hooks, we could instead replace the default size program run. That is currently we do:

From boards.txt:

Code:
teensy41.build.command.size=arm-none-eabi-size

And Platform.txt has:
Code:
## Compute size
recipe.size.pattern="{compiler.path}{build.toolchain}{build.command.size}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.text\.progmem|\.text\.itcm|\.data|\.text\.csf)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.usbdescriptortable|\.dmabuffers|\.usbbuffers|\.data|\.bss|\.noinit|\.text\.itcm|\.text\.itcm\.padding)\s+([0-9]+).*
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
Not sure if the regex stuff would get in the way?
 
I have not played with it, but I wonder if instead of the postbuild hooks, we could instead replace the default size program run. That is currently we do:

From boards.txt:

Code:
teensy41.build.command.size=arm-none-eabi-size

And Platform.txt has:
Code:
## Compute size
recipe.size.pattern="{compiler.path}{build.toolchain}{build.command.size}" -A "{build.path}/{build.project_name}.elf"
recipe.size.regex=^(?:\.text|\.text\.progmem|\.text\.itcm|\.data|\.text\.csf)\s+([0-9]+).*
recipe.size.regex.data=^(?:\.usbdescriptortable|\.dmabuffers|\.usbbuffers|\.data|\.bss|\.noinit|\.text\.itcm|\.text\.itcm\.padding)\s+([0-9]+).*
recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).*
Not sure if the regex stuff would get in the way?

I think, the regex could be ignored.
More important is the elf file. It's not as easy to parse as the symbol file (but doable)
An easier workaround would be to use the new size-tool" for all teensys, and to exchange the path for the elf with a path for the .sym.
 
[FONT=Arial, sans-serif]Beta6 installed over Beta 5 with no problems on my Windows 10 x64.

[/FONT]

[FONT=Arial, sans-serif]Probablytoo late in the day, but as a T4.1 user my wish list would be:

[/FONT]


  1. [FONT=Arial, sans-serif]Could FreqCount() have a way to clear the pipeline and initiate a measurement immediately. (I need to check when a hopping frequency settles and immediately make a measurement using a longer gate time, then quickly revert to hop detection.)[/FONT]
  2. [FONT=Arial, sans-serif]It would be great if T4.1 could measure up to 100MHz; currently I'm, topping out at 71 MHz; much the same as the slower T3.2.[/FONT]
  3. [FONT=Arial, sans-serif]The real icing on the cake would be for T4.x to allow an external clock for defining the gate width in FreqCount() activities. (I don't want to do surgery on T4.1s to use a precision crystal.) I'm doing quite well with a calibration process and applying corrections but the T4.1 crystal temperature coefficient is not the best (Not a criticism, this is normal with microprocessor crystals.)[/FONT]
[FONT=Arial, sans-serif]
Thanksfor a great product.
[/FONT]
 
I think, the regex could be ignored.
More important is the elf file. It's not as easy to parse as the symbol file (but doable)
An easier workaround would be to use the new size-tool" for all teensys, and to exchange the path for the elf with a path for the .sym.

Indeed whatever is easier and more complete - I just copied the platform.txt stuff to lend context to "that post" as I came across it as linked - and to confirming the MAC stuff was the only one needing attention.

Time to log off here - but can the current 'Arduino typical' short strings be used for non-verbose and on 'Verbose' then eject the full table?
 
Sure, it's a matter of 10 minutes to edit the printfs.

A table is nice because there is no dependency on the language. The Arduino-outputs are translated.
But I think English will do.. as everything else is English anyway..
 
I found a plain c lib ... don't know how good it works, so using your code might be better.
We need the symbol table.

So, I am ready to write a new tool.... if you give a signal.
 
Last edited:
hm... no....
i just called the original:
Code:
C:\Users\Frank\Documents\Arduino\sketch_feb08a\build>C:\Arduino\hardware\tools\arm\bin\arm-none-eabi-size sketch_feb08a.ino.elf -A
sketch_feb08a.ino.elf  :
section                size         addr
.text.progmem          7120   1610612736
.text.itcm            24208            0
.fini                     4        24208
.ARM.exidx                8        24212
.text.itcm.padding     8548        24220
.data                  4584    536870912
.bss                   8408    536875496
.bss.dma              12448    538968064
.text.csf              3072   1610648660
.ARM.attributes          46            0
.comment                110            0
.debug_info          144155            0
.debug_abbrev         17511            0
.debug_line           16872            0
.debug_frame           7100            0
.debug_str            25817            0
.debug_loc            26151            0
.debug_aranges         1912            0
.debug_ranges          2184            0
Total                310258
It appears to me that the builder filters that with the regex form platform.txt... Kurt is probably right.
We would have the same problem as before ?! That wouldn't be useful. But maybe we can use that as input for the new size-tool.
But it would be a only a few milliseconds faster... hm. It does not show any information which teensy-model it is, and some other symbols. So.. I think using the "nm" output ist better.

We could get rid of the calling the shell. But then we would have to call nm from the program. Is that better? Not sure..

q: Does it actually still work to specify a file for the eeprom? I have not used this feature for many years. Maybe the tool would have to be extended for this.
 
Last edited:
Status
Not open for further replies.
Back
Top