Teensyduino 1.54 Beta #7

Status
Not open for further replies.
Serial monitor seems to be hanging again similar to what happened in T4 beta testing: https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=213179&viewfull=1#post213179

If I run this sketch:
Code:
void setup() {
  // initialize serial communication at 9600 bits per second:
  Serial.begin(115200);
}

// the loop routine runs over and over again forever:
void loop() {
  // print out the value you read:
  Serial.println(millis());
  //delay(1);        // delay in between reads for stability
}
the serial monitor stops output after about 1 second or so;
Code:
1198
1198
1198
1198
1198
1198
1198
1198
1198
1   ---- hangs here
If I close the SerMon on reopen same thing happens (note sketch is still running)
Code:
338627
338627
338627
338627
338627
338627
33862  - stops here after a second

If you uncomment the delay serial monitor does not hang

EDIT:
I found this because I ran into the problem with a PS4 joystick dumping data to the SerMon and then hanging but PS4 was still working. If I opened up TyCommander data was still spewing to Serial. Also noticed it while testing USBHost with when dumping a large directory contents to the SerMon. Also noticed this in my DCC++ sketch.
 
Last edited:
@PaulStoffregen:

Did receive the following (previously unseen) warnings (building w/ Smallest Code optimization):

Code:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\output_i2s.cpp:340:55: warning: default argument given for parameter 1 of 'static void AudioOutputI2S::config_i2s(bool)' [-fpermissive]
 void AudioOutputI2S::config_i2s(bool only_bclk = false)
                                                       ^
In file included from C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\output_i2s.cpp:28:0:
C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\Audio\output_i2s.h:55:14: note: previous specification in 'static void AudioOutputI2S::config_i2s(bool)' here
  static void config_i2s(bool only_bclk = false);
              ^
Ah, those are my PDM changes, I noticed them eventually - I'll have a look at fixing this.

[ pull request https://github.com/PaulStoffregen/Audio/pull/390 ]
 
Last edited:
Serial monitor seems to be hanging again similar to what happened in T4 beta testing: https://forum.pjrc.com/threads/54711-Teensy-4-0-First-Beta-Test?p=213179&viewfull=1#post213179

...
If you uncomment the delay serial monitor does not hang

EDIT:
I found this because I ran into the problem with a PS4 joystick dumping data to the SerMon and then hanging but PS4 was still working. If I opened up TyCommander data was still spewing to Serial. Also noticed it while testing USBHost with when dumping a large directory contents to the SerMon. Also noticed this in my DCC++ sketch.

I can confirm this on my new i7-10700 Windows 10 machine.
With Teensyserialmon.exe
I pulled out TyCommander as default and using IDE 1.53 with TD 1.54b7
> It Stalls printing about 1.5 seconds
> Occasionally repeat Uploads will not restart output in T_sermon :: It stays "[offline] (Teensy)"
> Closing t_sermon and re-open does show output for some time again


It works for some much longer time with loop() having :: delayMicroseconds(100);
> It runs up to about 20 to 30 seconds.
> On UPLOAD again while stalled then the IDE T_SerMon then picks up working for some time

IDE_SERMON:
> doesn't seem to EVER connect when there is no delay or delayMicroseconds(100) in loop()
> With delayMicroseconds(100) in loop the IDE_SerMon runs for over 2 minutes

NOTES:
> Adding " while( !Serial) ; " in setup doesn't help - so it isn't just printing before Serial is online.
> Ref IDE_SerMon and also TyCommander : work better or well in the case of TyCommander
> TyCommander working without fault - though it is consuming 25% of the i7-10700 CPU [8 cores and 16 threads at 2.9GHz+Turbo]
> T_sermon never 'faulted into the console' with any JAVA exceptions
> Last test with IDE_SerMon did result in series of JAVA exceptions -
>> but that isn't likely noteworthy - except not that IDE_SerMon faulted and closed _T_sermon will not start:: here it is:
Code:
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
	at java.lang.String.toCharArray(String.java:2899)
	at javax.swing.text.GapContent.insertString(GapContent.java:131)
	at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:723)
	at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
	at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
	at javax.swing.JTextArea.append(JTextArea.java:477)
	at processing.app.AbstractTextMonitor.updateTextArea(AbstractTextMonitor.java:224)
	at processing.app.AbstractTextMonitor.lambda$message$2(AbstractTextMonitor.java:214)
	at processing.app.AbstractTextMonitor$$Lambda$151/1411208.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
	at javax.swing.text.GapContent.allocateArray(GapContent.java:94)
	at javax.swing.text.GapVector.resize(GapVector.java:214)
	at javax.swing.text.GapVector.shiftEnd(GapVector.java:229)
	at javax.swing.text.GapContent.shiftEnd(GapContent.java:345)
	at javax.swing.text.GapVector.open(GapVector.java:201)
	at javax.swing.text.GapVector.replace(GapVector.java:142)
	at javax.swing.text.GapContent.insertString(GapContent.java:132)
	at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:723)
	at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
	at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
	at javax.swing.JTextArea.append(JTextArea.java:477)
	at processing.app.AbstractTextMonitor.updateTextArea(AbstractTextMonitor.java:224)
	at processing.app.AbstractTextMonitor.lambda$message$2(AbstractTextMonitor.java:214)
	at processing.app.AbstractTextMonitor$$Lambda$151/1411208.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
	at javax.swing.text.GapContent.allocateArray(GapContent.java:94)
	at javax.swing.text.GapVector.resize(GapVector.java:214)
	at javax.swing.text.GapVector.shiftEnd(GapVector.java:229)
	at javax.swing.text.GapContent.shiftEnd(GapContent.java:345)
	at javax.swing.text.GapVector.open(GapVector.java:201)
	at javax.swing.text.GapVector.replace(GapVector.java:142)
	at javax.swing.text.GapContent.insertString(GapContent.java:132)
	at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:723)
	at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
	at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
	at javax.swing.JTextArea.append(JTextArea.java:477)
	at processing.app.AbstractTextMonitor.updateTextArea(AbstractTextMonitor.java:224)
	at processing.app.AbstractTextMonitor.lambda$message$2(AbstractTextMonitor.java:214)
	at processing.app.AbstractTextMonitor$$Lambda$151/1411208.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
	at javax.swing.text.GapContent.allocateArray(GapContent.java:94)
	at javax.swing.text.GapVector.resize(GapVector.java:214)
	at javax.swing.text.GapVector.shiftEnd(GapVector.java:229)
	at javax.swing.text.GapContent.shiftEnd(GapContent.java:345)
	at javax.swing.text.GapVector.open(GapVector.java:201)
	at javax.swing.text.GapVector.replace(GapVector.java:142)
	at javax.swing.text.GapContent.insertString(GapContent.java:132)
	at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:723)
	at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
	at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
	at javax.swing.JTextArea.append(JTextArea.java:477)
	at processing.app.AbstractTextMonitor.updateTextArea(AbstractTextMonitor.java:224)
	at processing.app.AbstractTextMonitor.lambda$message$2(AbstractTextMonitor.java:214)
	at processing.app.AbstractTextMonitor$$Lambda$151/1411208.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space
Exception in thread "AWT-EventQueue-0" java.lang.OutOfMemoryError: Java heap space

> There is some issue here ...
 
@defragster
Thanks for confirming the issue -- glad it is not just me.

Glad to confirm - saw your note and had to go to effort to remove TyComm as that is the default here.

Now that it got the noted Java Exceptions - even restarting the IDE didn't seem to bring the teensy_serialmon back to use so quit there as reboot seemed a bit much.

TyCommander back on Serial and running fine. Edited the code to print micros() not millis() for better resolution with this current output at 3679.930318 seconds - catching each single us - some twice on a T_4.1:
Code:
3679930300
3679930300
3679930301
3679930302
3679930303
3679930304
3679930305
3679930305
3679930306
3679930307
3679930308
3679930309
3679930309
3679930310
3679930311
3679930312
3679930313
3679930314
3679930314
3679930315
3679930316
3679930317
3679930318


Here is the code running:
Code:
// https://forum.pjrc.com/threads/66357-Teensyduino-1-54-Beta-7?p=271493&viewfull=1#post271493
void setup() {
  Serial.begin(115200);
  while( !Serial) ;
}
void loop() {
  Serial.println(micros());
  //delayMicroseconds(100);
}
 
@defragster
Didn't have the problem with the java exceptions that you saw. SerMon would come to life if I closed it and reopened but would stop again.

I did notice that TyCommander didn't have that problem if I opened it - data would keep streaming to TyCommander.
 
Last edited:
@KurtE
Didn't have the problem with the java exceptions that you saw. SerMon would come to life if I closed it and reopened but would stop again.

I did notice that TyCommander didn't have that problem if I opened it - data would keep streaming to TyCommander.

As noted the 'java exceptions' were not PJRC code but the IDE SerMon! It was working better than T_sermon - until it ran out of memory.


Was going back to other code that wouldn't build - and didn't want TEENSY attacking my USB - so decided to add a way to STOP the sketch with a Press Any Key.

That code is below and may help in debugging as the running Teensy can be paused from Death Spew mode - if caught in the time it works.

Additionally I added OTHER option for if ( Serial.availableForWrite() > 2 ) to stop SPEW when there was no buffer space. It NEVER stops - even when T_serialmon does.

> NOTE: when T_serialmon stops output - hit 'Send' and no GUI change
- >> Then close T_serialmon and notice the Teensy went to Pause mode waiting when it is opened again. So the OUTPUT went - but input is not processing/showing
> Also NOTE: if the "Send" is hit while still running in T_serialmon - it then prints a string of "X X X X X " before it stops!
- >> This happens in TyCommander as well - .availableForWrite() has never looked like it was right on the 1062.
> Also NOTE: The delay() and flush() combo seemed to be what was needed to wait before the flush() worked to see the print("Press and Key...")
Code:
// https://forum.pjrc.com/threads/66357-Teensyduino-1-54-Beta-7?p=271493&viewfull=1#post271493
void setup() {
	Serial.begin(115200);
	while ( !Serial) ;
}
#define OTHER 1
void loop() {
#ifdef [B]OTHER[/B]
	if ( Serial.availableForWrite() > 2 )
		Serial.println(micros());
	else
		Serial.print(" X");
#else
    Serial.println(micros());
#endif
	//delayMicroseconds(100);
	if ( Serial.available() ) {
		while (Serial.read() != -1);
		delay(100);
		Serial.flush();
		Serial.println("\n\tPress any key to run again");
		while (Serial.read() == -1);
		while (Serial.read() != -1);
	}
}

Typing this and slighting the availableForWrite() it seemd printing that might be instructive?
Code:
// https://forum.pjrc.com/threads/66357-Teensyduino-1-54-Beta-7?p=271493&viewfull=1#post271493
void setup() {
	Serial.begin(115200);
	while ( !Serial) ;
}
#define OTHER 1
void loop() {
#ifdef OTHER
	uint32_t lAFW = 0;
	if ( (lAFW = Serial.availableForWrite()) > 2 ) {
		Serial.print(micros());
		Serial.print("\t AFW:");
		Serial.println(lAFW);
	}
	else
		Serial.print(" X");
#else
	Serial.println(micros());
#endif
	//delayMicroseconds(100);
	if ( Serial.available() ) {
		lAFW = Serial.availableForWrite();
		while (Serial.read() != -1);
		delay(100);
		Serial.flush();
		Serial.print("\n PAK ENTRY AFW:");
		Serial.println(lAFW);
		lAFW = Serial.availableForWrite();
		Serial.print("\t AFW:");
		Serial.println(lAFW);
		Serial.println("\n\tPress any key to run again");
		while (Serial.read() == -1);
		while (Serial.read() != -1);
	}
}
 
@Paul for reference using : github.com/PaulStoffregen/USB-Serial-Print-Speed-Test

With IDE 1.8.13 SerMon and T_4.1 [ Win 10 w/TD 1.54b7 ]:
SerMon works for some time - spewed some ASM source - ran some more - then the IDE "CLOSED" wholly gone without warning.

With IDE 1.8.13 Teensy_SerMon and T_4.1 [ Win 10 w/TD 1.54b7 ]:
Sometimes starts blank and needs close and re-open then it runs a short time.
NOTE: the LAST RED letter in both will not get selected from the windows for cut and paste - at least dragging to select - Ctrl+A does ... though was odd on a one char last line once.
Code:
...
count=10037741, lines/sec=0
count=10037742, lines/sec=0
count=10037743, lines/sec=0
count=10037744, lines/sec=0
count=10037745, lines/sec=0
count=10037746, lines/sec=0
count=10037747, lines/sec=0
count=10037748, lines/se[B][COLOR="#FF0000"]c[/COLOR][/B]

and again:
Code:
...
count=10037636, lines/sec=0
count=10037637, lines/sec=0
count=10037638, lines/sec=0
count=10037639, lines/sec=0
count=10037640, lines/sec=0
count=10037641, lines/sec=0
count=10037642, lines/[B][COLOR="#FF0000"]s[/COLOR][/B]

REF to TyComm - it ran some time at 75K lps- and is acting fitful - saw it stall twice after on screen garbage - then returned to run at 436K lps ... and then it stalled and went 'Not Responding'


** Using typical USB3 HUB - on newer 'faster' machine running most current++ Win 10 - preRelease InSider build of pending Win 10 first half of 2021 - not the last Fall 2020 release.
 
Last edited:
@Paul - Another Ref point for above post USB-Serial-Print-Speed-Test and @mjs513 sketch.

I have a zip install for IDE 1.8.13 and TD 1.53 that I didn't delete.

The Teensy is running the prior uploaded code.

Opened IDE and T_sermon port to that active Teensy and it is showing 400K - now 595K and back down to 426K

It Died while I was starting this post and went BLANK gui window - closed the T_sermon and reopened and it ran this long just fine - actually longer because going back I don;t see the 500K+ counts.
As for Proof it is the OLD T_sermon - you can see the Windows Copy&Paste has double \n\n
Code:
count=1324509887, lines/sec=426114

count=1324509888, lines/sec=426114

...
count=1324672047, lines/sec=426114

count=1324672048, lines/sec=426114

Again TD 1.53: I powered off the Teensy - repowered - opened T_sermon - got nothing - closed& opened and it started - still running - now 442 to 600K lps.
It ran this long - Stalled - I got this copied from the end - then the T_sermon went blank, like above:
Code:
count=69090102, lines/sec=513361

count=69090103, lines/sec=513361

count=69090104, lines/sec=513361

count=69090105, lines/sec=513361

So a change in teensyserialmon.exe from TD 1.53 has made this worse
> removed double \n\n
> stopped auto end of line scroll
> other?
Closed T-sermon and reopend - again running fine at 636K lps.


Uploaded p#34 code and T_sermon is running fine - but the row of "+ + + + +" is regualrly splashing across now as it continues.
I turned off autoscroll to capture this - turned it back on and it continues in the same manner
And here in TD 1.53 again I cannot select the last char in the screen buffer by mouse drag.
Code:
...

106573967	 AFW:2048

106573969	 AFW:2048

106573970	 AFW:2048

106573971	 AFW:2048

106573973	 AFW:2048

106573974	 AFW:2048

106573976	 AFW:2048

106573977	 AFW:2048

 X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X  X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X107378561	 AFW:2048

107378562	 AFW:2048

107378564	 AFW:2048

107378565	 AFW:2048

107378566	 AFW:2048

107378568	 AFW:2048

...

108439820	 AFW:6144

108439822	 AFW:6144

108439823	 AFW:6144

108439825	 AFW:6144

108439826	 AFW:6144

108439828	 AFW:6144

108439[B][COLOR="#FF0000"]8[/COLOR][/B]

...
370746402	 AFW:6144

370746404	 AFW:6144

370746405	 AFW:6144

370746407	 AFW:6144

370746408	 AFW:6144

...

493093830	 AFW:6144

493093831	 AFW:6144

493093833	 AFW:6144

493093834	 AFW:6144

4930[B][COLOR="#FF0000"]9[/COLOR][/B] // TD 1.53 T_sermon quick working here - until I hit SEND? But another SEND won't stop it now?

...
[B]// Hit AutoScroll off captured the below - then hit SEND and it started again[/B]
738297294	 AFW:4096

738297296	 AFW:4096

...
 
Error - out of DTCM!
Have to find out why this is the case - this error output is not helpful - and this error results in ELF not saved for the teensy_size.exe to parse:
Code:
t:/arduino-1.8.13_t54/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: address 0x201032c0 of t:\temp\arduino_build_PrimeLoop_cache.ino/PrimeLoop_cache.ino.elf section `.bss' is not within region `DTCM'
t:/arduino-1.8.13_t54/hardware/tools/arm/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: address 0x201032c0 of t:\temp\arduino_build_PrimeLoop_cache.ino/PrimeLoop_cache.ino.elf section `.bss' is not within region `DTCM'
collect2.exe: error: ld returned 1 exit status
exit status 1

Turning this edited line on again in boards.txt ( actually boards.local.txt ):
teensy41.build.flags.ld=-Wl,--print-memory-usage,--gc-sections,--relax "-T{build.core.path}/imxrt1062_t41.ld"

Shows:
Code:
Memory region         Used Size  Region Size  %age Used
            ITCM:       26284 B       512 KB      5.01%
            [B]DTCM:     1061568 B       512 KB    202.48%[/B]
             RAM:       12704 B       512 KB      2.42%
           FLASH:       42408 B      7936 KB      0.52%
            ERAM:          0 GB        16 MB      0.00

Opps - I put an extra '4X' in the : uint32_t pCache[262144]; meant pCache[65536];
 
Hello,

I noticed a bug when using band-limited waveforms and freeverb. My T3.2 crashes when playing high pitch notes. No problem when using standard waveforms.
My code is rather long. I am going to squeeze it and post it to narrow the bug.
Emmanuel
 
Hello,

Here is a simple code that crashes my Teensy 3.2.
I use the builtin DAC.
There is probably some kind of incompatibility between freeverb and band limited waveforms oscillators.
Emmanuel
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthWaveformModulated waveformMod1;   //xy=179.9999771118164,272.0000247955322
AudioSynthWaveformModulated waveformMod2;   //xy=199.99999999999997,324.2857142857143
AudioMixer4              mixer1;         //xy=530.0000305175781,288.57141876220703
AudioEffectFreeverb      freeverb1;      //xy=784.2857666015625,254.28572273254395
AudioOutputAnalog        dac1;           //xy=1012.571382522583,264.1428527832031
AudioConnection          patchCord1(waveformMod1, 0, mixer1, 0);
AudioConnection          patchCord2(waveformMod2, 0, mixer1, 1);
AudioConnection          patchCord3(mixer1, freeverb1);
AudioConnection          patchCord4(freeverb1, dac1);
// GUItool: end automatically generated code


void setup() {
  AudioMemory(10);
  waveformMod1.begin(0.3, 0, WAVEFORM_BANDLIMIT_SQUARE);
  waveformMod2.begin(0.3, 0, WAVEFORM_BANDLIMIT_SQUARE);
}


void loop() {
  waveformMod1.frequency(5000);
  waveformMod2.frequency(4000);
  waveformMod1.amplitude(0.3);
  waveformMod2.amplitude(0.3);

  delay(1000);

  waveformMod1.amplitude(0);
  waveformMod2.amplitude(0);
  
  delay(1000);
}
 
@Paul, could you please fork i2c_t3 by nox771?
His last activity on github was 2018. His (great) library needs errormessage if used on T4... there were several questions about it, in the last weeks/months
 
Hello,

Here is a simple code that crashes my Teensy 3.2.
I use the builtin DAC.
There is probably some kind of incompatibility between freeverb and band limited waveforms oscillators.
Emmanuel

I think this is just memory use, I see it jam with 2 copies of the bandlimited waveform - it works with only one copy,
and the memory is very tight:
Global variables use 59588 bytes (90%) of dynamic memory, leaving 5948 bytes for local variables. Maximum is 65536 bytes.

It works with two bandlimited waveforms and no freeverb - so I think its just run out of memory.

BTW I'm only going by serial prints, don't have an audio shield for T3's I'm afraid.
 
Thank you for your help.
If it's a memory issue, there is no way I can use a T3.2.
I tried to allocate more memory with AudioMemory(), but it doesn't work.
I think I am going to use standard waveforms for this project.
Emmanuel
 
Hello everyone,

I'm using platform IO given the ui layout is really nice over the Arduino platform.

I now need to move to the new 1.54 beta version of Teensyduino for the new SdFAT library. However when I go into platforms I don’t see any beta version or any update for Teensyduino it says I'm current, and I’m currently using Teensy Loader 1.52.

Does anyone know how to download teensyduino manually and then install it in the Platform.io IDE?
It asks for an arduino location however the location is a hidden file path --> C:\Users\XXXX\.platformio\packages

Thank you in advanced,
Joe
 
Last edited:
Hello everyone,

I'm using platform IO given the ui layout is really nice over the Arduino platform.

...

Easier to just start with the IDE ... of course I use the IDE and TD installs and build from editor with command line build - this works on Windows: github.com/Defragster/Tset

But this thread has possible solution to the same issue : PlatformIO-how-to-compile-for-Teensy-4-0-with-beta-core

Just got a new computer and installed VSCode and looked at PlatformIO - but doesn't look compelling enough to leave SublimeText and what is working well with TSET as above - and the IDE is always ready for fallback and testing.
 
Hello everyone,

I'm using platform IO given the ui layout is really nice over the Arduino platform.

I now need to move to the new 1.54 beta version of Teensyduino for the new SdFAT library. However when I go into platforms I don’t see any beta version or any update for Teensyduino it says I'm current, and I’m currently using Teensy Loader 1.52.

Does anyone know how to download teensyduino manually and then install it in the Platform.io IDE?
It asks for an arduino location however the location is a hidden file path --> C:\Users\XXXX\.platformio\packages

Thank you in advanced,
Joe

I just installed Teensiduino beta version as usual and then manually copied the cores (from the Arduino folder) into the respective PlatformIO directory, replacing the existing ones. I have read that you can explicitly indicate in PlatformIO where to look for the cores without the need of coping them too.
 
Hello everyone,

I'm using platform IO given the ui layout is really nice over the Arduino platform.

I now need to move to the new 1.54 beta version of Teensyduino for the new SdFAT library. However when I go into platforms I don’t see any beta version or any update for Teensyduino it says I'm current, and I’m currently using Teensy Loader 1.52.

Does anyone know how to download teensyduino manually and then install it in the Platform.io IDE?
It asks for an arduino location however the location is a hidden file path --> C:\Users\XXXX\.platformio\packages

Thank you in advanced,
Joe


After posting on the Platform.IO community page I was able to get someone to show me how to link to the github repository. which means that I will always have the latest version which might or might not be a good thing.

But to complete the issue I had above I had to change the platformio.ini file to say the following.

Code:
[env:teensy36]
platform = teensy
board = teensy36
framework = arduino
platform_packages =
    framework-arduinoteensy@https://github.com/maxgerhardt/teensy-core-pio-package.git

Hope this helps
Joe
 
It would be better if the new SIZE would show the Bytes for ITCM, not the blocks * 32768.
It's not possible to compare code-sizes, at the moment.
 
@Paul - just re-downloaded the Beta 7 : TeensyduinoInstall.exe and Windows 10 did not give me any grief, warnings or blocking!

Just the usual - Once saved to run it has to be Unblocked to execute. - or an extra 'are you sure' Query before install.
 
Status
Not open for further replies.
Back
Top