Teensy Qt

I've uploaded a new build with the poetic name TyQt-0.6.3-199-g81d2743. It features a new Arduino integration dialog, accessible under "Help > Integrate to Arduino". It will replace the Teensy Loader with TyQt, or do the reverse with a single button.

Some day I will release a stable version, before this project gets lost in feature creep land :)

Worked on my Win 10 install of IDE 1.6.7 with Teensy 1.27b2. Had to do the 'Integrate' then restart the IDE.

Note: like the standard upload - it takes the one it sees as 'first' when you do 'upload' with multiple active Teensy units. To pick a specific unit as always do 'VERIFY' - then requires Button press or from TYQT GUI click 'Bootloader'.

Uploading to board '1245170@usb-1-1-3-4-1' (Teensy)
Triggering board reboot
Firmware: ColorButtonsMark3.ino.hex
Flash usage: 29 kiB (11.1%)
Uploading...
Sending reset command
 
Koromix: Don't let the features Creep you out - what you have released is stable as I use it and it is impressive! As perfect as Teensy is - TYQT fills what would be a HUGE HOLE in Arduino Usage where the IDE falls well short in talking to the one/more Teensy's and a good stable Serial Monitor even on a single Teensy!

I'm not sure where DEBUG interface is on the horizon - or what it will need as far as a GUI component on the PC - but if appropriate and PJRC could expose or piggyback it on TYQT unit ID and communications it would start from a good place.
 
and this...

This is a good quote, but I've also seen many small softwares turn to feature creep once they have reached maturity. Happens with toy projects (which this project is), because it's hard to just stop... toying :)

Worked on my Win 10 install of IDE 1.6.7 with Teensy 1.27b2. Had to do the 'Integrate' then restart the IDE.

Note: like the standard upload - it takes the one it sees as 'first' when you do 'upload' with multiple active Teensy units. To pick a specific unit as always do 'VERIFY' - then requires Button press or from TYQT GUI click 'Bootloader'.

Yeah I should add instructions to the integration dialog. It works differently than Teensy Loader:
- Verify is not special and just compiles the project, like it does with Arduino boards.
- Upload sends the firmware to the board that last used it. If no board is known to use it (first upload), it shows a selection dialog unless there is only one Teensy plugged in, in which case it is selected.

The point of this is to work on multiple sketches in parallel. Click Upload, and TyQt sends the firmware to the board you chose on first upload. I used the IDE port choice at first... it kinda works, but is very confusing wrt to non-serial modes. So I dropped that.

Koromix: Don't let the features Creep you out - what you have released is stable as I use it and it is impressive! As perfect as Teensy is - TYQT fills what would be a HUGE HOLE in Arduino Usage where the IDE falls well short in talking to the one/more Teensy's and a good stable Serial Monitor even on a single Teensy!

I'm not sure where DEBUG interface is on the horizon - or what it will need as far as a GUI component on the PC - but if appropriate and PJRC could expose or piggyback it on TYQT unit ID and communications it would start from a good place.

Well I have at least one faithful user :) I got 141 downloads for 0.6.4 which is not that bad considering how niche this tool is. Considering DEBUG, depending on how it works it is certainly something I hope to replicate in TyQt when it is available.
 
AWESOME INDEED KOROMIX - I did not try the multiple Teensy UPLOAD - IT WORKS!

Opened sketch for 2nd Teensy - it came up with DIALOG asking WHICH. I picked the right one and that is where it went!

I returned to the other open IDE and it asked as well - the first time.

In windows seeing the USB hub connect device string is a bit long - not that I have the COM# memorized either - but seeing just that might be clearer in the GUI and the IDE dialog. On Windows the IDE just references the COM# in port list (for now all is well - the names are consistent with TYQT reference).

I did get this odd "I/O Error" feedback:
Low memory available, stability problems may occur.
Waiting for user selection
Uploading to board '1253740@usb-1-1-3-3' (Teensy)
Triggering board reboot
Firmware: TeensyLogicAnalyzer.ino.hex
Flash usage: 15 kiB (5.6%)
Uploading...
I/O error while writing to '\\.\HID#VID_16C0&PID_0478#8&30268D6B&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'
I/O error while writing to '\\.\HID#VID_16C0&PID_0478#8&30268D6B&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'
I/O error while writing to '\\.\HID#VID_16C0&PID_0478#8&30268D6B&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'
Sending reset command

versus this:
Waiting for user selection
Uploading to board '1245170@usb-1-1-3-4-1' (Teensy)
Triggering board reboot
Firmware: ColorButtonsMark3.ino.hex
Flash usage: 29 kiB (11.1%)
Uploading...
Sending reset command
 
You can see I'm on vacation... Well, theoretically I have a lot of important work-related stuff to do, but it happens to be boring. So instead I made new status icons for TyQt, along with a few UI improvements :) It is available in the new pre-release TyQt-0.6.3-222-gdef7db2.

tyqt-status-icons.png

In windows seeing the USB hub connect device string is a bit long - not that I have the COM# memorized either - but seeing just that might be clearer in the GUI and the IDE dialog. On Windows the IDE just references the COM# in port list (for now all is well - the names are consistent with TYQT reference).

The point of the "usb-?-?" string is that it is the same regardless of the board mode. The COM port is only valid in serial mode, and means nothing when the board is running the bootloader, which is exposed as an HID device with a long path like "\\?\hid#vid_...". TyQt recognizes it is the same device because it is on the same USB port, and has the same serial number.

I did get this odd "I/O Error" feedback:

It is harmless and happens when the Teensy is busy writing the last firmware chunk sent. TyQt simply retries until the Teensy responds. Still, this message is now hidden in the pre-release TyQt-0.6.3-222-gdef7db2.
 
Good work Koromix! Indeed: you "have at least one faithful user" - Anyone with multiple active Teensy units - or doing much work where USB debug or 'reset' is part of the process would be well served knowing about TYQT improvements to using the Arduino IDE alone.

I noticed that TeensyLoader is not actually involved, which explains among other things explains the "I/O Error" feedback, and owning the device for HID too, not just USB COM. For debug purposes - like TeensyLoader 'Verbose' someday it might be nice to expose a 'verbose' event log of the interaction per device?

Works with two open IDE's and each works as expected! The only ODD thing is now hitting 'Bootloader' - it still defers to TeensyLoader which isn't active? I would expect that when the session is started by the IDE - and TYQT did the 'firmware' upload the path to the HEX file would be remembered and TYQT might attempt to Upload the code again? Instead the 'House' icon just gets grayed and the device goes 'offline' to program mode?

I'm wondering what tool I'll use when it comes to ESP8266 units on my disconnected Teensy's? It would be cool if you could emulate the USB serial interface from a given 'network' device IP address.
 
Works with two open IDE's and each works as expected! The only ODD thing is now hitting 'Bootloader' - it still defers to TeensyLoader which isn't active? I would expect that when the session is started by the IDE - and TYQT did the 'firmware' upload the path to the HEX file would be remembered and TYQT might attempt to Upload the code again? Instead the 'House' icon just gets grayed and the device goes 'offline' to program mode?

It works this way on purpose. Putting the board in bootloader mode and leaving it there can be used as a poor man's pause mode :) I didn't know what icon to use when I put that in... A "stop" icon maybe? Probably not a "pause" icon because it's confusing, you don't expect pause to reset the board.

I probably need to think a little about the toolbar. And maybe add tooltips to explain the various actions.

I'm wondering what tool I'll use when it comes to ESP8266 units on my disconnected Teensy's? It would be cool if you could emulate the USB serial interface from a given 'network' device IP address.

That's something to look at, but free time may be an obstacle for now :/
 
Adding OTA SerMon IP support would be awesome and certainly not a primary need for many - my first guess at a solution for now is the REMOTE ESP teensy has a paired ESP Teensy on USB that just acts as a go between. Though it could be handy when PJRC starts working on OTA Teensy programming.

Having the Bootloader button take the Teensy offline for Teensyloader seems like a good option. It seems like a new Icon for IDE_RE_UPLOAD would be appropriate with your new feature. I did just note that "Ctrl + U" : UPLOAD does in fact perform the "IDE_RE_UPLOAD" of the active - and this works until the IDE is closed.

<edit> Opening my eyes seeing a button I didn't use before - the UPLOAD ARROW does indeed provide this 'suggested' functionality!

Keep up the Good work!
 
Last edited:
Koromix - Since you upload from IDE now - and ( I assume ) have the 'TEMP' HEX path at hand. A useful feature on the new UPLOAD dropdown could be SAVE_TO? That would make archival easy and allow re-use after the IDE closes or dumps the TEMP folder. Way better than having the user search out the file manually.
 
Very easy to add, but I think it's redundant with Arduino's "Export Compiled Binary" feature, which is available in the Sketch menu. It exports the HEX file to the sketch's folder.
 
:) - now you've made TeensyLoader obsolete - I thought the IDE was next? I guess I did use that once (was a pain as it was FrankB's OTA upload to SD card testing and I had to do it for 3 sketches from 3 folders)- may not be any easier for user to find the UI save it in TYQT - but since the upload points to TYQT I'd just save it there - maybe in a HEX folder.

Okay I'm having a real issue this time - hinted at the other day:
New feature of IDE UPLOAD makes using TYQT Tough/counterproductive:
> Teensy 1 : running a sketch to put data on pins, would like serial monitor to see USB output
> Teensy 2 : running TeensyLogicAnalyzer to look at pin data from Teensy 1

Using TYQT for IDE Uploads ( WAY COOL! ) - connects to each Teensy in a most awesome way.

Any active instance of TYQT will FIND all active Teensy's and OWN the USB connection

Problem: Teensy 2's TeensyLogicAnalyzer uses the USB port to acquire data

Solution?: Make a HID only setting for specified Teensy - this means you get to make another cool ICON TOO!

WorkAround: Disable IDE using TYQT, return to IDE Verify and TeensyLoader for Button upload and use IDE SerMon for Teensy 1 SerMon
>> NOTE 1.6.7 SerMon is HORRID on Win 10. It always loses the COM port on a button press - so I have to unpower Teensy 2 each time and do IDE UPLOAD because it takes 5 tries to capture the port back and not lose debug data after a button press. And when I don't unplug I lose the analyzer sketch :(

Tougher Workaround: Open and Close TYQT repeatedly to prevent Problem conflicts, never use TYQT Monitor when using the Analyzer

Also minor: To connect the Analyzer I need to know Com# on Windows - I have to find it on INFO page since it is hidden from viewable text strings. But I can't use TYQT for this anyhow.
 
Last edited:
Disconnecting the serial monitor with a button/checkbox is something I've wanted for a while, but I wasn't sure how to do it properly without changing too much code. The main problem is that the "device stays open for the lifetime of the board" assumption runs pretty deep in the not-so-pretty parts of the C code.

But the good news is, I was wrong about the code and it is not so bad :) After playing with it for a few hours this afternoon, I think I've got a pretty good idea on how to add this feature without changing much of it.

The bad news is that I have to go back to work on monday and I've got stuff to finish this week-end, so you may have to wait for the next week-end.
 
Koromix: I'm sure the code is well designed and easy - and least the end result is :) It seems like it should be 'trivial' to just treat a selected 'FOUND' Teensy as one that just wasn't there at USB detection time? Though that 'triviality' may be hard to come by and differentiate an 'ignore USB' Teensy from a 'HID Ready' Teensy as it wasn't something that may fall out naturally.

Don't fret - enjoy the start of the new year. I suffered through my issue and got resolution - and I dislike SerMon more than ever and really look forward to TYQT doing the job!

And I even had to say something less than AWESOME about TYQT: https://forum.pjrc.com/threads/32272-ISR-bug-in-stirplate-design?p=92242&viewfull=1#post92242
 
Well, I could not let go... And I've made it work, it's reliable and not really invasive (the patch is around 200+/100- lines). I'll release it tomorrow because I want to test it under OSX/Windows first but this is how I'm doing it:

tyqt-board-detach.jpg

Basically, there's a "Monitor" button/checkbox which is on by default. If you uncheck it, the monitor is stopped and the device is closed, so it can be opened elsewhere. Just check it back to reopen if possible (a warning is shown otherwise). The various actions (upload, reset, reboot) remain accessible when the monitor is unplugged, although of course if another software owns the device they will fail.

Thanks for "forcing" me to do it, because that's something I've wanted to improve for a while but I didn't have the courage to do it. And it turned out to be way easier than expected :)

Edit: this release is available in the pre-release post.
 
Last edited:
I'd say I'm sorry for twisting your arm - but better to start off the new year being truthful right :) Just glad it didn't hurt your arm or anything!

Looking forward to trying the update! Being able to use TYQT to push code to the LogicAnalyze and use it, even when OFFLINE will be awesome!
 
TyQt fits the way I like to work. I am very excited first that it exists, and second that it is still in active development.
I need to use Arduino 1.0.6 because that is the latest IDE supported by the Adafruit CC3000 library for firmware updates.
a106path.jpg
Looks like the path is different. I think 1.0.6 would be the oldest IDE worth supporting, but it is worth supporting due to the number of old libraries written against it that get broken by later IDEs.
Koromix, Thank you so much for this. You are scratching all the itches I couldn't reach in the Arduino and Teensy area.
 
Thank you, glad it works for you :)

I've started to add support for Arduino 1.0.6, there's nothing complicated. But I have to go back to work tomorrow, do not expect much before next weekend.
 
BTW, All - I tested and loaded this current TYQT 'Pre-Release' version to work perfectly well with the Arduino IDE 1.6.7 as a TeensyLoader replacement - allowing determinate selective loading from multiple IDE instances to multiple Teensy's. Per post #115 :: This version allows the 'MONITOR USB' disable so that it can UPLOAD to any connected Teensy (if not active on USB at that time) - but no longer permanently attach to selected Teensy USB devices to allow other programs to function with them as needed - like the Teensy Logic Analyzer project where CAPTURE data comes to that program over USB - but yet you can monitor the Subject Teensy being analyzed or others over one or more instances of TYQT Serial Monitor!
 
@Koromix: nice work with TYQT ... as you may see in this thread, i've managed to create a little "hack" so I may monitor response curves of the teensys filters in the serial plotter. But as it is a hack and not a stable solution: do you have plans to integrate a (better) plotter in your tool? The main goal will be to have more control, what will be plotted and where ... well, just some immature thoughts ...
 
I can't get TyQt to run under Windows 7. I have installed both the 32-bit and 64-bit versions of 0.6.4 using the msi files and when I open a command window and type 'tyc help', the command window just locks up. Ctrl-c doesn't kill it. Task Manager can't kill it. I have to log off and log on to get rid of the process. tyqt does the same thing.
 
I had tried that one first and it did the same thing. Figured I would try the msi just to be sure. Also just tried the official 0.6.3 release and it does the same.

<edit>:Tried it on another Win7 machine and it works. Hmmm ... something about this machine.
 
Last edited:
Back
Top