PDA

View Full Version : Teensyduino 1.47 Released



Paul
08-14-2019, 01:53 PM
Teensyduino 1.47 has been released.

(https://www.pjrc.com/teensy/td_download.html)https://www.pjrc.com/teensy/td_download.html

1.47 is the first official release to support Teensy 4.0 (https://www.pjrc.com/store/teensy40.html).


However, not all libraries and features are supported on Teensy 4.0 yet. Here is a partial list of things known to not yet work on Teensy 4.0.

OctoWS2811
WS2812Serial
PulsePosition
USB types other than Serial
Optimization with LTO
legacy AVR register emulation
FreqMeasureMulti
SdFat
Snooze
TeensyThreads
Wire slave (normal master mode works)

My hope is to release 1.48 in early September, with most of the items on this list supported.

If you encounter problems, please reply on this thread with details. Please include complete code and everything needed to reproduce the problem.

mjs513
08-14-2019, 02:04 PM
Just did an install on a windows 10x64 and installed without a problem. As @defragster noted it did remember the last board selected, in my case it was a Teensy 4.

One note though. On initial install it gave me the ERROR! message but I noticed in task manager there was a teensy_reboot.exe still running. One killed it the installed proceeded normally.

reaganr
08-14-2019, 06:07 PM
4.0 up and blinking! good to be back in the teensy world after an extended break. did you miss me?:rolleyes:

so.. it doesnt give me any USB type options: i.e. MIDI, HID. is that intentional?

defragster
08-14-2019, 06:30 PM
Just did an install on a windows 10x64 and installed without a problem. As @defragster noted it did remember the last board selected, in my case it was a Teensy 4.

One note though. On initial install it gave me the ERROR! message but I noticed in task manager there was a teensy_reboot.exe still running. One killed it the installed proceeded normally.

Odd there was something orphaned/stuck? Before last two beta installs for sure I scanned TaskMan for Teensy processes and none survived closing IDE and TeensyLoader before install. That was with 1-3 or more T4's active and some half dozen IDE sketches open before.

Download of Release 1.47 just completed - will update if anything shows up. This install will be after fresh reboot from Windows Updates so nothing arduino active ...

< no news, but good update:) > :: Win 10 : installed 1.47 release no issue - IDE 1.8.9 started and did a blink and a primes sketch - then ili9341_t3 DemoSauce on the PJRC Purple OSH board ... ALL GOOD
And > Three T4's online - picked the Teensy_ports one with twin SPI 0/1 ST7789's - ran 5 port Serial Test - All Good.

OH - in the process for FUN :: On both those T4's I did a 15 second Restore after upload, then hit Program after Restore and the Sketch code went on again and came up running.
> In both cases the IDE SerMon ( teensy_ports ) : shows Teensy as RawHid when it came back online - then Button did upload.

pjkdeveloper
08-14-2019, 09:10 PM
I have arduino 1.8.9-3 installed on manjaro linux (arduino 1.8.9-3 is from the default manjaro repositories). When I run the teensyduino 1.47 installer, I cannot install because I see:

Checking Arduino 1.8.9:
version: "lib/version.txt" version matches
file: "arduino" present
file: "lib/jssc-2.8.0-arduino3.jar" present
java: "lib/pde.jar" object: "processing/app/Base.class" wrong size, unsupported Arduino version
Does not match Arduino 1.8.9

What is the problem and how do I fix this? (BTW the lib/pde.jar was built on 5/20/2019)

Thanks!

defragster
08-14-2019, 10:10 PM
I have arduino 1.8.9-3 installed on manjaro linux (arduino 1.8.9-3 is from the default manjaro repositories). When I run the teensyduino 1.47 installer, I cannot install because I see:

Checking Arduino 1.8.9:
version: "lib/version.txt" version matches
file: "arduino" present
file: "lib/jssc-2.8.0-arduino3.jar" present
java: "lib/pde.jar" object: "processing/app/Base.class" wrong size, unsupported Arduino version
Does not match Arduino 1.8.9

What is the problem and how do I fix this? (BTW the lib/pde.jar was built on 5/20/2019)

Thanks!

TeensyInstaller only works against 'Arduino Release' versions posted on their web site. Not daily builds and not any version that may have been 'tweaked' in a way to change the JAVA core files PJRC needs to trust to modify for chneges Teensy makes.

The "arduino 1.8.9-3 is from the default manjaro repositories" seems to indicate it was 'tweaked' for the OS install - and as such it was modified and fails the version check before install of TeensyDuino.

pjkdeveloper
08-14-2019, 10:21 PM
Ok, thank you for that! I will get rid of the manjaro repository install, and instead install from arduino.cc. I had read about that in the "known issues", but the only reason I thought it'd be ok in this instance was that the 1.8.8 install from the manjaro repositories and teensduino 1.4.5 worked just fine.....but I understand that things can change as you pointed out and will follow your advice.

Thank you!

bicycleguy
08-15-2019, 08:23 PM
I know this is a stupid operator issue.. but I seem to experience it a lot;)

MacOS 10.14.6 Arduino 1.8.9, Teensy Loader 1.47, Teensy 4, Teensy Ports/...serial(Teensy 4.0")

Causes Arduino to crash on second screwup.

If you make a mistake that writes to much to the screen to fast and get:

'Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space'

you can recover by quickly closing the Arduino terminal window, fixing the error and then recompiling, reloading and opening the terminal.
However, the next time you muck-up Arduino will freeze and your work can't be saved.

Here is an oversimplified example to show the issue.
1. Run it once. (Must open Arduino terminal window to start it after download)
2. Close the terminal window.
3. Comment the offending line in loop()
4. Recompile, reload and run again, it works correctly.
5. Uncomment the offending line and try again.
6. At this point I get the freeze.



void setup() {
Serial.begin(9600);
while(!Serial)
;
Serial.println("I'm starting up");
}

void loop() {
Serial.println("DejaVu"); // comment and uncomment this line
}

defragster
08-15-2019, 09:42 PM
... operator issue.. but I seem to experience it a lot;)

MacOS 10.14.6 Arduino 1.8.9, Teensy Loader 1.47, Teensy 4, Teensy Ports/...serial(Teensy 4.0")

Causes Arduino to crash on second screwup.

If you make a mistake that writes to much to the screen to fast and get:

'Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space'
...


Very easy to do with the T4 not only passing in and out of loop() a few times faster than even a T_3.6 ( 20 million versus maybe 3 M ) - but the USB speed went from 12 Mbps to 480 Mbps …

Paul improved the transfer to GUI speed a bit and removed it from JAVA to some degree - but still tweeks the IDE easily when not properly limited.

bicycleguy
08-16-2019, 01:38 AM
Very easy to do with the T4 not only passing in and out of loop() a few times faster than even a T_3.6 ( 20 million versus maybe 3 M ) - but the USB speed went from 12 Mbps to 480 Mbps …

Paul improved the transfer to GUI speed a bit and removed it from JAVA to some degree - but still tweeks the IDE easily when not properly limited.

Seems funny it can recover once or twice, maybe just luck on what got clobbered. Probably good to save work and better to restart when this happens?

Forgot to thank you and all the other 'volunteers' for helping make Pauls latest creation happen. I see lots of fun ahead with it!

defragster
08-16-2019, 01:50 AM
Seems funny it can recover once or twice, maybe just luck on what got clobbered. Probably good to save work and better to restart when this happens?

Forgot to thank you and all the other 'volunteers' for helping make Pauls latest creation happen. I see lots of fun ahead with it!

>> One thing I found is Turning OFF the Teensy when being overly talkative - getting it off USB lets the computer clear up sooner/better with data while recompiling.

Since it is buggy - it isn't exact - … as noted shutting it down ASAP allows immediate use. At some point the Heap Management of cycling buffers filling/displaying/dumping gets overwhelmed one could imagine some amount of recovery working - but at some point the recovery may just be orphaning memory and objects and it adds up.

I tend to use TyCommander and it works as well or better - but it has issues as well - it runs fine and does a good job swapping buffers ( of adjustable size ) - but after some time of full or over speed it and Win 10 freezes/gets sluggish. It uses a 'library' "text Control" from whatever code base he has in play - so it could be refined with custom code - but not sure when that may happen.

PaulStoffregen
08-17-2019, 04:28 PM
I have arduino 1.8.9-3 installed on manjaro linux (arduino 1.8.9-3 is from the default manjaro repositories).....
What is the problem and how do I fix this? (BTW the lib/pde.jar was built on 5/20/2019)

Only the original software published by Arduino.cc is supported. The many distro-modified copies of Arduino are never supported.

The installer tries to tell you this.

17244

KE4EST
08-19-2019, 03:54 AM
I am getting the below error while trying to compile 4.0 with a RA8875 TFT. Will RA8875 be fixed in in 1.48?
If this is another issue feel free to move this post, but all works fine on a 3.5 or 3.6 Teesy.

E:\Arduino\hardware\teensy\avr\libraries\RA8875\RA 8875.cpp: In member function 'void RA8875::begin(RA8875sizes, uint8_t)':

E:\Arduino\hardware\teensy\avr\libraries\RA8875\RA 8875.cpp:408:11: error: cannot convert 'volatile uint32_t* {aka volatile long unsigned int*}' to 'volatile uint8_t* {aka volatile unsigned char*}' in assignment

csport = portOutputRegister(digitalPinToPort(_cs));//pinMode(_cs, OUTPUT);

^

Error compiling for board Teensy 4.0.

defragster
08-19-2019, 08:41 AM
I am getting the below error while trying to compile 4.0 with a RA8875 TFT. Will RA8875 be fixed in in 1.48?
If this is another issue feel free to move this post, but all works fine on a 3.5 or 3.6 Teesy.

This is in the known issues list Post #4 and #6 on T4 Beta thread (https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=193717&viewfull=1#post193717) - but no notes so maybe not seen in Beta testing.

A quick look at that and it has #ifdef for T_LC/3.1/3.2 - but not for 3.5/3.6 so I'm not sure how they work as it looks like the same fixes/failures would apply in at least some cases.

MichaelMeissner
08-19-2019, 01:28 PM
I am getting the below error while trying to compile 4.0 with a RA8875 TFT. Will RA8875 be fixed in in 1.48?
If this is another issue feel free to move this post, but all works fine on a 3.5 or 3.6 Teesy.

Are you using the Adafruit_RA8875 or RA8875 libraries. Typically the Adafruit libraries should work but they don't have Teensy specific optimizations. Unfortunately, the author (sumotoy) of the Teensy specific library (RA8875) has not been seen on this forum since 2017. The Teensy RA8875 has a bunch of #ifdef's for specific Teensy machines, and since the Teensy 4.0 is not on the list, it is falling down to using the code for 8 bit AVR Arduinos. Whether that code will work on the Teensy 4.0 (in slow mode), I dunno.

It may depend on whether Paul, defragster, KurtE, or mjs513 have a RA8875 display for testing, and have the time and motivation to do the work (the later three have been working on optimizing other displays for the Teensy 4.0). I recall discussions about what to do about the RA8875 have come up in the past.

mjs513
08-19-2019, 02:07 PM
I am getting the below error while trying to compile 4.0 with a RA8875 TFT. Will RA8875 be fixed in in 1.48?
If this is another issue feel free to move this post, but all works fine on a 3.5 or 3.6 Teesy.

In going the RA8875 lib it looks like all the T3x stuff is a simple define and for those mcus Sumotoy uses SPI transaction's. I did a quick hack of the lib to add the T3.5/T3.6/T4 to the lib but I don't have the display to test. If you want to give it a try replace the .h/.cpp in the installed library with the ones in the attached zip. It might be enough to get you started.

EDIT: Note - the Adafruit version should work out of the box.

KurtE
08-19-2019, 02:20 PM
I wonder at times what is the best course of action with Github projects like RA8875 library, where the owner of the library (Like Sumotoy) is no longer active.

I had/have a Spin version I did back in 2016, to be able to test it I believe on SPI1 and SPI2 of T3.5/6... I might have one of the displays sitting around somewhere... but ...

mjs513
08-19-2019, 03:00 PM
I wonder at times what is the best course of action with Github projects like RA8875 library, where the owner of the library (Like Sumotoy) is no longer active.

I had/have a Spin version I did back in 2016, to be able to test it I believe on SPI1 and SPI2 of T3.5/6... I might have one of the displays sitting around somewhere... but ...

Might be better to see what has to be added to the ADAFRUIT_RA8875 library from the Sumotoy library. This way it might be easier to support for the Teensies. Both libs look like they only use SPI transactions so might be easier even to use it on different SPI busses

KurtE
08-19-2019, 04:52 PM
Might be better to see what has to be added to the ADAFRUIT_RA8875 library from the Sumotoy library. This way it might be easier to support for the Teensies. Both libs look like they only use SPI transactions so might be easier even to use it on different SPI busses

That is the interesting question. Sometimes wonder if it would make more sense to try to enhance the Teensy support in Adafruit_GFX. Or more particular Adafruit_SPITFT.

Can we for example have it know more about T3 FIFO queue or likewise the T4...

Also they have some experimental version supporting DMA, which might be interesting to enable???

mjs513
08-19-2019, 05:38 PM
@KurtE
Good question - probably update SPITFT if Adafruit is amiable to the changes for the Teensies. GFX seems to be incorporated into most of the libraries I have seen.

MichaelMeissner
08-19-2019, 08:37 PM
@KurtE
Good question - probably update SPITFT if Adafruit is amiable to the changes for the Teensies. GFX seems to be incorporated into most of the libraries I have seen.

And try to do it in such a way, so that other platforms, particularly the M4 Adafruit uses, can add their bits.

KE4EST
08-19-2019, 09:29 PM
Are you using the Adafruit_RA8875 or RA8875 libraries.
I am using the one that came with Teensy install. I checked to make sure.

KE4EST
08-19-2019, 09:30 PM
In going the RA8875 lib it looks like all the T3x stuff is a simple define and for those mcus Sumotoy uses SPI transaction's. I did a quick hack of the lib to add the T3.5/T3.6/T4 to the lib but I don't have the display to test. If you want to give it a try replace the .h/.cpp in the installed library with the ones in the attached zip. It might be enough to get you started.

EDIT: Note - the Adafruit version should work out of the box.

Thanks, I will give it a try!

defragster
08-19-2019, 09:32 PM
@KE4EST - was noted it compiles for T_3.6. With Verbose on compile that as Verify and in the last lines it will indicate the Libraries used and not used and show location for sure.

KE4EST
08-19-2019, 09:46 PM
Yep that is how I knew. ;)

defragster
08-19-2019, 09:48 PM
Yep that is how I knew. ;)

Opps - that was to be a question/request to share those lines

p#14 shows it fail in that code - but going there it wasn't clear why T_3.6 should work as it didn't show #ifdef's for those MCU's?

KurtE
08-20-2019, 02:16 PM
Yesterday I did find I do have two of those displays(RA8875 from BuyDisplay.com) (one I never did get to work and the other sometimes...) I had the test apps working on T3.6 earlier, but so far nothing showing up on display on T4, with what I think is same wiring...

How do any of you have them wired? I assume you are configured for 4 wire SPI? Probably using the 8 pin JP1 for SPI? Are you using any pins up in the other parts of connectors, like the Reset pin?
Power? The one that was working on T3.6 did not have VR on the board, so hooks up to 3.3v Again at times I think I was/am getting brown out on T3.6 (and T4?) Later yesterday, I tried taking a 3.3v DC/DC converter off of older board I had to see if I could rig it to convert the VUSB to 3.3v... Still no display output, but the Adafruit library was able to read register 0 and liked the result...

Again back to other questions:

In this case the library being used. is RA8875 not that Adafruit library. Looks like both libraries are installed as part of the install. I am not sure where the RA8875 in the release is coming from. I don't see anywhere where @PaullStoffregen has forked it, so I assume it is coming from sumotoy. Question is which release/version? And if any changes are made, how to get those incorporated? As SumoToy has not done anything in about 4 years... As for release his main page says:
https://github.com/sumotoy/RA8875 is the latest stable version.

but: suggests that you use the development branch: https://github.com/sumotoy/RA8875/tree/0.70b11 as it usually contains bug fixes and the like...

As for Adafruit libraries, the version of Adafruit_RA8875 as part of this build. In this case Paul does have a fork of the Adafruit code base, but it looks like this fork is something like 60 commits behind the Adafruit version. So question again is if changes are needed where to do it? Note the Adafruit one still is derived from GFX and not the SPITFT class under GFX...

Edit: Side note: looks like the DC/DC converter I salvaged won't work here. My VUSB is showing only 4.6v? Maybe time to try different USB Hub? And the converter I extracted:
https://www.digikey.com/product-detail/en/murata-power-solutions-inc/OKI-78SR-3.3-1.5-W36-C/811-2195-5-ND/2259780
Is good for VIN in the range: 7-36v... I measured no voltage coming out...

DerekR
08-21-2019, 04:05 AM
@Paul,
I just noticed that you asked at the top of this thread for bugs/suggestions related to Teensyduino 1.47 to help with your next go around. I posted a couple of threads in "General Discussion" that might be more appropriate here:

1) A suggestion that the different versions of arm_math for T3 and T4 be made the same. The T3 copy is still the old 2012 while the T4 version is a 2017 version in which many functions have been deprecated and have warnings not to use them. (I have been manually upgrading arm_math for my T3.6 work with every Teensyduino release since 2017).
Since you have already done the upgrade now for T4, it seems to make sense to do the same for T3.

2) A separate (more serious) problem is related to T4 compiler errors when including user-written Audio Library compatible classes, raised by chipaudette here (https://forum.pjrc.com/threads/57236-F_CPU_ACTUAL-error-in-Teensy-4-but-not-Teensy-3), and resolved fully here (https://forum.pjrc.com/threads/57277-Compiling-custom-Audio-Library-compatible-classes-for-Teensy-4http://), where expanding on a suggestion by KurtE, I found that the problem went away completely by including
#include "core_pins.h"
in AudioStream.h
What I don't understand is why this problem doesn't show up when using standard Audio library classes??? Anyway, it would be good to have the issue fixed properly in the next Teensyduino...

Kirah
08-21-2019, 05:59 PM
Just received my 2 T4s, good timing :)
Sparkfun did not include the pinout cards though :(



so.. it doesnt give me any USB type options: i.e. MIDI, HID. is that intentional?

The announcement post does say that "USB types other than Serial" are not yet finished and thus not in this release...

PaulStoffregen
08-21-2019, 11:28 PM
If you make a mistake that writes to much to the screen to fast and get:

'Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space'


I've been working these last several days to improve the Arduino Serial Monitor performance.

Today I have a first test.

https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=213248&viewfull=1#post213248

Please give this a try on your computer and let me know if you see an improvement?

mjs513
08-21-2019, 11:40 PM
RA8875 Sumotoy Lib v0.79

@KurtE - @defragster - @KE4EST

Ok folks broke down and got my RA8875 driver board and display from Adafruit. I got it working with the Adafruit library but not the RA8875 sumotoy library. So I downloaded his development branch 0.79xxxx and modified it to work with the T4. Preliminary results from the benchmark sketch:

screen:800x480 - rotation:0
Benchmark Time (microseconds)
Screen fill 16494
Test Pixel 29
Test Pixels 19420
Text 3544
Lines 85992
Horiz/Vert Lines 52593
Rectangles (outline) 265817
Rectangles (filled) 265269
Circles (filled) 146734
Circles (outline) 142969
Triangles (outline) 21219
Triangles (filled) 60942
Rounded rects (outline) 106210
Rounded rects (filled) 902876
--------------------------------

screen:480x800 - rotation:1
Benchmark Time (microseconds)
Screen fill 16494
Test Pixel 29
Test Pixels 11661
Text 3544
Lines 85985
Horiz/Vert Lines 52589
Rectangles (outline) 265266
Rectangles (filled) 265692
Circles (filled) 146734
Circles (outline) 142973
Triangles (outline) 18194
Triangles (filled) 57942
Rounded rects (outline) 106243
Rounded rects (filled) 902635
--------------------------------

screen:800x480 - rotation:2
Benchmark Time (microseconds)
Screen fill 16494
Test Pixel 29
Test Pixels 19420
Text 3527
Lines 85989
Horiz/Vert Lines 52591
Rectangles (outline) 265275
Rectangles (filled) 265826
Circles (filled) 146734
Circles (outline) 142969
Triangles (outline) 21217
Triangles (filled) 60902
Rounded rects (outline) 106196
Rounded rects (filled) 902573
--------------------------------

screen:480x800 - rotation:3
Benchmark Time (microseconds)
Screen fill 16495
Test Pixel 30
Test Pixels 11660
Text 3543
Lines 85984
Horiz/Vert Lines 52593
Rectangles (outline) 265717
Rectangles (filled) 265796
Circles (filled) 146734
Circles (outline) 142971
Triangles (outline) 18200
Triangles (filled) 57657
Rounded rects (outline) 106186
Rounded rects (filled) 902860
-------------------------------- I will make it available if anyone wants to try it out shortly - stay tuned.

EDIT: Here is the link to the t4 branch for the sumotoy library:

https://github.com/mjs513/RA8875/tree/RA8875_t4

He also has a wiki associated with using the lib - found how to use the adafruit display with it.

EDIT:
@PaulStoffregen - don't know how to update the RA8875 library that is installed as part of the Teensyduino install?

KE4EST
08-21-2019, 11:46 PM
I will make it available if anyone wants to try it out shortly - stay tuned.

Yes, Please. :)

mjs513
08-21-2019, 11:58 PM
Yes, Please. :)

Just added the link in post #31. Make sure its the T4 branch: https://github.com/mjs513/RA8875/tree/RA8875_t4

defragster
09-06-2019, 12:54 AM
@Paul - does this in platform.txt matter - or is it showing 1.8.5 on this 1.8.9 system for some reason?:



# http://www.pjrc.com/teensy/teensyduino.html
name=Teensyduino
version=1.8.5

NuWaveIT
09-14-2019, 01:00 AM
Just got my 4.0, ran the Adafruit SSD1306 demo on it. WOW fast, can almost not see the "animation"! Can't wait for the additional USB support. Thanks!!

RogerD
09-30-2019, 07:50 AM
Just received my Teensy 4.0. Looks interesting but can't do much yet. Is there any information out there yet on the specs of the audio implementation on the board or how to get the audio card going with it? Fingers crossed that we get better and more centralized documentation for this potential gem. I wound up giving up on my 3.6 synth project and now have half of an analog modular synth up and running still, it would be great to get a decent compact and portable v4.0 based system going. Looks good so far at this early stage. 'Onya Paul!

manitou
09-30-2019, 12:27 PM
Just received my Teensy 4.0. Looks interesting but can't do much yet. Is there any information out there yet on the specs of the audio implementation on the board or how to get the audio card going with it? Fingers crossed that we get better and more centralized documentation for this potential gem. I wound up giving up on my 3.6 synth project and now have half of an analog modular synth up and running still, it would be great to get a decent compact and portable v4.0 based system going. Looks good so far at this early stage. 'Onya Paul!

lots of posts on T4 audio ... maybe try this one https://forum.pjrc.com/threads/57764-Teensy-3-6-versus-4-0-for-audio-processing

I think the T4 version (Rev D) of the audio shield is now available at PJRC store
https://www.pjrc.com/store/teensy3_audio.html

RogerD
10-02-2019, 06:24 AM
lots of posts on T4 audio ... maybe try this one https://forum.pjrc.com/threads/57764-Teensy-3-6-versus-4-0-for-audio-processing

I think the T4 version (Rev D) of the audio shield is now available at PJRC store
https://www.pjrc.com/store/teensy3_audio.html

Unfortunate that the pin allocation was re-arranged. I'll just have to bodge up an adapter. What I am most curious about are the numerous "Digital audio" pins on the board pinout map and in what way they are implemented.

PaulStoffregen
01-24-2020, 06:56 AM
Quick followup on this old thread. Teensyduino 1.49 was released, with updated RA8875 library and several of the features mentioned on this old thread.