Forum Rule: Always post complete source code & details to reproduce any issue!
Page 18 of 18 FirstFirst ... 8 16 17 18
Results 426 to 438 of 438

Thread: Teensy Qt

  1. #426
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,641
    @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?

  2. #427
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,641
    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.

  3. #428
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,243
    Oh, i always use RawHid
    @darcy, have you got it working?

  4. #429
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,243
    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 by Frank B; 12-16-2018 at 08:46 PM.

  5. #430
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,641
    @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.

  6. #431
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    6,243
    great I'll test it this evening

  7. #432
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,641
    Quote Originally Posted by Frank B View Post
    great I'll test it this evening
    I just updated to ver #5 there to provide review of selections and chance to rerun before exit.

    Your Arduino Builder works really well Frank - and spawns to the very nice TyCommander.

  8. #433
    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:

    FindFirstFile C:\Users\Me\AppData\Local\Arduino15\packages: The system cannot find the file specified.
    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

  9. #434
    Junior Member LukeZ's Avatar
    Join Date
    Nov 2014
    Location
    KS
    Posts
    4
    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!

  10. #435
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    10,641
    Still an awesome tool - it just works.

    Great for upload and Serial Monitor for one or more Teensy's.

  11. #436
    Hello All
    Question do I have install tycmd or can I just use the exe file?
    OS Windows 10

    Thank you all
    GeckosopotNixie

  12. #437
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    728
    Just unzip to a convenient place and start the exe

  13. #438
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •