Teensyduino 1.32 Beta #2 Available

Status
Not open for further replies.

Paul

Administrator
Staff member
Here is a second beta test for Teensyduino 1.32.


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


Changes since Teensyduino 1.32-beta1:
  • Improved sync between Arduino IDE and Teensy Loader
  • Arduino IDE Tools > Ports menu labels ports as "Teensy"
  • Fix Arduino Verify starting upload when Teensy already in bootloader mode
  • Teensy Loader wrong chip dialog is now nonblocking.
  • pinMode supports INPUT_DISABLE on 32 bit Teensy boards
  • attachInterrupt supports uninitialized pins
  • Serial RTS watermarks scale with buffer size (Frank B)
  • Optimized Adafruit_ST7735 improved & renamed to ST7735_t3
  • Ethernet library optimizations & Ethernet.init(CS_PIN)
 
Teensy Loader has a 4 dialog boxes for error conditions. Until now they've all been modal, meaning Teensy Loader halts until you click OK or Cancel. USB changes and events from Arduino are ignored while the modal dialog boxes are on the screen, and of course everything in the main window is unresponsive to mouse clicks.

  • wrong board for compiled code <-- nonblocking :)
  • file not readable
  • file too large for board
  • rebooting too fast <-- nonblocking :)

With this beta, I've tried to make 2 of them non-modal. Simple as this sounds, GUI programming (especially on top of the wxWidgets targeting 3 operating systems) for non-modal usage is far more complex. There's a reason so much software uses Yes/No/Cancel modal dialogs! If you have a chance to use this beta, please give these a try and let me know how they work (or fail) on your system?

On top of non-modal programming, I've also tried to make these dialogs automatically close themselves if you do something (not in Teensy Loader) which makes the error condition no longer apply. Both USB changes and events from Arduino are supposed to be able to make these non-modal dialogs automatically close themselves, without you having to click OK.

I also tried to fix two other long-standing problems.

  1. The dialog box could be rendered out of view, if Teensy Loader is covered by other windows or minimized to the tray/dock.
  2. It could appear somewhere far away from the original Teensy Loader window if you have a large screen or multi-monitor setup.

As you can probably imagine, GUI programming isn't my strongest skill. Especially getting the window to appear when behind other windows was quite a challenge, and I'm not entirely sure it's working in all cases on all 3 systems. If you have a little time to try this beta, please keep an eye out for these dialogs and let me know how they work on your system. If things go badly, I can put them back to modal mode. Ideally, I'd like to make all 4 non-modal if these 2 work out well.
 
Just installed on Arduino 1.6.13 with Windows 10 64 bit. Arduino installed from ZIP file.

Tried compiling a program (graphic test for ST7735_t3) to download to T3.2...

Code:
Opening Teensy Loader...


Sketch uses 33,428 bytes (12%) of program storage space. Maximum is 262,144 bytes.
Global variables use 4,756 bytes (7%) of dynamic memory, leaving 60,780 bytes for local variables. Maximum is 65,536 bytes.
C:\arduino-1.6.13\hardware\teensy/../tools/teensy_post_compile -test -file=graphicstest.ino -path=C:\Users\Kurt\AppData\Local\Temp\arduino_build_356634 -tools=C:\arduino-1.6.13\hardware\teensy/../tools -board=TEENSY31 -reboot 
Opening Teensy Loader...
Unable find Teensy Loader.  (r)  Is the Teensy Loader application running?
Is a firewall (eg, ZoneAlarm) blocking localhost communication?
Shows current Comm port 9(Teensy).
Clicking on program button does program the chip.

Tried rebooting to make sure there was not some random app still running. Still fails
 
Last edited:
I also installed on MAC with Arduino 1.6.12 and it appears to work.
Likewise installed on UP board running Ubuntu 16.04 on Arduino 1.6.13 and it and it appears to work there as well.
So only my main windows machine not working...
 
Looks like I have more work to do on the sync issue. But I can't produce it here. Tried many times just now on my Windows test machine.

Capture.png
 
Installed the TD_1.32b2 on my Win 10 IDE 1.6.13 system - no install problems!

I see the PORTS labelled as TEENSY ( if only it knew the model # :) )

So I was programming using 2 Teensy's and that is still not great with Teensy.exe - that is below. But to test your current work As noted above:
A single T_3.6 does UPLOAD and SERMON restart from IDE just fine.
If I select T_3.5 I get the Error popup and it displays and dismisses properly.
Going back to T_3.6 all goes well with no hiccups.

------- until I modified my current work this is what I found:
Not Using TYQT - of course I have a T_3.0 and a T_3.6 online and it picks the T_3.0 as FIRST to get a T_3.6 sketch.

Paul QUESTION:: [ so it is in that state - after acknowledging 'wrong chip dialog' ]
>I expected touching the T_3.6 program button to have Teensy.exe push over the code and it didn't? The Teensy_VERBOSE window shows nothing for the T_3.6, is it still tied to the T_3.0 left in Program mode? T_3.0 button push registers in Verbose. After Button on T_3.0 a button on T_3.6 registers only the first time and does not attempt to program the T_3.6 I just pushed the button on? And on the next 'Verify' it immediately tried to push to the T_3.0 again.

Yes, I know I must do Verify given the target isn't 'first' - but as I noted months back - Teensy.exe seems fixated on the wrong Teensy - when the right Teensy is asking for code.

I suppose this is because the T_3.0 is left offline in program mode? It leads to a confusing situation to navigate out of.

Still finding IDE SerMon doesn't start anew when the programmed Teensy comes back online with Verify and Button - I need to hit the IDE SerMon GUI button.

More - Why two Teensys: I have the T_3.0 doing pin 3 FreqMeas() of the T_3.6 and I want SerMon on both - so I use TYQT and tell it to ignore T_3.6 Serial - leaving it open to IDE and Teensy, and watch T_3.0 output in TYQT window.

Even with this - the T_3.0 tied up in USB with TYQT should be invisible to Teensy.exe? The first UPLOAD fails and the second reports this with SerMon open on COM3 to T_3.6::
Found serial '\\.\COM17', but unable to open for reboot request
Found serial '\\.\COM3', but unable to open for reboot request
Teensy did not respond to a USB-based request to automatically reboot.
Please press the PROGRAM MODE BUTTON on your Teensy to upload your sketch.

The Teensy 3.6 on COM3 is unencumbered - except by the IDE with open SerMon. I close SerMon and then I get just this with UPLOAD:
Found serial '\\.\COM17', but unable to open for reboot request
Though it has reprogrammed new UPLOAD code to the T_3.6 as expected - as long as SerMon doesn't have Com3 open.
And I see a long stream of this in Teensy_Verbose: "00:09:55: remote cmd: "status" 00:09:55: status data sent"

Not sure if this shows anything not already known - Would be nice if the IDE port selection could be used for the USB program when UPLOAD is used - to close SerMon - Program - Restore SerMon.

Note: When OTA programming multiple ESP8266's the program is sent by IDE port device selection to one of many IP addresses.

... this is why I always go back to TYQT as it handles Multi-Teensy and Multi-SerMon in a way that makes Teensy even better as I typically use it.
 
Installed the TD_1.32b2 on my Mac OS IDE 1.6.13 system - no install problems!

Can't see ETHERNET library any more...

My problem???
 
I see "examples / Ethernet" in the standard group - not Teensy specific lower group - with a T_3.6 selected on my similar Win 10 install
 
I looked again in the Teensyduino installer list of libraries, and there is no ETHERNET library.

As Paul listed - Ethernet library optimizations & Ethernet.init(CS_PIN), I expected to see a new library.
 
Looks like I have more work to do on the sync issue. But I can't produce it here. Tried many times just now on my Windows test machine.

View attachment 9015
Not sure, It was working before... First time I had this issue. To make sure, I deleted my 1.6.13 install, reinstalled from zip file I had on machine, reinstalled teensyduino and it still reproduces.
Yesterday it still worked with TYQT...
 
I looked again in the Teensyduino installer list of libraries, and there is no ETHERNET library.

Teensyduino's versions of Arduino's built in libraries are always installed. They're not offered in the list of optional libraries. You can't choose to not install Ethernet, Servo and a few others.
 
request for Paul:

the datasheet of the k66 family shows me that there is a total of 1mb of flash, with an additional 256KB of FlexNVM for extra program code.

maybe make use of that bank of code in the near future?
 
@KurtE - Could you give this a try? These 2 utilities go into hardware/tools within Arduino. Does it fix the erroneous "Unable find Teensy Loader" message on your Windows system?
 

Attachments

  • sync_test3_windows.zip
    19 KB · Views: 348
@KurtE - Could you give this a try? These 2 utilities go into hardware/tools within Arduino. Does it fix the erroneous "Unable find Teensy Loader" message on your Windows system?
Sorry No :eek:
Sketch uses 20,728 bytes (1%) of program storage space. Maximum is 1,048,576 bytes.
Global variables use 3,964 bytes (1%) of dynamic memory, leaving 258,180 bytes for local variables. Maximum is 262,144 bytes.
C:\arduino-1.6.13\hardware\teensy/../tools/teensy_post_compile -test -file=Blink.ino -path=C:\Users\Kurt\AppData\Local\Temp\arduino_build_900934 -tools=C:\arduino-1.6.13\hardware\teensy/../tools -board=TEENSY36 -reboot
Opening Teensy Loader...
Unable find Teensy Loader. (r) Is the Teensy Loader application running?
Is a firewall (eg, ZoneAlarm) blocking localhost communication?

I then tried running 1.6.12 with 1.31 and uploaded blink without issue.
 
While looking at one of the forum posts, I was looking through the ADC library code and noticed that with this beta, the code still talks about Teensy3.4 and Teensy 3.5. Looking up at pedvide updated that on his github awhile ago.

Not sure what all else changed.
 
@KurtE - Here's yet another attempt. I know this is probably getting tedious, but it's a huge help if you can give this a try. I *really* want to get this sync issue fixed for the 1.32 release.
 

Attachments

  • sync_test4_windows.zip
    19 KB · Views: 332
Sorry to say still same results. - As a sanity test, should I try installing 1.31 on this build and see if it acts differently?
 
Yes, would be good to compare with 1.31.

I've been unable to reproduce the problem on my windows test machine, so there's not much I can other than guessing. :(
 
I dropped those exe's on my Win_10/IDE 1.6.13/TD_1.32b2 and plugged in a T_3.2 for a couple uploads with no problems. I had no problems before as noted.

Paul: Looking at PULL request to move the waits around usb_init() it occurred to me:
Given that delay() calls yield - shouldn't delay(400); be replaced with delayMicroseconds(400000); as USB and other Serial stuff is offline so far?
Where my edit is in pins_teensy.c
//delay(400);
delayMicroseconds(400000);
usb_init();

I'm not sure if there is anyway the above could relate - thought it was time I made note of it in case.

UI of Teensy.exe was low left on second display - opened VERBOSE and it dropped below that barely showing the title bar.
 
I dropped those exe's on my Win_10/IDE 1.6.13/TD_1.32b2 and plugged in a T_3.2 for a couple uploads with no problems. I had no problems before as noted.

Thanks for testing.


Given that delay() calls yield - shouldn't delay(400); be replaced with delayMicroseconds(400000); as USB and other Serial stuff is offline so far?

This is fine.

It's also completely unrelated to the sync issues between Teensy Loader and teensy_post_compile & teensy_reboot. This sync problem is occurring entirely on the PC.


UI of Teensy.exe was low left on second display - opened VERBOSE and it dropped below that barely showing the title bar.

I have no idea what you mean by this? Maybe a screenshot would make it clearer?
 
Paul, not sure what to say?

I tried redownloading a fresh copy of Arduino, just in case.
I then downloaded TD 1.31, but of course not supported.
So downloaded TD 1.32b1 and installed and the upload worked fine.

I then downloaded the 1.32b2 and reproduced not able to sync..
Tried test 4 above again and still:
Code:
Opening Teensy Loader...


Sketch uses 20,728 bytes (1%) of program storage space. Maximum is 1,048,576 bytes.
Global variables use 3,964 bytes (1%) of dynamic memory, leaving 258,180 bytes for local variables. Maximum is 262,144 bytes.
Unable find Teensy Loader.  (r)  Is the Teensy Loader application running?
Is a firewall (eg, ZoneAlarm) blocking localhost communication?
Running windows 10 Pro
Intel Core i7-2600 @ 3.4ghz, 12gb mem
 
Thanks for testing.
My Win 10 is Pro_x64 also. This Laptop is just an i5 but working fine from a USB_2 port to an AMAZON Basics HUB. Also works fine direct to that USB_2 port, tested a few uploads. And with a single Teensy online - the IDE even works the SerMon restart correctly.

I do have a USB_3 port that is in an odd mood - powers a T_3.2 - but NEVER connects in any way - needs a system reboot.

Given that delay() calls yield - shouldn't delay(400); be replaced with delayMicroseconds(400000); as USB and other Serial stuff is offline so far?
This is fine.
Cool

UI of Teensy.exe was low left on second display - opened VERBOSE and it dropped below that barely showing the title bar.

I have no idea what you mean by this? Maybe a screenshot would make it clearer?

Looks like this where Teensy was low left on the right display - and you can see the VERBOSE window is dropped below that barely showing the title bar::

VerboseHide.png
 
Status
Not open for further replies.
Back
Top