Teensyduino 1.36 Released

Status
Not open for further replies.

Paul

Administrator
Staff member
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.

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)
 
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.
 
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.
 
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?
 
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.
 
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
 
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.... ;)
 
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
 
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_chorus);
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 = analogRead(pinpots);
if (inputAnalog < 25) {inputAnalog = 0;} if (inputAnalog > 1000) {inputAnalog = 1023;}
if (abs(inputAnalog - iAlag) > 12){ccValue = inputAnalog;
if (i == 0) {envattack = ccValue / 1023; }
if (i == 1) {envdecay = ccValue / 1023; }
numdx = ccValue / 1023 * 255; iAlag = inputAnalog;}
}}
 
Last edited:
for example if you remove

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

all works fine
 
If i use the old version of audio library but new teensyduino and Arduino i have the same problem...
 
Last edited:
Status
Not open for further replies.
Back
Top