Code Monkey home page Code Monkey logo

tytools's Introduction

You can find these instructions on the official web page.

Overview

TyTools is a collection of independent tools and you only need one executable to use any of them. The Qt-based GUI tools are statically compiled to make that possible.

Tool Type Description
TyCommander Qt GUI (static) Upload, monitor and communicate with multiple boards
TyUploader Qt GUI (static) Simple firmware / sketch uploader
tycmd Command-line
No Qt !
Command-line tool to manage Teensy boards

Download the latest release from GitHub. You can find development builds on koromix.dev.

All the code related to these programs is under public domain, you can do whatever you want with it. See the LICENSE file or unlicense.org for more information.

Use the following links for more information:

Up-to-date binaries are available here:

Source code

This repository does not contain the code of TyTools but only exists as a front. For pratical reasons, I've started using a single repository for all my projects in 2018 because it is easier to manage.

The source code is available here: https://github.com/Koromix/rygel/ (in the src/tytools subdirectory).

Monorepositories have two killer features for me:

  • Cross-project refactoring
  • Simplified dependency management

You can find a more detailed rationale here: https://danluu.com/monorepo/

tytools's People

Contributors

jbliesener avatar koromix avatar kurte avatar tni avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tytools's Issues

MultiSerial uploads to ALL instances

Just found on a T_4.0 with Triple_Serial calling TyCommander when a single T_4.0 is online ( already running Triple_Serial ).
CMD_LINE:: "%TyTools%\TyCommanderC.exe" upload --autostart --wait "%temp1%%sketchname%.%model%.hex"

TyCommand takes the request it seems to program all three of those Teensy interfaces - on the single Teensy.

when the Parallel tasks upload is >1 it tried two attemtps to the same device and fails with Flash left EMPTY
When Parallel is ==1 it then programs the same device 3 times in turn.

Uploading of large files fails

While testing your last version I stumbled over problems uploading large hex files.

The following code generates a large flash image which can be uploaded with the current Teensy.exe but fails to upload with tyCommander.

PROGMEM const char buffer[500 * 1024] = "Hello Buffer\0";
void setup()
{
  while (!Serial);
  Serial.println(buffer);
}
void loop() {}

Error message:

Firmware 'C:\Users\lutz\source\Teensy\TestProject\.vsteensy\build\TestProject.hex' has too many segments

It works nicely if I reduce the buffer size to 400kB. Seems to be limited by 512kB instead of 2MB. Also, the progress bar does strange things during the upload...

Not more than 18 Teensies displayed

Dear Koromix,

I'm working with Robert Archer on his 737 Flight simulator, which uses 27(!) Teensies. The problem is that only 18 show up in tyc list or tyqc, while the log file shows they're all scanned.

Do you have any idea on that?

I thought it might have to do with the number 64 that appears as hash table (htable) size. Tried to increase that to 256, but no change.

Probably has something to do with your hash table implementation, right?

TeensyLog.txt
tyclistout.txt

Problems opening the com port

I'm using TyCommander from a makefile under Win10 which worked perfectly so far. However, since I installed the new version (0.8.8) I get errors complaining that it can't open the COM port (don't have my system here so I can't reproduce the exact error message). Despite the error message it starts the bootloader (but doesn't start downloading). The next upload try works then.
I suspect some timing issue. Looks like the bootloader takes longer for start up (or for show up) than you wait...

I estimate that the error appears at about 80% of the downloads.

On macOS High Sierra / APFS formatted disk, platform.txt is written with wrong path

During the integration procedure, one has to select the path towards the Arduino/Teensyduino installation. Usually, one picks /Applications/Arduino.app. But then, in platforms.txt, it writes a strange path like
tools.teensyloader.cmd.path=/private/var/folders/cq/bj9dgxhj3c50b4xprr6d5qqh0000gn/T/AppTranslocation/35AB90F4-8443-4939-9668-34119873A20A/d/TyCommander.app/Contents/MacOS/TyCommander
which is wrong and will prevent TyCommander from launching after compiling.
Each time, I'm forced to edit platforms.txt manually to set the path to /Applications/TyCommander.app/Contents/MacOS/TyCommander which will make it work.

Would love ability to save Serial data to a log file

It would be great to be able to save Serial data to a log file for easier post-mortem analysis. This could mean saving serial data to a log file as it comes in (that would be the nicest, and would give all the data, even if the buffer has filled and old data is lost in the app), or by selecting Serial>Options>Save to File.

If you get this ability I will test it immediately!

Thanks for a great program!
Bruce Boyes

Output JSON Array Correction.

I am using the JSON output to query and catalog the teensy boards in my project. however the JSON output to PHP array needs formatting before it will be accepted. I also checked the JSON output with a validation tool and It was complaining about the delimiter.

Not an major issue but one that may help others that want error free JSON integration. For those who are stuck you can modify your output by formatting the header, delimiters and footer with your processing code with the following format.

The format I was able to manipulate in PHP and get it to work was to add "[" before and "]" after the JSON output, but also between each teensy detail I also had to replace "} {" with "}, {" (please note the space between } { is a /n new line character)

Example Output from JSON currently is:
$output = '{"action": "add", "tag": "23797840-Teensy", "serial": 23797840, "description": "Teensy MIDI", "model": "Teensy", "location": "usb-1-1-1-3", "capabilities": ["unique", "run", "reboot", "serial"], "interfaces": [["Serial", "/dev/ttyACM0"]]} {"action": "add", "tag": "23797820-Teensy", "serial": 23797820, "description": "Teensy MIDI", "model": "Teensy", "location": "usb-1-1-1-2", "capabilities": ["unique", "run", "reboot", "serial"], "interfaces": [["Serial", "/dev/ttyACM1"]]}';

Changing to this format works with the PHP JSON convert to array and passes JSON validation.

$output = '[{"action": "add", "tag": "23797840-Teensy", "serial": 23797840, "description": "Teensy MIDI", "model": "Teensy", "location": "usb-1-1-1-3", "capabilities": ["unique", "run", "reboot", "serial"], "interfaces": [["Serial", "/dev/ttyACM0"]] }, { "action": "add", "tag": "23797820-Teensy", "serial": 23797820, "description": "Teensy MIDI", "model": "Teensy", "location": "usb-1-1-1-2", "capabilities": ["unique", "run", "reboot", "serial"], "interfaces": [["Serial", "/dev/ttyACM1"]]}]';

Also if there is a single board detected I believe you still want to add "[" before and "]" after the JSON output.

Incredible project! thank you for providing such a great and valuable tool.

Teensy 3.5 and 3.6 support

The loader does not seem to recognize the new 3.6. Would you be able to support it with this great utility?

Multiple Serial Support

Teensy supports now multiple serial ports per device. (Here the corresponding pull request. PaulStoffregen/cores#438). This, of course is a great feature if you need to debug something which uses the normal Serial port for communication with the PC. As can be expected, the current tytools don't support this yet.

I tried it with the following sketch:

void setup()
{
  pinMode(LED_BUILTIN,OUTPUT);
}

void loop()
{
  Serial.printf("Serial %d\r\n", millis());
  SerialA.printf("SerialA %d\r\n", millis());   // Second Port

  digitalWriteFast(LED_BUILTIN,!digitalReadFast(LED_BUILTIN));
  delay(500);
}

Which works nicely. Both ports appear in Win10 and can be connected to with putty. However tytools gets confused. It does show the new ports in the info screen as shown below:

image

COM11 was the original port (not existing anymore) COM 29 and 30 are the two new ones.

But, unfortunately, reprogramming doesn't work. It looks like it looses the Teensy after programming. Probably it doesn't expect changed Ports Numbers?

Here MultiSerial.zip a HEX file with the sketch from above in case you want to give it a quick try. Would love if tytools could support this.

'Send data ...' history include sent "Send File"

Would it be difficult to include in the Send history list 'Send File: xyz.txt'?

In testing I may send a file ... then the same file again … or alternate between multiple files.

It would be handy to have the History list include a "token" to resend the same file - without having to go through hitting the Send Drop down and Send File and select the file each time.

Teensy USB recognition

Hi,

Do you have simple description how I could recognize some USB port as Teensy port and get its serial number as you have? I need that in my delphi application.

Timo

How/where to change logging file name or edit preferences

Hi! Just updated to the latest build 0.8.11-2-g7875dee
How can I change the filename of the logging file? Is there a preferences file somewhere (I have made some feeble attempt to find such)? Thanks for a really helpful program!

TD 1.42 Beta 5

PJRC released 1.42 beta 5 - with correction for the T_3.5. Also this addition might be useful for TyCommander - hopefully it won't break anything … downloaded but not installed/tested.

"This beta puts info about which chip was used in the USB BCD version number, so the Ports menu can show which Teensy you're using even if it hasn't yet seen the board go into bootloader mode."

Also added : https://forum.pjrc.com/threads/52315-Teensyduino-1-42-Beta-5?p=179367&viewfull=1#post179367

TyQT uses wrong name for upload file

Using Linux Mint most recent version. Ty looking for filename:
/home/ralph/ty-master/build/linux/tyqt upload --autostart --wait --multi /tmp/arduino_build_648198/effects-12.25d.ino.TEENSY31.hex
But Teensy compiler iDE makes:
/home/ralph/ty-master/build/linux/tyqt upload --autostart --wait --multi /tmp/arduino_build_648198/effects-12.25d.ino.hex
It worked one time, but now does not. How do you de-integrate this from Arduino and Teensy IDE?

Faster Serial Monitor code for T4

The Teensy 4 Serial USB at 480 Mbps is capable of 300K+ lines per second now versus about 27K from a T_3.6 to Windows. Paul is going to come up with more speed at some point - but he got the SerMon in IDE up to steady 250K. And TyCommander Sermon is about 150K and swings more as it does the logging and buffer swap.

Not that it directly relates - but he posted on the Blog the way he does the buffering - giving some size info and what he went through in the IDE to get to that.

Where his lines were about 32 chars - that is 8 MB/sec - so at those speeds even logging direct to disk may bottleneck at times.

Teensy 3.5 Compatibility

I'm trying to load some code built for Teensy 3.5 into a Teensy 3.5, but tyCommander is saying it is compatible only with Teensy 3.1 and 3.2. Teensy loader does it just fine.

Is there something I need to set?

Browsing to hex file

Couple of improvements:

  1. Add a recently used pulldown to the hex file list in the settings window
  2. If a hex file is already selected, default to that directory when opening the Browse window

Binary output in display - causes clipboard issues with cut and paste

I have had a few instances recently where, some text was output that was displayed in the text output output window.

I then try to do a select all command and then a copy. When I go to some other window (like sublime text) window, and try to do a paste. Either the clipboard was not updated at all with the COPY command in Tycommander or a subset of the text is on the clipboard.

I am not sure yet what characters are causing the issue, but it has happened several times.

I am running 0.8.8-7-g0c123c2 on a Windows 10 64 bit machine.

Kurt
P.S. - Great tool!

Teensy :: _teensy_model_identifier

I just discovered that the .ld files posted for Teensy include the _teensy_model_identifier used to identify what Teensy is connected?

For T_4.0: T:\arduino-1.8.12\hardware\teensy\avr\cores\teensy4\imxrt1062.ld
_teensy_model_identifier = 0x24;

For unreleased T_4.1: T:\arduino-1.8.12\hardware\teensy\avr\cores\teensy4\imxrt1062_t41.ld
_teensy_model_identifier = 0x25;

If TyTools could recognize { for Serial connect only until after release } it would be properly identified and handled for Serial Monitoring when the T_4.1 releases.

GUI feature proposal

Hi, this tool is really cool and much better than the lame Arduino GUI / Terminal.

I'd propose 2 small features, as I don't have that much clue with Qt GUI programming.

  1. Store the last state of the line ending in serial mode (or set a default value in the Option dialog)
  2. Store the last position and window size.

Or a hint in which files where to look, so maybe I'll try it on the weekend or so ...

Cheers

Serial Number is not unique

V9.0

Sorry for reporting another (really small) issue:

After starting TyCommander I often (always?) get the following error for my USB Cable;

image
The information tab shows ? in the serial number field and "_-Unknown" as identity. After power cycling the cable, the serial number (00001) is found and everything works as expected

To exclude a problem with the cable I checked the device manager while TyCommander is in the state where it doesn't find the serial number. It shows.
image

Which seems to be OK.

Looks like a glitch in correctly detecting the device at startup of TyCommander.

IHEX parse error

Windows 10, TyTCommander Version 0.8.8

I get the following parse error for the attached hex file.

parse error

Uploading the corresponding .elf file (attached) works however. Teensy.exe uploads the hex without problems. I also recompiled, added changes to the code, rebooted computer... The error seems to be quite stable. Other hex files work as usual.

usbhost.zip

Send window filled with previous input

The 'send' window at the bottom of the Serial window gets filled with the previous input as soon as any character is entered. For instance, entering the character '-' causes the send window to show '-200' as '200' was the last entered string. These characters are overwritten one at a time by the new input, but if the new send string is shorter than the previous ones, the remaining characters from the previous string are sent with the new ones. In the example where the previous input was '200', then an input of '-10' becomes '-100', and the '-100' is what gets sent.

Annotation 2020-06-03 084524

In the above image, I typed '-' into the 'Send' box.

Frank

tycmd list does not show Teensy submodel

On your readme you define that tycmd list should show:
add 34130@usb-1-2 Teensy 3.1
add 29460@usb-4-2 Teensy

for me it shows just:
add 1241320-Teensy Teensy (USB Serial)
add 3677880-Teensy Teensy (USB Serial)

TyCommander shows right Teensy 3.6 or Teensy 3.2.

Should tycmd also show submodel 3.x?

Support for 'generic Serial' devices

This is working well - with minor issues:

  • The device I'm using goes offline for some time and is dropped some 1 to 5 seconds before it comes back online so prior text is lost and I need to reselect and serial enable, Would be nice to have a settable timeout.

  • FTDI adapter is found by the IDE, but not TyCommander

  • Alternate devices report a unique serial# - not in the Teensy style, but it would be great if the serial # was treated as unique for 'Options' storage, and logging of Serial data to a file.

  • Would be handy if 'Generic' device would denote the COM# on the device info tab as that ties to the IDE port identification.

switch through serial history with up/down arrow keys

It would be awesome if there was a possibility to switch between the last entered serial commands from the history with the arrow keys. So you wont have to grab the mouse if you are entering lots of commands.

Btw this is really awesome! I'm currently using 8 different teensys and this tools make it sooo much easier!
Thanks!

TYQT Crashes on start

There seems to be a conflict with my MSI Motherboard onboard USB drivers. It uses Asmedia drivers. I had the same issue on an ASUS MB that was using Asmedia USB drivers. I also see the problem if VIA USB drivers are present. If I disable these then TYQT will start and work but I lose many of my usb ports in the process. Can you please look into what might be causing the problem. I am using the latest version 8 of TYQT. I am a friend of Rob A and Jorg B and a cockpit builder building a 737-200 similiar to Rob's. I will be using upwards of 20 Teensys so your program is much needed and much appreciated.

Here is the error in the crash:
Problem signature:
Problem Event Name: APPCRASH
Application Name: TyQt.exe
Application Version: 0.0.0.0
Application Timestamp: 581e0930
Fault Module Name: TyQt.exe
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 581e0930
Exception Code: c0000005
Exception Offset: 0000000000d31480
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: aa8b
Additional Information 2: aa8b8565f92a21edea6add95009a38df
Additional Information 3: 28ac
Additional Information 4: 28ac02407e34c72c3170e7d5d407e38b

In order to get TYQT to load I have to disable the below drivers circled in Red
image

Thank you,
Scott Wegner

Suggestion for improvement

Not an issue, but a suggestion for an improvement : Put the board names as defined in ty/board_teensy.c in the ty_board_model.name struct into an external (ini, cnf or plist or whatsoever) file which is read at runtime, so that on might give custom names to the one or the other board without re-compiling the TyQt app.

What is the real current version?

Thanks again for a great program! I have been using it steadily for the last two years with (at the lab) multiple Teensy 3.2 connected, running 24/7 stress tests. I'm using on WIndows 10 and Ubuntu and a customer is also using it at their manufacturing facility to load code onto systems in the final mfg steps. So recently I updated their systems to 0.8.10 using the Win64 msi, and the exe reports 0.8.10.

Then on Linux I built from Git source after a fresh master pull, which has the Sep 23 comment about version as 0.8.10 but TyCommander and tycmd say 0.8.8-33-g5c39966, so how do I get 0.8.10?

Teensy Bootloader Change

At least in the Teensy 4 during programming the TeensyLoader passes the current system time to the RTC setting it at the time of programming.

The old hard to replicate across build systems mechanism of stuffing 'compile time' in the is not used on the T4. Assuming this will carry over to the T_3.x family with RTC's ?

Tytools will need to replicate this mechanism.

Baudrate for USB Serial Cables

In cases where I can not use the native Teensy USB Serial (e.g. when I use it to communicate to a PC program) I usually connect a FTDI USB-Serial cable to Serial1 for debugging.
Since tyCmd is able to connect to the FTDI I would like to use its serial monitor for debugging.

However, it looks like it doesn't detect the baud rate correctly.

image

After I connect the cable to putty, set the correct baudrate and quit putty, it works in tyCmd as well:

image

Any chance to add baudrate setting / autodetect to generic boards?

0.9.0 warnings building on Ubuntu 18.04

While building got a couple of warnings, FYI:

[ 25%] Building C object src/libty/CMakeFiles/libty.dir/class_teensy.c.o
/home/bruce/Documents/code/tytools/src/libty/class_teensy.c: In function ‘teensy_upload’:
/home/bruce/Documents/code/tytools/src/libty/class_teensy.c:698:62: warning: pointer targets in passing argument 3 of ‘ty_firmware_extract’ differ in signedness [-Wpointer-sign]
         buf_len = ty_firmware_extract(fw, (uint32_t)address, buf, block_size);
                                                              ^~~
In file included from /home/bruce/Documents/code/tytools/src/libty/class_teensy.c:18:0:
/home/bruce/Documents/code/tytools/src/libty/firmware.h:65:8: note: expected ‘uint8_t * {aka unsigned char *}’ but argument is of type ‘char *’
 size_t ty_firmware_extract(const ty_firmware *fw, uint32_t address, uint8_t *buf, size_t size);
        ^~~~~~~~~~~~~~~~~~~

Missing property 'PortNum' for USB device

Trying to run tyc (or TyQT) on my mac running El Capitan (probably root of the problem), I get a Missing property 'PortNum' for USB device error both on tyc list and in TyQT, when plugging Teensies in. They show up fine on the list of /dev/tty ports. Any ideas?

TyTools 0.8.6 - error/unable to program a HEX file in Linux for Teensy 3.2

Hi

I am using Teensy 3.2 and have downloaded and compiled TyTools 0.8.6 under Ubuntu 16.

Whenever I try to upload a file I get the error "Firmware .... is only compatible with Teensy 3.1 and 3.2"
However I do have a Teensy 3.2 connected! So it should allow the programming.

From looking at the GUI it seems the board is being recognized as "Teensy" only. I attach a screenshot of the issue.

I tested programming the board using Windows 7 and a much older version (TyQT 0.7.5) and it shows up correctly as Teensy 3.2 and allows programming using the same HEX file.

Therefore I am inclined to believe this to be a bug.

Can you please advise?

Thank you

capture

T4 doesn't work

Just tried using TyCommander with T4 which didn't work. Any plans to update?

Tycmd compatibility with Unity3D

I was able to get some position data printed on tycmd. Is there a way to integrate that data into unity3D?
I have tried with a c# code. But the problem occurs when both Tycmd and Unity accessing the same port.
Please help me in solving this problem. Thank you!!!

Generic Reboot:

Wondering if there might be a way to expose this value of '1200' versus Teensy's reboot value for a generic device? And then do that toggle for reset?

This line below from IDE build: Forcing reset using 1200bps open/close on port COM36
------> IDE Board Info
BN: Adafruit Feather Bluefruit Sense
VID: 239A
PID: 8087
SN: DDF154F73969DFDD

------> TyCommander info:
TyC_ID: DDF154F73969DFDD-Adafruit_LLC
TyC_ Desc: Feather nRF52840 Sense
TyC_ Model: Generic

------> IDE console output
Sketch uses 38076 bytes (4%) of program storage space. Maximum is 815104 bytes.
Global variables use 6764 bytes (2%) of dynamic memory, leaving 230804 bytes for local variables. Maximum is 237568 bytes.
Forcing reset using 1200bps open/close on port COM36

Cross-compile time problems

Compilation for linux works fine:

$ git clone https://github.com/Koromix/ty.git
Cloning into 'ty'...
remote: Counting objects: 720, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 720 (delta 10), reused 0 (delta 0)
Receiving objects: 100% (720/720), 188.21 KiB | 221.00 KiB/s, done.
Resolving deltas: 100% (516/516), done.
Checking connectivity... done.
[jbliesener@jb-desktop2 ty]$ mkdir -p build/linux
[jbliesener@jb-desktop2 ty]$ cd build/linux/
[jbliesener@jb-desktop2 linux]$ cmake ../..
-- The C compiler identification is GNU 4.9.2
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.28") 
-- checking for module 'libudev'
--   found libudev, version 217
-- Looking for stpcpy
-- Looking for stpcpy - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for getdelim
-- Looking for getdelim - found
-- Looking for getline
-- Looking for getline - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jbliesener/src/ty/build/linux
[jbliesener@jb-desktop2 linux]$ make
Scanning dependencies of target ty
[  2%] Building C object CMakeFiles/ty.dir/src/board.c.o
[  5%] Building C object CMakeFiles/ty.dir/src/board_teensy.c.o                                         
[  8%] Building C object CMakeFiles/ty.dir/src/common.c.o                                               
[ 11%] Building C object CMakeFiles/ty.dir/src/compat.c.o                                               
[ 14%] Building C object CMakeFiles/ty.dir/src/device.c.o                                               
[ 17%] Building C object CMakeFiles/ty.dir/src/firmware.c.o                                             
[ 20%] Building C object CMakeFiles/ty.dir/src/firmware_ihex.c.o                                        
[ 22%] Building C object CMakeFiles/ty.dir/src/htable.c.o                                               
[ 25%] Building C object CMakeFiles/ty.dir/src/ini.c.o                                                  
[ 28%] Building C object CMakeFiles/ty.dir/src/system.c.o                                               
[ 31%] Building C object CMakeFiles/ty.dir/src/process_unix.c.o                                         
[ 34%] Building C object CMakeFiles/ty.dir/src/system_unix.c.o                                          
[ 37%] Building C object CMakeFiles/ty.dir/src/system_linux.c.o                                         
[ 40%] Building C object CMakeFiles/ty.dir/src/device_linux.c.o                                         
[ 42%] Building C object CMakeFiles/ty.dir/src/device_unix.c.o                                          
Linking C shared library libty.so
[ 42%] Built target ty
Scanning dependencies of target ty_static
[ 45%] Building C object CMakeFiles/ty_static.dir/src/board.c.o
[ 48%] Building C object CMakeFiles/ty_static.dir/src/board_teensy.c.o                                  
[ 51%] Building C object CMakeFiles/ty_static.dir/src/common.c.o                                        
[ 54%] Building C object CMakeFiles/ty_static.dir/src/compat.c.o                                        
[ 57%] Building C object CMakeFiles/ty_static.dir/src/device.c.o                                        
[ 60%] Building C object CMakeFiles/ty_static.dir/src/firmware.c.o                                      
[ 62%] Building C object CMakeFiles/ty_static.dir/src/firmware_ihex.c.o                                 
[ 65%] Building C object CMakeFiles/ty_static.dir/src/htable.c.o                                        
[ 68%] Building C object CMakeFiles/ty_static.dir/src/ini.c.o                                           
[ 71%] Building C object CMakeFiles/ty_static.dir/src/system.c.o                                        
[ 74%] Building C object CMakeFiles/ty_static.dir/src/process_unix.c.o                                  
[ 77%] Building C object CMakeFiles/ty_static.dir/src/system_unix.c.o                                   
[ 80%] Building C object CMakeFiles/ty_static.dir/src/system_linux.c.o                                  
[ 82%] Building C object CMakeFiles/ty_static.dir/src/device_linux.c.o                                  
[ 85%] Building C object CMakeFiles/ty_static.dir/src/device_unix.c.o                                   
Linking C static library libty_static.a
[ 85%] Built target ty_static
Scanning dependencies of target tyc
[ 88%] Building C object CMakeFiles/tyc.dir/cli/list.c.o
[ 91%] Building C object CMakeFiles/tyc.dir/cli/main.c.o                                                
[ 94%] Building C object CMakeFiles/tyc.dir/cli/monitor.c.o                                             
[ 97%] Building C object CMakeFiles/tyc.dir/cli/reset.c.o                                               
[100%] Building C object CMakeFiles/tyc.dir/cli/upload.c.o                                              
Linking C executable tyc
[100%] Built target tyc

Cross compiling for windows seems to miss some header files:

[jbliesener@jb-desktop2 linux]$ cd ../..
[jbliesener@jb-desktop2 ty]$ mkdir -p build/win32 && cd build/win32
[jbliesener@jb-desktop2 win32]$ cmake -DCMAKE_TOOLCHAIN_FILE=../../contrib/cmake/i686-w64-mingw32.cmake ../..
-- The C compiler identification is GNU 4.9.1
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc
-- Check for working C compiler: /usr/bin/i686-w64-mingw32-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE  
-- Looking for stpcpy
-- Looking for stpcpy - not found
-- Looking for strndup
-- Looking for strndup - not found
-- Looking for asprintf
-- Looking for asprintf - found
-- Looking for getdelim
-- Looking for getdelim - not found
-- Looking for getline
-- Looking for getline - not found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jbliesener/src/ty/build/win32
[jbliesener@jb-desktop2 win32]$ make
Scanning dependencies of target ty
[  3%] Building C object CMakeFiles/ty.dir/src/board.c.obj
[  6%] Building C object CMakeFiles/ty.dir/src/board_teensy.c.obj                                       
[  9%] Building C object CMakeFiles/ty.dir/src/common.c.obj                                             
[ 12%] Building C object CMakeFiles/ty.dir/src/compat.c.obj                                             
[ 16%] Building C object CMakeFiles/ty.dir/src/device.c.obj                                             
[ 19%] Building C object CMakeFiles/ty.dir/src/firmware.c.obj                                           
[ 22%] Building C object CMakeFiles/ty.dir/src/firmware_ihex.c.obj                                      
[ 25%] Building C object CMakeFiles/ty.dir/src/htable.c.obj                                             
[ 29%] Building C object CMakeFiles/ty.dir/src/ini.c.obj                                                
[ 32%] Building C object CMakeFiles/ty.dir/src/system.c.obj                                             
[ 35%] Building C object CMakeFiles/ty.dir/src/process_win32.c.obj                                      
[ 38%] Building C object CMakeFiles/ty.dir/src/system_win32.c.obj                                       
[ 41%] Building C object CMakeFiles/ty.dir/src/device_win32.c.obj                                       
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:52:3: error: unknown type name 'USAGE'
   USAGE Usage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:53:3: error: unknown type name 'USAGE'
   USAGE UsagePage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:57:3: error: unknown type name 'USAGE'
   USAGE UsagePage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:62:3: error: unknown type name 'USAGE'
   USAGE LinkUsage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:63:3: error: unknown type name 'USAGE'
   USAGE LinkUsagePage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:71:7: error: unknown type name 'USAGE'
       USAGE UsageMin, UsageMax;
       ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:77:7: error: unknown type name 'USAGE'
       USAGE Usage, Reserved1;
       ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:86:3: error: unknown type name 'USAGE'
   USAGE UsagePage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:91:3: error: unknown type name 'USAGE'
   USAGE LinkUsage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:92:3: error: unknown type name 'USAGE'
   USAGE LinkUsagePage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:108:7: error: unknown type name 'USAGE'
       USAGE UsageMin, UsageMax;
       ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:114:7: error: unknown type name 'USAGE'
       USAGE Usage, Reserved1;
       ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:123:3: error: unknown type name 'USAGE'
   USAGE LinkUsage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:124:3: error: unknown type name 'USAGE'
   USAGE LinkUsagePage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:136:3: error: unknown type name 'USAGE'
   USAGE Usage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:137:3: error: unknown type name 'USAGE'
   USAGE UsagePage;
   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:203:16: error: expected ',' or ';' before 'HidP_GetCaps'
 NTSTATUS NTAPI HidP_GetCaps (PHIDP_PREPARSED_DATA PreparsedData, PHIDP_CAPS Capabilities);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:204:16: error: expected ',' or ';' before 'HidP_GetLinkCollectionNodes'
 NTSTATUS NTAPI HidP_GetLinkCollectionNodes (PHIDP_LINK_COLLECTION_NODE LinkCollectionNodes, PULONG LinkCollectionNodesLength, PHIDP_PREPARSED_DATA PreparsedData);
                ^
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:205:16: error: expected ',' or ';' before 'HidP_GetSpecificButtonCaps'
 NTSTATUS NTAPI HidP_GetSpecificButtonCaps (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:206:16: error: expected ',' or ';' before 'HidP_GetButtonCaps'
 NTSTATUS NTAPI HidP_GetButtonCaps (HIDP_REPORT_TYPE ReportType, PHIDP_BUTTON_CAPS ButtonCaps, PUSHORT ButtonCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:207:16: error: expected ',' or ';' before 'HidP_GetSpecificValueCaps'
 NTSTATUS NTAPI HidP_GetSpecificValueCaps (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:208:16: error: expected ',' or ';' before 'HidP_GetValueCaps'
 NTSTATUS NTAPI HidP_GetValueCaps (HIDP_REPORT_TYPE ReportType, PHIDP_VALUE_CAPS ValueCaps, PUSHORT ValueCapsLength, PHIDP_PREPARSED_DATA PreparsedData);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:209:16: error: expected ',' or ';' before 'HidP_GetExtendedAttributes'
 NTSTATUS NTAPI HidP_GetExtendedAttributes (HIDP_REPORT_TYPE ReportType, USHORT DataIndex, PHIDP_PREPARSED_DATA PreparsedData, PHIDP_EXTENDED_ATTRIBUTES Attributes, PULONG LengthAttributes);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:210:16: error: expected ',' or ';' before 'HidP_InitializeReportForID'
 NTSTATUS NTAPI HidP_InitializeReportForID (HIDP_REPORT_TYPE ReportType, UCHAR ReportID, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:211:16: error: expected ',' or ';' before 'HidP_SetData'
 NTSTATUS NTAPI HidP_SetData (HIDP_REPORT_TYPE ReportType, PHIDP_DATA DataList, PULONG DataLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:212:16: error: expected ',' or ';' before 'HidP_GetData'
 NTSTATUS NTAPI HidP_GetData (HIDP_REPORT_TYPE ReportType, PHIDP_DATA DataList, PULONG DataLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:214:16: error: expected ',' or ';' before 'HidP_SetUsages'
 NTSTATUS NTAPI HidP_SetUsages (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:215:16: error: expected ',' or ';' before 'HidP_UnsetUsages'
 NTSTATUS NTAPI HidP_UnsetUsages (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:216:16: error: expected ',' or ';' before 'HidP_GetUsages'
 NTSTATUS NTAPI HidP_GetUsages (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, PUSAGE UsageList, PULONG UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:217:16: error: expected ',' or ';' before 'HidP_GetUsagesEx'
 NTSTATUS NTAPI HidP_GetUsagesEx (HIDP_REPORT_TYPE ReportType, USHORT LinkCollection, PUSAGE_AND_PAGE ButtonList, ULONG *UsageLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:218:67: error: unknown type name 'USAGE'
 ULONG NTAPI HidP_MaxUsageListLength (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, PHIDP_PREPARSED_DATA PreparsedData);
                                                                   ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:219:16: error: expected ',' or ';' before 'HidP_SetUsageValue'
 NTSTATUS NTAPI HidP_SetUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, ULONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:220:16: error: expected ',' or ';' before 'HidP_SetScaledUsageValue'
 NTSTATUS NTAPI HidP_SetScaledUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, LONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:221:16: error: expected ',' or ';' before 'HidP_SetUsageValueArray'
 NTSTATUS NTAPI HidP_SetUsageValueArray (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PCHAR UsageValue, USHORT UsageValueByteLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:222:16: error: expected ',' or ';' before 'HidP_GetUsageValue'
 NTSTATUS NTAPI HidP_GetUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PULONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:223:16: error: expected ',' or ';' before 'HidP_GetScaledUsageValue'
 NTSTATUS NTAPI HidP_GetScaledUsageValue (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PLONG UsageValue, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:224:16: error: expected ',' or ';' before 'HidP_GetUsageValueArray'
 NTSTATUS NTAPI HidP_GetUsageValueArray (HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USHORT LinkCollection, USAGE Usage, PCHAR UsageValue, USHORT UsageValueByteLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:225:16: error: expected ',' or ';' before 'HidP_UsageListDifference'
 NTSTATUS NTAPI HidP_UsageListDifference (PUSAGE PreviousUsageList, PUSAGE CurrentUsageList, PUSAGE BreakUsageList, PUSAGE MakeUsageList, ULONG UsageListLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:226:16: error: expected ',' or ';' before 'HidP_UsageAndPageListDifference'
 NTSTATUS NTAPI HidP_UsageAndPageListDifference (PUSAGE_AND_PAGE PreviousUsageList, PUSAGE_AND_PAGE CurrentUsageList, PUSAGE_AND_PAGE BreakUsageList, PUSAGE_AND_PAGE MakeUsageList, ULONG UsageListLength);
                ^
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:227:16: error: expected ',' or ';' before 'HidP_TranslateUsageAndPagesToI8042ScanCodes'
 NTSTATUS NTAPI HidP_TranslateUsageAndPagesToI8042ScanCodes (PUSAGE_AND_PAGE ChangedUsageList, ULONG UsageListLength, HIDP_KEYBOARD_DIRECTION KeyAction, PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, PHIDP_INSERT_SCANCODES InsertCodesProcedure, PVOID InsertCodesContext);
                ^
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:228:16: error: expected ',' or ';' before 'HidP_TranslateUsagesToI8042ScanCodes'
 NTSTATUS NTAPI HidP_TranslateUsagesToI8042ScanCodes (PUSAGE ChangedUsageList, ULONG UsageListLength, HIDP_KEYBOARD_DIRECTION KeyAction, PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, PHIDP_INSERT_SCANCODES InsertCodesProcedure, PVOID InsertCodesContext);
                ^
In file included from /home/jbliesener/src/ty/src/device_win32.c:27:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidsdi.h:31:14: error: 'NTSTATUS' redeclared as different kind of symbol
 typedef LONG NTSTATUS;
              ^
In file included from /home/jbliesener/src/ty/src/device_win32.c:26:0:
/usr/i686-w64-mingw32/sys-root/mingw/include/hidpi.h:228:1: note: previous declaration of 'NTSTATUS' was here
 NTSTATUS NTAPI HidP_TranslateUsagesToI8042ScanCodes (PUSAGE ChangedUsageList, ULONG UsageListLength, HIDP_KEYBOARD_DIRECTION KeyAction, PHIDP_KEYBOARD_MODIFIER_STATE ModifierState, PHIDP_INSERT_SCANCODES InsertCodesProcedure, PVOID InsertCodesContext);
 ^
/home/jbliesener/src/ty/src/device_win32.c:84:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'
 HIDAPI void NTAPI HidD_GetHidGuid(LPGUID HidGuid);
        ^
/home/jbliesener/src/ty/src/device_win32.c:85:1: error: unknown type name 'HIDAPI'
 HIDAPI BOOLEAN NTAPI HidD_GetSerialNumberString(HANDLE device, PVOID buffer, ULONG buffer_len);
 ^
/home/jbliesener/src/ty/src/device_win32.c:85:1: warning: '__stdcall__' attribute only applies to function types [-Wattributes]
/home/jbliesener/src/ty/src/device_win32.c:85:8: error: 'BOOLEAN' redeclared as different kind of symbol
 HIDAPI BOOLEAN NTAPI HidD_GetSerialNumberString(HANDLE device, PVOID buffer, ULONG buffer_len);
        ^
In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/combaseapi.h:153:0,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/objbase.h:14,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/ole2.h:17,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/oledlg.h:26,
                 from /usr/i686-w64-mingw32/sys-root/mingw/include/setupapi.h:27,
                 from /home/jbliesener/src/ty/src/device_win32.c:29:
/usr/i686-w64-mingw32/sys-root/mingw/include/wtypesbase.h:376:17: note: previous declaration of 'BOOLEAN' was here
 typedef boolean BOOLEAN;
                 ^
/home/jbliesener/src/ty/src/device_win32.c:85:22: error: expected ',' or ';' before 'HidD_GetSerialNumberString'
 HIDAPI BOOLEAN NTAPI HidD_GetSerialNumberString(HANDLE device, PVOID buffer, ULONG buffer_len);
                      ^
/home/jbliesener/src/ty/src/device_win32.c:86:1: error: unknown type name 'HIDAPI'
 HIDAPI BOOLEAN NTAPI HidD_GetPreparsedData(HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData);
 ^
/home/jbliesener/src/ty/src/device_win32.c:86:1: warning: '__stdcall__' attribute only applies to function types [-Wattributes]
/home/jbliesener/src/ty/src/device_win32.c:86:22: error: expected ',' or ';' before 'HidD_GetPreparsedData'
 HIDAPI BOOLEAN NTAPI HidD_GetPreparsedData(HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData);
                      ^
/home/jbliesener/src/ty/src/device_win32.c:87:1: error: unknown type name 'HIDAPI'
 HIDAPI BOOLEAN NTAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData);
 ^
/home/jbliesener/src/ty/src/device_win32.c:87:1: warning: '__stdcall__' attribute only applies to function types [-Wattributes]
/home/jbliesener/src/ty/src/device_win32.c:87:22: error: expected ',' or ';' before 'HidD_FreePreparsedData'
 HIDAPI BOOLEAN NTAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData);
                      ^
/home/jbliesener/src/ty/src/device_win32.c: In function 'ty_hid_parse_descriptor':
/home/jbliesener/src/ty/src/device_win32.c:971:5: warning: implicit declaration of function 'HidP_GetCaps' [-Wimplicit-function-declaration]
     ret = HidP_GetCaps(pp, &caps);
     ^
/home/jbliesener/src/ty/src/device_win32.c:976:19: warning: conversion to 'uint16_t' from 'int' may alter its value [-Wconversion]
     desc->usage = caps.Usage;
                   ^
/home/jbliesener/src/ty/src/device_win32.c:977:24: warning: conversion to 'uint16_t' from 'int' may alter its value [-Wconversion]
     desc->usage_page = caps.UsagePage;
                        ^
CMakeFiles/ty.dir/build.make:343: recipe for target 'CMakeFiles/ty.dir/src/device_win32.c.obj' failed
make[2]: *** [CMakeFiles/ty.dir/src/device_win32.c.obj] Error 1
CMakeFiles/Makefile2:60: recipe for target 'CMakeFiles/ty.dir/all' failed
make[1]: *** [CMakeFiles/ty.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

This is Fedora 21 with the latest Mingw version installed. I also downloaded and installed the hidapi package:

jbliesener@jb-desktop2 include]$ yum list installed mingw*
Loaded plugins: auto-update-debuginfo, langpacks
Installed Packages
mingw-binutils-generic.x86_64            2.24-4.fc21                                            installed
mingw-filesystem-base.noarch             99-5.fc21                                              installed
mingw-w64-tools.x86_64                   3.1.999-0.6.trunk.git430863.20140530.fc21              installed
mingw32-binutils.x86_64                  2.24-4.fc21                                            @fedora  
mingw32-cpp.x86_64                       4.9.1-4.fc21                                           @fedora  
mingw32-crossreport.noarch               201406-1.fc21                                          installed
mingw32-crt.noarch                       3.9.999-0.1.trunk.git.b08afb.20140912.fc21             @fedora  
mingw32-filesystem.noarch                99-5.fc21                                              @fedora  
mingw32-gcc.x86_64                       4.9.1-4.fc21                                           @fedora  
mingw32-headers.noarch                   3.9.999-0.1.trunk.git.b08afb.20140912.fc21             @fedora  
mingw32-hidapi.noarch                    0.7.0-4.a88c724.fc21                                   @fedora  
mingw32-nsis.x86_64                      2.46-13.fc21                                           installed
mingw32-pkg-config.x86_64                0.28-4.fc21                                            @fedora  
mingw32-wine-gecko.noarch                2.24-1.fc21                                            installed
mingw32-winpthreads.noarch               3.9.999-0.1.trunk.git.b08afb.20140912.fc21             @fedora  
mingw64-wine-gecko.noarch                2.24-1.fc21                                            installed

USAGE is defined in <hidusage.h>, which is included by <hidsdi.h>, which also includes <hidpi.h> and <winnt.h>, so, simply commenting out #include <hidpi.h> in device_win32.c resolves all errors related to USAGE, NTAPI and NTSTATUS.

However, I was unable to find any definition for HIDAPI in the mingw32 or mingw64 header files... hidsdi.h defines void NTAPI HidD_GetHidGuid (LPGUID HidGuid);, BOOLEAN NTAPI HidD_GetSerialNumberString (HANDLE HidDeviceObject, PVOID Buffer, ULONG BufferLength); and others, but HIDAPI seems to be unknown. This can be resolved with a simple:

#ifdef __MINGW32__
// MinGW may miss these
#ifndef HIDAPI
#define HIDAPI NTAPI
#endif
HIDAPI void NTAPI HidD_GetHidGuid(LPGUID HidGuid);
HIDAPI BOOLEAN NTAPI HidD_GetSerialNumberString(HANDLE device, PVOID buffer, ULONG buffer_len);
HIDAPI BOOLEAN NTAPI HidD_GetPreparsedData(HANDLE HidDeviceObject, PHIDP_PREPARSED_DATA *PreparsedData);
HIDAPI BOOLEAN NTAPI HidD_FreePreparsedData(PHIDP_PREPARSED_DATA PreparsedData);
#endif

I don't want to submit a pull request here, as I don't know if commenting out <hidpi.h> doesn't interfere with your version of MinGW.

VT100 emulation

Hi,

is it possible to add a VT100 emulation ?
This would make TYQT even more valuable, and allows "full screen" menüs and displays in the terminal.

Add compilation using Teensy builder

Hi, if you'd add compilation for projects using the teensy builder (look @ 2. line of output of Arduino-window - very easy!), your tools would be really complete!

One could use any editor and use your tytools to compile&upload the projects.

It would need some menues to choose the teensy-model, speed ..etc - perhaps it could store the stettings in the project directory?

Trying to setup tytools

I am having an issue trying to setup tytools because I need to use tycmd monitor, so I am doing the steps in hacking TyTools and using a mac I do the static Qt build after that's done I make install and everything goes fine with the qt build but then when I try to do cmake ../.. the follow:

amrs-mbp:darwin MiamoorZ$ cmake ../..
CMake Error at lib/qt5/x86_64-darwin-clang/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:15 (message):
The imported target "Qt5::Core" references the file

 "/Users/MiamoorZ/tytools/lib/qt5/x86_64-darwin-clang/../../../Users/MiamoorZ/tytools/lib/qt5/x86_64-darwin-clang//mkspecs/macx-clang"

but this file does not exist. Possible reasons include:

  • The file was deleted, renamed, or moved to another location.

  • An install or uninstall procedure did not complete successfully.

  • The installation package was faulty and contained

    "/Users/MiamoorZ/tytools/lib/qt5/x86_64-darwin-clang/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake"

but not all the files it references.

Call Stack (most recent call first):
lib/qt5/x86_64-darwin-clang/lib/cmake/Qt5Core/Qt5CoreConfigExtras.cmake:50 (_qt5_Core_check_file_exists)
lib/qt5/x86_64-darwin-clang/lib/cmake/Qt5Core/Qt5CoreConfig.cmake:172 (include)
lib/qt5/x86_64-darwin-clang/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:88 (find_package)
lib/qt5/x86_64-darwin-clang/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:88 (find_package)
lib/qt5/x86_64-darwin-clang/lib/cmake/Qt5/Qt5Config.cmake:28 (find_package)
cmake/FindEasyQt5.cmake:50 (find_package)
src/tycommander/CMakeLists.txt:11 (find_package)

-- Configuring incomplete, errors occurred!
See also "/Users/MiamoorZ/tytools/build/darwin/CMakeFiles/CMakeOutput.log".

CMakeOutput.log

tcsetattr() failed on '/dev/cu.usbmodem#####': Invalid argument

I have been getting an error for the last week or two using TyQt on OSX High Sierra (10.13.3) with a Teensy 3.6. I've tried TyQt 0.8.0 and TyCommander 0.8.8 with the same result.

The serial monitor works on the initial plug-in, but then after trying to upload new firmware I get the tcsetattr failure message. This message also occurs on subsequent attempts to start the serial monitor.

Any ideas? I'm happy to play around with it a little but I'm not sure where to start debugging.

Full log:

Add serial device '6fae6ce4ae35' on iface 1
  - USB VID/PID = 16c0:0483, USB location = usb-20-1
  - USB manufacturer = Teensyduino, product = USB Serial, S/N = 3377180
tcsetattr() failed on '/dev/cu.usbmodem3377181': Invalid argument
Remove device '6fae6ce4ae35'
Add HID device '6fe459b990e2' on iface 0
  - USB VID/PID = 16c0:0478, USB location = usb-20-1
  - USB manufacturer = (none), product = (none), S/N = 00052736
  - HID usage page = 0xff9c, HID usage = 0x22
Identified 'Teensy 3.6' with usage value 0x22
Remove device '6fe459b990e2'
Add serial device '6fe69088e855' on iface 1
  - USB VID/PID = 16c0:0483, USB location = usb-20-1
  - USB manufacturer = Teensyduino, product = USB Serial, S/N = 3377180
tcsetattr() failed on '/dev/cu.usbmodem3377181': Invalid argument
tcsetattr() failed on '/dev/cu.usbmodem3377181': Invalid argument
Remove device '6fe69088e855'
Add serial device '6ff0b73242c0' on iface 1
  - USB VID/PID = 16c0:0483, USB location = usb-20-2
  - USB manufacturer = Teensyduino, product = USB Serial, S/N = 3377180
Remove device '6ff0b73242c0'
Add serial device '6ff40b4ef80a' on iface 1
  - USB VID/PID = 16c0:0483, USB location = usb-20-2
  - USB manufacturer = Teensyduino, product = USB Serial, S/N = 3377180
[upload@3377180-Teensy] Uploading to board '3377180-Teensy' (Teensy 3.6)
[upload@3377180-Teensy] Triggering board reboot
Remove device '6ff40b4ef80a'
Add HID device '700105ad752a' on iface 0
  - USB VID/PID = 16c0:0478, USB location = usb-20-2
  - USB manufacturer = (none), product = (none), S/N = 00052736
  - HID usage page = 0xff9c, HID usage = 0x22
Identified 'Teensy 3.6' with usage value 0x22
[upload@3377180-Teensy] Firmware: firmware.elf
[upload@3377180-Teensy] Flash usage: 63 kiB (6.1%)
[upload@3377180-Teensy] Sending reset command
Remove device '700105ad752a'
Add serial device '70014cac22a1' on iface 1
  - USB VID/PID = 16c0:0483, USB location = usb-20-2
  - USB manufacturer = Teensyduino, product = USB Serial, S/N = 3377180
tcsetattr() failed on '/dev/cu.usbmodem3377181': Invalid argument

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.