Teensy Qt

@Darcy - there is a thread :: Use-Sublime-Text-as-an-Arduino-IDE-replacement

Can you post there with the details and steps you took in SublimeText to execute the Batch file? KurtE started that and I also use SublimeText as my preferred editor.

I don't see 'JOY_L' defined in the Teensy sources - so that is from a 'project' header file? The "File" missing could come from a couple places: 'project' or libraries\SD\SD_t3.h, or libraries\SD\SD.h

If I ( or KurtE etc) can repeat what you are doing the problem might be found. Can you find a simple example from a library in use ( SD ? ) that might show the same trouble?

Maybe it is a relative or other path that fails from where SublimeText launches the .cmd file that needs to be added?
 
TyCommander is Awesome ...

Got a working build with FrankB's CMD file for TyComm under SublimeText posted in above thread: Sublime-Text-as-an-Arduino-IDE-replacement

@FrankB - I made a couple of edits in the 'do not edit' area posted there {RawHid is a bad default - I thought it was failing, but good with :: set usb=serial }
@Darcy - see if my setup is different than yours and helps your code compile.
 
here are some additional settings.. just copy them to the batchfile:
Code:
rem Teensy:
rem -------------
set model=teensy36
rem set model=teensy35
rem set model=teensy31
rem set model=teensyLC

rem !use teensy31 for Teensy 3.2!



rem Speed (MHz):
rem -------------
rem set speed=256
rem set speed=240
rem set speed=192
set speed=180
rem set speed=168
rem set speed=144
rem set speed=120
rem set speed=96
rem set speed=72
rem set speed=48
rem set speed=24
rem no USB:
rem set speed=16
rem set speed=8
rem set speed=4
rem set speed=2

rem USB Type:
rem -------------
set usb=rawhid
rem set usb=serial
rem set usb=audio
rem set usb=serialmidiaudio
rem set usb=mtp
rem set usb=USB_DISABLED

rem Optimize:
rem -------------
set opt=o2std
ren set opt=o3std
rem set opt=o3purestd
rem set opt=o3lto
rem set opt=o3purelto
rem set opt=o1std
rem set opt=o1lto
rem set opt=ogstd
rem set opt=osstd
rem set opt=oslto

rem Keyboard Layout:
rem -------------
set keys=de-de
rem set keys=en-us
 
Last edited:
@Frank and @Darcy - I've added a batch processor to create a Compile.cmd file on the SublimeText thread :: Use-Sublime-Text-as-an-Arduino-IDE-replacement.

Run the TSet.cmd from the ZIP file there and I've tried to provide all the Teensy, speed, optimize, USB options with just 4 key taps - and one to exit the CMD file after a glance at the chosen settings.

RawHid is awful for responsive output … ICK … :)

Frank - hope to see any feedback on that thread so I can update it there. I didn't have to change your base file at all - I just split it in two and insert the settings in the middle - though on top would have worked as well.
 
Thanks for the support, I can't find my problem yet. The examples are working fine, but I had a very cobbled SD/Sdfat/SdFatSDIO code and that seems to be where my problem is so I just need to break it into small pieces and no doubt the light will eventually turn on!

Very likely I am doing something dumb with the way I have arbitrarily split up my sketch into a dozen .inos.
Should I declare my #includes in a particular way that it doesn't matter which order the .inos are read?

I tried a fresh machine and install as part of my test, and one thing that caught me out was:

Code:
FindFirstFile C:\Users\Me\AppData\Local\Arduino15\packages: The system cannot find the file specified.
Code:


I spent an hour trying to work out which files - avrdude or gc++ or whatever should be in this directory..... it eventually clicked that it just needed an empty folder called 'packages' ( that didn't get created in a standard install!)

I will do some more testing tonight and let you know how I get on.

Darcy
 
Hi Koromix, great work on a very useful piece of software. I know this thread is getting old and I'm not sure how active you might still be with the project, but if you have the time here is a question/issue with tycmd specifically.

I have also a QT project of my own that connects to various Arduino devices including Teensys. I've been using the Qt QSerialPort class but I'd like to replace it with tycmd if possible. I am using a pre-compiled version of your tycmd from here. I am using Qt but only to compile my own application, not your code.

It is easy enough to manipulate command-line programs using Qt's QProcess. And in testing this works well for "connecting" to my Teensy (what you call monitor-ing) with tycmd but I'm having an issue getting the serial output from the Teensy read by my Qt application.

I am using Windows 7 x64 for all my testing.

Qt as you know uses "signals and slots" and the way to do this is to connect the readyRead() or readyReadStandardOutput() signals from the tycmd process to a slot within my Qt application that will then handle the output from the Teensy and do whatever, by using readAll() or readAllStandardOutput(). However all I read after connection is the message "Monitoring '123456-Teensy'". So I know the readyRead() signal is getting sent from tycmd for that at least, and that I am able to use readAll() from the tycmd process to parse those characters, but afterwards I get nothing further even though I know my Teensy is spitting out data on the serial port.

If I connect using tycmd manually in a plain old Windows command line window I see the subsequent serial data, so tycmd has no problem receiving it but for some reason tycmd doesn't seem to be raising readyRead() when instantiated through QProcess in Qt.

Here is another strange thing which seems to be a hint. In Qt there are various settings when you create a process, one of which is setChannelProcessMode, which gives options for the output from the process. Typically we want this output to go to the application running the process, but by using the QProcess::ForwardedChannels option I can send the output instead back to the Qt Creator IDE and see it in the debug window instead. Here again the same thing initially seems to happen - after connection I see only the first message "Monitoring '123456 - Teensy'" and I can wait however long I want and none of the transmitted serial data appears. BUT, when I close the running Qt application, now all the accumulated serial data finally gets printed in one large dump to Qt Creator's debug window. So it seems tycmd was sending it all along but it was just getting buffered and never processed, I presume because tycmd is not raising QProcess.readyRead() somehow.

As you can probably tell from the words I've used I only partly know what I'm talking about but I hope I've described the issue clearly. I've looked at tycmd's source code and I'm not seeing what might be the issue, but you are dealing with low level things which are not my expertise.

My hope is that your clear familiarity with Qt might make something stand out to you that hopefully would be an easy fix, or even just point me in the general direction in your source code to what I might need to change.

Thanks in advance for any advice!
 
Thanks luni
Yes I discovered that. Some morning I'm just not to sharp!
I have run a quick test and this tool is outstanding!

Thank you Koromix for all of your hard work and making it available to all of us!

GeckospotNixie
 
@koromix - Thank you again for developing the TyCommander.


A little while ago, I did my attempt to add support for the new Teensy 4.2 :D which is now released.

It would be great if there was an official release that supported this board. The changes I did started from your multiple serial WIP branch. So I just issued a PR back against that branch with what I did.
https://github.com/Koromix/tytools/pull/54

Not sure if I did it the way you would want to do it and/or if that was the best branch to start from. But at a minimum, maybe it is a good starting point.

Thanks again for great stuff!
 
@koromix - Thank you again for developing the TyCommander.
...
Thanks again for great stuff!

@koromix:: +1 for sure! ... Thank you and great stuff!

As for Teensy 4.1 - I've been using TeensyLoader for T_4.1 uploads with TyComm for SerMon - and it is not as nice as normal TyCommander alone.

Doing this from IDE with TeensyLoader open - or Button press - or open TyCommander Ctrl+B to trigger bootloader and having Loader do the programming.

Looked at the private build and something odd - maybe it was still the Multi-USB when T_4.1 was used? so have not been using it :(
 
Just an FYI - My Pull Request with T4.1 support was merged (with some mods) So I believe the new ones up on his Current Builds (I only saw Windows 64 versions up there), appear to work.

At least I was able to use it (after I recovered it from Norton) to program a couple of T4.1s :D
 
Just released 0.9.3 with a fix for Teensyduino 1.54 (thanks to luni and Defragster for the report).

Could a "member +" edit the first post and replace all the text after the screenshots with this:

You can find it on my GitHub page at https://github.com/Koromix/tytools (and the release notes)
The latest release is available here : https://github.com/Koromix/tytools/releases

This way we won't have to update the first post for future releases. Thanks!
 
Thanks again defragster for pointing me to TyCommander. I've got 3 Teensy's plugged in right now and can select which one to update/program and monitor. Awesome. Special thanks to Koromix for his work on this program.
 
Back
Top