PDA

View Full Version : Teensyduino 1.31 Beta #3 Available



Paul
11-02-2016, 05:53 PM
Here is a third beta test for Teensyduino 1.31.


Edit: old beta test linkes removed. Full non-beta release is here:
http://www.pjrc.com/teensy/td_download.html



Changes since Teensyduino 1.31-beta2 (https://forum.pjrc.com/threads/38599-Teensyduino-1-31-Beta-2-Available):


Fix Ethernet library socket receive bug (thanks ElOtroMateo)
Fix compiler warnings, eg: kinetis_hsrun_enable unused
Serial buffer sizes override from command line (Frank B)
Stream find functions use const for pointers
Add AudioOutputAnalogStereo and AudioInputAnalogStereo
Add Audio reverb effect, from Joao Rossi Filho
Add Audio waterfall spectrum example (Nathaniel Quillin)
Fix USB Audio on Windows when used with USB Serial
Fix auto-reboot for newer USB types
Fix serial monitor for newer non-serial USB types
Many ILI9341_t3 improvements (Frank B, Kurt E, Softegg)
SerialFlash allows other SPI ports (Martino Facchin)
Teensy Loader shows correct images for Teensy 3.5 & 3.6

SharpEars
11-02-2016, 07:41 PM
Speaking of Ethernet, is there any ETA on some sort of Ethernet shield, module, or connector for the 3.6?

PaulStoffregen
11-02-2016, 07:53 PM
Right now, I'm working to wrap up a stable 1.31 release. New stuff like USB host & ethernet are on hold until we have a stable 1.31 to build upon.

KurtE
11-02-2016, 09:26 PM
Hi Paul, maybe not important, but yesterday I did a PR on the ILI9341_t3 library to the keywords.txt file that added in all of the new methods...

SharpEars
11-03-2016, 03:35 AM
Right now, I'm working to wrap up a stable 1.31 release. New stuff like USB host & ethernet are on hold until we have a stable 1.31 to build upon.

Sounds very reasonable - good luck!

SteveC
11-04-2016, 06:32 AM
Paul,
I ran into an error with Beta 3 and Teensy 3.0 and the audio library.

I was using Teensyduino 3.1 Beta 2, Arduino 1.6.12 on Windows 10 with a Teensy 3.0 and the Audio library to show my son how odd harmonics can create a square wave and it worked great. After Installing 3.1 Beta 3 over Beta 2 we and ran into "Error Compiling for Board Teensy 3.0." with the details below. The problem occurred with all Audio.h examples that I tried. The Blink example works fine. I tried Teensy 3.2/3.1 and Teensy 3.6 and it compiled fine.

I then reinstalled Teensyduino 3.1 Beta 2 (verified that it installed in "Help\About Arduino") and strangely the problem remained with Teensy 3.0 selected. Finally I deleted Arduino\hardware\teensy, reinstalled Beta 2 and everything compiles and runs fine.

It looks like analog.c is not getting the definition of "__MK20DX128__".

Thanks for your hard work on Teensy. I'm really liking my Teensy 3.6!


C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\ input_adcs.cpp: In function 'int analogReadADC1(uint8_t)':

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\ input_adcs.cpp:335:27: error: 'pin2sc1a' was not declared in this scope

if (pin >= sizeof(pin2sc1a)) return 0;

^

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\ input_adcs.cpp:336:27: error: 'pin2sc1a' was not declared in this scope

uint8_t channel = pin2sc1a[pin];

^
...
Error compiling for board Teensy 3.0.



#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthWaveformSine sine1;
AudioSynthWaveformSine sine2;
AudioSynthWaveformSine sine3;
AudioSynthWaveformSine sine4;
AudioSynthWaveformSine sine5;
AudioSynthWaveformSine sine6;
AudioSynthWaveformSine sine7;
AudioSynthWaveformSine sine8;
AudioMixer4 mixer1;
AudioMixer4 mixer2;
AudioMixer4 mixer3;
AudioOutputI2S i2s1;

AudioConnection patchCord1(sine1, 0, mixer1, 0);
AudioConnection patchCord2(sine2, 0, mixer1, 1);
AudioConnection patchCord3(sine3, 0, mixer1, 2);
AudioConnection patchCord4(sine4, 0, mixer1, 3);

AudioConnection patchCord5(sine5, 0, mixer2, 0);
AudioConnection patchCord6(sine6, 0, mixer2, 1);
AudioConnection patchCord7(sine7, 0, mixer2, 2);
AudioConnection patchCord8(sine8, 0, mixer2, 3);

AudioConnection patchCord94(mixer1, 0, mixer3, 0);
AudioConnection patchCord10(mixer2, 0, mixer3, 1);

AudioConnection patchCord11(mixer3, 0, i2s1, 0);
AudioConnection patchCord12(mixer3, 0, i2s1, 1);

AudioControlSGTL5000 sgtl5000_1;
// GUItool: end automatically generated code

float firstHarmonic = 300.0;

void setup() {
AudioMemory(30);
sgtl5000_1.enable();
sgtl5000_1.volume(0.8);

float Amplitude = 1.0 / (1.0 + 1.0 / 3.0 + 1.0 / 5.0 + 1.0 / 7.0 + 1.0 / 9.0 + 1.0 / 11.0 + 1.0 / 13.0 + 1.0 / 15.0);

sine1.amplitude(Amplitude);
sine1.frequency(firstHarmonic * 1);

sine2.amplitude(Amplitude * 1.0 / 3.0);
sine2.frequency(firstHarmonic * 3);

sine3.amplitude(Amplitude * 1.0 / 5.0);
sine3.frequency(firstHarmonic * 5);

sine4.amplitude(Amplitude * 1.0 / 7.0);
sine4.frequency(firstHarmonic * 7);

sine5.amplitude(Amplitude * 1.0 / 9.0);
sine5.frequency(firstHarmonic * 9);

sine6.amplitude(Amplitude * 1.0 / 11.0);
sine6.frequency(firstHarmonic * 11);

sine7.amplitude(Amplitude * 1.0 / 13.0);
sine7.frequency(firstHarmonic * 13);

sine8.amplitude(Amplitude * 1.0 / 15.0);
sine8.frequency(firstHarmonic * 15);

delay(4000);
}

void loop() {
// put your main code here, to run repeatedly:
}

PaulStoffregen
11-04-2016, 06:54 AM
Paul,
I ran into an error with Beta 3 and Teensy 3.0 and the audio library.

Opps, yeah, broken on Teensy 3.0.

Fixed just now.
https://github.com/PaulStoffregen/Audio/commit/f163937d624cc968ffb13f45b06adcfa1d689c1c

SteveC
11-04-2016, 04:30 PM
Thanks Paul! I will try it.

Garug
11-06-2016, 12:02 PM
The SD library seems to be GNU General Public License V3, but what does that mean, yeah, the exact legal definition I can easily find, but not as easily to understand.

So can I use the SD library as it is, as part of code that is commercially sold, without needing to publish my code?

Garug
11-06-2016, 12:04 PM
is it/will it/could it be possible to load updated code using the SD card?

MichaelMeissner
11-06-2016, 12:15 PM
The SD library seems to be GNU General Public License V3, but what does that mean, yeah, the exact legal definition I can easily find, but not as easily to understand.

So can I use the SD library as it is, as part of code that is commercially sold, without needing to publish my code?

I am not a lawyer, but given that the Teensy does not have shared libraries (where you could load the library outside of the program proper), you would have to make your code available under the GPL V3 if you use the SD library.

PaulStoffregen
11-06-2016, 01:15 PM
Yes, the Arduino SD lib is GPL. My understanding is this means you're not allowed to use in a proprietary project where you don't release your code. Of course, this isn't legal advice. Legal advice can only come from your own attorney.

My intention has always been to allow people to use Teensy in their own products. Earlier this year, I began a complete rewrite of the SD lib. It's still in the experimental stage, and so far the code only supports reading. You can't write any data to the card, but it does work well for reading, with some optimizations not found in the old SD lib. All this new code is MIT license. The files are all together in the same SD lib folder. There's a define in SD_t3.h which selects the alternate code to compile.

Eventually I'm going to add write support, and SDIO support with large multi sector access, and advanced caching. All MIT to allow use in products. If only there were a lot more hours in every day....

Garug
11-06-2016, 01:16 PM
Thanks Michael. That is what I am afraid of, so it would not be usable for me, unless I dedicate one board just for SD...

But I am a bit confused the SD_t3.h seems not to be that limited

/* Why reinvent the SD library wheel...
* 4: Permissive MIT license

Over all, what is the situation with basic* libraries with Teensy 3.2, 3.5 and 3.6 Are they free to use with these boards without obligation to share by the board user developed code, so that the boards can be used for commercial purposes?

*SERIAL, I2C, SPI, SD, ...

Edit: I see this was answered above for the SD part while I was typing

PaulStoffregen
11-06-2016, 01:42 PM
No matter what is said here, the final word on licensing is the actual license info found in each library, or any properly signed agreement you make directly with the author.

Garug
11-06-2016, 01:45 PM
Yes, But it would be good to get an overall understanding of the situation. I am most concerned of Serial, SPI and I2C, those I need.

(I have not looked to the Teensy 3.5 and 3.6 libraries yet and not sure even where to find them.)

Frank B
11-06-2016, 02:54 PM
On your disk .)

Garug
11-06-2016, 03:15 PM
Probably yes, but I have no Idea where to find the Teensy 3.5 and 3.6 used SPI, Serial and I2C libraries and if there is other code I should be worried about.

And further more it should not be this difficult.

If my code that runs on Teensy uses just Serial, SPI and I2C,maybe CanBUS also, do the provided libraries limit the commercial use of the Teensy, is there requirements for me to publish the code.

If they do not allow commercial use without publishing code, I certainly hope it would be negotiated by the board provider so that they can be used for commercial use. The commercial use Teensy boards could come with an additional license fee if needed.

KurtE
11-06-2016, 03:33 PM
Paul can answer better on what is the license stuff for his code and libraries...
On my machine I have arduino installed at: C:\arduino-1.6.12 - So change any path I show to where it is installed on your machine.

Serial is part of cores: https://github.com/PaulStoffregen/cores
C:\arduino-1.6.12\hardware\teensy\avr\cores\teensy3

SPI: Source is up at: https://github.com/PaulStoffregen/SPI
Installs in C:\arduino-1.6.12\hardware\teensy\avr\libraries\SPI

I2C: (depends) Wire library - https://github.com/PaulStoffregen/Wire
Installs in C:\arduino-1.6.12\hardware\teensy\avr\libraries\Wire

If you use I2C_t3: https://github.com/nox771/i2c_t3
C:\arduino-1.6.12\hardware\teensy\avr\libraries\i2c_t3

I have not used canbus: I believe comes from: https://github.com/teachop/FlexCAN_Library (Paul's copy is some commits behind)
C:\arduino-1.6.12\hardware\teensy\avr\libraries\FlexCAN

Garug
11-06-2016, 04:17 PM
Thanks Kurt, I just can not find the files on my Mac, but looking the files in Github, it looks pretty bad for SPI (if I was looking right libraries), but maybe ok for Serial, I2C_t3 and CAN. Is there an alternative library for SPI, that would not be GNU?

Garug
11-07-2016, 04:49 AM
Paul, would you please clear this out. What is free to be used with the Teensy boards (I am thinking of using 3.2 and 3.6, maybe 3.5), what is contaminated by the GNU? Even some of the core libraries seem to be GNU?

1. If I add no libraries to my code, is everything free to be used for commercial purposes, without obligation to share the code?

2. Is there free to be used; I2C, SPI, Serial, CAN libraries, no obligation to share my own code when using them .

3. And yes, would be nice to be able to use the SD for commercial purposes, but can do without for now. Hopefully in future though possible.

I like the Teensy a lot, it is great for my own purposes, but the question is can it be used for commercial purposes (sell a product using teensy board) without obligation to share the code.

PaulStoffregen
11-07-2016, 08:33 PM
I'm about to wrap this up and publish 1.31. Anyone have any bugs I should look at fixing before 1.31 releases?

tni
11-07-2016, 08:36 PM
I'm about to wrap this up and publish 1.31. Anyone have any bugs I should look at fixing before 1.31 releases?
https://forum.pjrc.com/threads/37387-teensy_gateway-going-crazy?p=117369&viewfull=1#post117369

MichaelMeissner
11-07-2016, 09:01 PM
I'm about to wrap this up and publish 1.31. Anyone have any bugs I should look at fixing before 1.31 releases?

It would be nice if the Adafruit_ST7735 library worked if you choose pins that are the CS pins, but right now, I just fall back to the Adafruit driver. Likewise, it would be nice if the 128x128 display support from Adafruit was folded into the driver.

I am seeing some funnyness with Bounce2, but I haven't made a simple test case yet, so don't hold 1.31.

Frank B
11-07-2016, 09:03 PM
I'm about to wrap this up and publish 1.31. Anyone have any bugs I should look at fixing before 1.31 releases?
https://github.com/PaulStoffregen/cores/pull/195

defragster
11-07-2016, 09:14 PM
https://github.com/PaulStoffregen/cores/pull/195

Good one Frank! That occurred to me the other day when folks were pushing larger buffers - I saw they were hard coded but didn't do anything about it.

I did something to consider for 1.32: Making this delay(400) split gets Teensy 3 and 3.6 online in 405ms :: pull/196 (https://github.com/PaulStoffregen/cores/pull/196)

Frank B
11-07-2016, 09:18 PM
Yes !
And for 1.32, the NaN / INF pullrequests...

PaulStoffregen
11-08-2016, 10:53 AM
I've merged tni's fix for the gateway lingering and Frank's fixes for INF & NAN.

I'm going to work on the ST7735 library after 1.31 releases. Sorry, it's just too much to do quickly. I want to wrap up 1.31 today!

The serial watermark defines and start delay can be considered for 1.32, but at this last minute I'm only merging bug fixes.

PaulStoffregen
11-08-2016, 04:56 PM
I'm packaging up 1.31 now. The only other fix that made it in was bundling the missing libpng and libusb libraries for some Linux systems.

PaulStoffregen
11-08-2016, 05:11 PM
Ok, it's done. Teensyduino 1.31 is finally released. :)

http://www.pjrc.com/teensy/td_download.html

defragster
11-08-2016, 10:30 PM
1.31 installed and worked for me on Win 10 over 1.31b3.

Of course it found my T_3.0 instead of the T_3.6 - had to pull the 3.0 and restart Teensy.exe - time to go back to TYQT :)

Frank B
11-15-2016, 06:22 PM
https://github.com/PaulStoffregen/SPI/pull/21/files

https://github.com/PaulStoffregen/Audio/pull/211/commits/04ca3983c1ebf959cd9699a116c91ccd00390b21 (https://github.com/PaulStoffregen/SPI/pull/21/files)