PDA

View Full Version : Teensyduino 1.36 Released



Paul
03-31-2017, 06:25 PM
Teensyduino 1.36 has been officially released.

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

There were only very minor changes since 1.36-beta4 (https://forum.pjrc.com/threads/42803-Teensyduino-1-36-Beta-4).

These are all the changes since Teensyduino 1.35:


Support for Arduino 1.8.2
Update ARM toolchain to gcc 5.4
Add more optimization choices (including LTO) to Tools > Optimize
Ethernet socketBeginMulticast (manitou)
Fix IntervalTimer on Teensy 3.5
Wire library supports Wire1, Wire2
Wire library timeouts for error conditions
Libraries updated: AccelStepper, ADC, Audio, FastLED, LedDisplay, RadioHead, ShiftPWM, Snooze, SPI, TouchScreen, Wire
Libraries added: USBHost_t36
Minor improvements to AVR emulation
Hardware serial write() compatibility fix
Fix pin config on Serial6
Add extreme joystick, disabled by default, edit usb_desc.h
Fix String test as boolean
Faster installation, especially on Mac
Optimize SPI.transfer(buffer, length) (KurtE)
Fix USB audio on Macs & improve PassThroughUSB example
Start USB sooner
Add volume() function to AudioInputUSB
Fix rare memcpy issue (Frank B)
Fix 9 bit mode on Serial1 & Serial2 on Teensy LC (gecko)
Fix to dtostrf for small numbers (LAtimes2)
Serial.begin() waits up to 1 second for serial monitor open
analogWriteFrequency minimum on Teensy LC
Fixes in ADC library (KurtE)
Fixes in RadioHead library (KurtE)

DaQue
03-31-2017, 06:35 PM
Cool, thanks everyone for all the work done.

Frank B
04-01-2017, 06:57 PM
Can you add

-mpure-code

to the next beta please ?

Thank you.

PaulStoffregen
04-02-2017, 12:37 PM
Can you add

-mpure-code

to the next beta please ?


Remind me when the next beta starts. This thread isn't a place I'm going to look in a month or two when starting 1.37's betas.

danixdj
04-03-2017, 10:43 PM
After update to 1.36 i have a problem that cause a crash of the system. (correctly compiled but teensy freezed!).

the problem is in this line:

-----
display.printf("%.1f", value);
-----

display library is the Adafruit_SSD1306.h installed by teensyduino

value is a float variable and i want to see only 1 number after the point, with the 1.34 this code works fine.


Let me know what can i do...

thank you.

defragster
04-04-2017, 09:08 AM
Before reporting problems on code that used to work before T_1.36 please note :: Update ARM toolchain to gcc 5.4 This can result in different compile/link results to the code loaded to the Teensy, and also new build warnings as well as errors.

> When you see signs of a problem check the 'Verbose' compile output. Look to any warnings as well as errors for the source of the trouble. If the warnings aren't clear or don't resolve properly please note them when posting. Ideally any warning could be a clue to the source of a problem at run time even if it compiles.

Please note if this causes a change in behavior::
> If you are compiling without LTO, try it "with LTO"
> If you are compiling "with LTO", try it without "LTO"

Paul: Regarding LTO - if you haven't please check this out (https://forum.pjrc.com/threads/43080-Blocking-AM2321-Library-with-Arduino-1-8-2-Teensyduino-1-36?p=139028#post139028).

PaulStoffregen
04-04-2017, 10:31 AM
After update to 1.36 i have a problem that cause a crash of the system. (correctly compiled but teensy freezed!).


Which Teensy are you using? What is the setting in Tools > Optimize?



Let me know what can i do...


Could you check if this crash happens with a minimal program containing no other code? If so, please post the complete ready-to-copy-into-Arduino program here?

Many, many times I've looked into a report like this which didn't have a complete program. The result is almost always that I write a small program and the bug doesn't happen, because I didn't get some detail the same. So as a general rule I don't look into these sorts of things until a complete program is posted. If this only takes a few lines of trivial code, then posting such a small program is easy, right?

danixdj
04-04-2017, 11:19 AM
Which Teensy are you using? What is the setting in Tools > Optimize?



Could you check if this crash happens with a minimal program containing no other code? If so, please post the complete ready-to-copy-into-Arduino program here?

Many, many times I've looked into a report like this which didn't have a complete program. The result is almost always that I write a small program and the bug doesn't happen, because I didn't get some detail the same. So as a general rule I don't look into these sorts of things until a complete program is posted. If this only takes a few lines of trivial code, then posting such a small program is easy, right?


I have the same problem in all of OPTIMIZE value (fast or fast LTO)

Now i check with a small code and post it..

Teensy 3.2 + Audio Board.

danixdj
04-04-2017, 12:39 PM
The problem is in new audio library... if i remove chorus all works fine, if i remove some other and leave chorus all works fine... i think that it's something in the memory usage, i see audio memory usage 0 but i think that there are something wrong in the new library.
Can i use old library (before this) ? where can i download it?

Thanks

PaulStoffregen
04-04-2017, 01:04 PM
Can you post a complete program which demonstrates the problem? Knowing the chorus effect matters is a help, but if I'm going to put engineering time into fixing this, a complete program I can copy into Arduino and upload to a board here would *really* help. Usually when time I put guesswork into crafting a program, I end up not reproducing the problem. Please, do me & everyone a favor and post a complete program to reproduce the issue. Please?

For info on how to old versions, go to the download page and view the html source.... ;)

tonton81
04-04-2017, 01:07 PM
You should place bounties on people who do this, the more threads posted without necessary info just flag them, when they reach a certain limit they will be banned from posting for a certain period of time (a month) ? :P

danixdj
04-04-2017, 01:21 PM
Can you post a complete program which demonstrates the problem? Knowing the chorus effect matters is a help, but if I'm going to put engineering time into fixing this, a complete program I can copy into Arduino and upload to a board here would *really* help. Usually when time I put guesswork into crafting a program, I end up not reproducing the problem. Please, do me & everyone a favor and post a complete program to reproduce the issue. Please?

For info on how to old versions, go to the download page and view the html source.... ;)

Hi Paul, this a code that don't works... if you remove chorus setup or remove some 4/5 mixer object or some other audio object the "displayf" works fine...

------

#include <Adafruit_SSD1306.h>
#include <Adafruit_GFX.h>
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>


// GUItool: begin automatically generated code
AudioInputI2S i2s1;
AudioMixer4 mixer13;
AudioEffectFade fade2;
AudioEffectFade fade1;
AudioSynthWaveform waveform1;
AudioSynthNoiseWhite noise1;
AudioSynthNoisePink pink1;
AudioSynthSimpleDrum drum3;
AudioSynthSimpleDrum drum1;
AudioSynthSimpleDrum drum2;
AudioSynthWaveformSine sine1;
AudioMixer4 mixer11;
AudioSynthWaveformDc dc3;
AudioSynthWaveform waveform2;
AudioMixer4 mixer8;
AudioFilterStateVariable filter1;
AudioMixer4 mixer6;
AudioFilterStateVariable filter4;
AudioMixer4 mixer2;
AudioMixer4 mixer18;
AudioMixer4 mixer1;
AudioMixer4 mixer5;
AudioMixer4 mixer14;
AudioEffectDelayExternal delayExt1;
AudioMixer4 mixer22;
AudioSynthWaveformSineModulated sine_fm1;
AudioEffectMultiply multiply1;
AudioEffectReverb reverb1;
AudioEffectChorus chorus1;
AudioEffectBitcrusher bitcrusher1;
AudioEffectFlange flange1;
AudioAnalyzePeak peak1;
AudioMixer4 mixer16;
AudioFilterStateVariable filter2;


AudioMixer4 mixer19;
AudioMixer4 mixer4;
AudioMixer4 mixer10;
AudioMixer4 mixer12;
AudioMixer4 mixer7;
AudioMixer4 mixer9;
AudioMixer4 mixer17;
AudioMixer4 mixer3;



AudioEffectMultiply multiply3;
AudioAnalyzeRMS rms1;
AudioFilterStateVariable filter3;
AudioMixer4 mixer15;
AudioEffectEnvelope envelope1;
AudioMixer4 mixer20;
AudioMixer4 mixer21;
AudioAnalyzePeak peak2;
AudioOutputI2S i2s2;
AudioControlSGTL5000 sgtl5000_1;
// GUItool: end automatically generated code


byte numdx;

#define CHORUS_DELAY_LENGTH (24*AUDIO_BLOCK_SAMPLES)
short c_delayline[CHORUS_DELAY_LENGTH];
#define n_chorus 2



float envattack=0.05;
float envdecay=0.07;


#define NUMPOTS 4
float ccValue[NUMPOTS];
int inputAnalog[NUMPOTS], iAlag[NUMPOTS];
static const uint8_t pinpots[NUMPOTS] = {A11, A14, A6, A10};


#define OLED_RESET -1
Adafruit_SSD1306 display(OLED_RESET);



void setup() {


sgtl5000_1.enable();
AudioMemory(34);

display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
Wire.setClock(4800000);
display.clearDisplay();



chorus1.begin(c_delayline,CHORUS_DELAY_LENGTH,n_ch orus);
chorus1.voices(0);

}


void loop() {
display.clearDisplay();

envelope();
display.display();

// put your main code here, to run repeatedly:

}


void envelope() {readpotenvelope();

display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(109,23); display.setTextColor(WHITE); display.println(AudioMemoryUsageMax());
display.setTextSize(1); display.setTextColor(WHITE);display.setCursor(0,0) ;
display.println("Envelope");
display.setTextColor(WHITE); display.setCursor(91,0); display.print(" / 255");
display.setCursor(73,0); display.setTextSize(1); display.print(numdx);
display.setTextSize(1); display.setTextColor(WHITE);display.setCursor(0,0) ; display.println();
display.setTextColor(BLACK, WHITE);display.print("A");display.setTextColor(WHITE); display.printf("%.1f", envattack*30);
display.print(" ");display.setTextColor(BLACK, WHITE);display.print("D");display.setTextColor(WHITE); display.printf("%.0f", envdecay*200);
display.setCursor(0,17); display.setTextColor(WHITE); display.setTextSize(2); display.print("Attack");
display.setCursor(0,43); display.print("Decay");
display.drawRect (0, 33, 128, 5, WHITE); display.drawRect (0, 59, 128, 5, WHITE);
display.setTextColor(WHITE); display.fillRect(0, 33, envattack * 128,5, WHITE); display.fillRect(0, 59, envdecay * 128, 5, WHITE);
}

void readpotenvelope() {
int i=0;
for (i=0;i<NUMPOTS;i++){inputAnalog[i] = analogRead(pinpots[i]);
if (inputAnalog[i] < 25) {inputAnalog[i] = 0;} if (inputAnalog[i] > 1000) {inputAnalog[i] = 1023;}
if (abs(inputAnalog[i] - iAlag[i]) > 12){ccValue[i] = inputAnalog[i];
if (i == 0) {envattack = ccValue[i] / 1023; }
if (i == 1) {envdecay = ccValue[i] / 1023; }
numdx = ccValue[i] / 1023 * 255; iAlag[i] = inputAnalog[i];}
}}

danixdj
04-04-2017, 01:23 PM
ah and i use 64 block size mod library.

danixdj
04-04-2017, 01:29 PM
for example if you remove

AudioMixer4 mixer19;
AudioMixer4 mixer4;
AudioMixer4 mixer10;
AudioMixer4 mixer12;
AudioMixer4 mixer7;
AudioMixer4 mixer9;
AudioMixer4 mixer17;
AudioMixer4 mixer3;

all works fine

danixdj
04-04-2017, 04:26 PM
i can confirm that with Teensyduino 1.35 and Arduino 1.8.1 all works fine!

danixdj
04-04-2017, 04:54 PM
If i use the old version of audio library but new teensyduino and Arduino i have the same problem...