Collection of tools to manage Teensy boards

Overview

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.

Using tycmd

You can manage multiple devices connected simultaneously, tycmd (and the other tools) uniquely identifies each device by its position in the host USB topology. Meaning if it stays on the same USB port, it is handled as the same device. That's necessary because across reboots and resets, Teensies look completely different to the host.

To target a specific device, use tycmd <command> --board "[<serial>][-<family>][@<location>]". serial is the USB serial number, family is the board family name and location can be the virtual path computed by tycmd (see tycmd list) or an OS device path (e.g. /dev/hidraw1 or COM1). Any of them can be omitted. See the examples in the table below.

Tag filter Effect
714230 Select board with serial number 714230
-Teensy Select board with family name 'Teensy'
@usb-1-2-2 Select board plugged in USB port 'usb-1-2-2'
@COM1 Select board linked to the OS-specific device 'COM1'
[email protected] Select board plugged in 'usb-1-2-2' and with serial number is 714230

You can learn about the various commands using tycmd help. Get specific help for them using tycmd help <command>.

List devices

tycmd list lists plugged Teensy devices. Here is how it looks:

add [email protected] Teensy 3.1
add [email protected] Teensy
add [email protected] Teensy 3.0

Use --verbose if you want detailed information about available devices:

add [email protected] Teensy 3.0
  + capabilities:
    - upload
    - reset
  + interfaces:
    - HalfKay Bootloader: /dev/hidraw2

If you need to read structured information in your scripts, you can set the output to JSON with --output json:

{"action": "add", "tag": "[email protected]", "serial": 714230, "location": "usb-6-3", "model": "Teensy", "capabilities": ["reboot", "serial"], "interfaces": [["Seremu", "/dev/hidraw4"]]}
{"action": "add", "tag": "[email protected]", "serial": 1126140, "location": "usb-6-2", "model": "Teensy LC", "capabilities": ["upload", "reset"], "interfaces": [["HalfKay Bootloader", "/dev/hidraw3"]]}

You can also watch device changes with --watch, both in plain and JSON mode.

Action Meaning
add This board was plugged in or was already there
change Something changed, maybe the board rebooted
miss This board is missing, either it was unplugged (remove) or it is changing mode
remove This board has been missing for some time, consider it removed

Upload firmware

Use tycmd upload <filename.hex> to upload a specific firmware to your device. It is checked for compatibility with your model before being uploaded.

By default, a reboot is triggered but you can use --wait to wait for the bootloader to show up, meaning tycmd will wait for you to press the button on your board.

Serial monitor

tycmd monitor opens a text connection with your Teensy. It is either done through the serial device (/dev/ttyACM*) or through the HID serial emulation (SEREMU) in other USB modes. tycmd uses the correct mode automatically.

You can use the --reconnect option to detect I/O errors (such as a reset, or after a brief unplugging) and reconnect immediately. Other errors will exit the program.

The --raw option will disable line-buffering/editing and immediately send everything you type in the terminal.

See tycmd help monitor for other options. Note that Teensy being a USB device, serial settings are ignored. They are provided in case your application uses them for specific purposes.

Reset and reboot

tycmd reset will restart your device. Since Teensy devices (at least the ARM ones) do not provide a way to trigger a reset, tycmd will instead start the bootloader first and then issue a reset without programming anything.

You can also use tycmd reset -b to start the bootloader. This is the same as pushing the button on your Teensy.

Hacking TyTools

Build on Windows

You can use MSVC (≥ 2015) or MinGW-w64. I have not tested Clang on Windows yet. The historical MinGW toolchain is not supported.

You need to install CMake to build the project files before you can use Visual Studio or MinGW.

If you don't have Qt, only the libraries and command-line tools will be compiled. There are two options to enable Qt in TyTools:

  • dynamic Qt build: Easiest option, you only need to install the pre-built Qt DLLs for your compiler with the official Qt installer. The binaries need the Qt DLLs to work.
  • static Qt build: Harder, but will produce autonomous binaries. Read the README in the lib/qt5 directory for instructions.

To build TyTools with MSVC 2015 32-bit, launch VS2015 x86 Native Tools Command Prompt, navigate to the project directory and execute CMake:

REM You can of course use another build directory if you prefer.
mkdir build
mkdir build/win32
cd build/win32
cmake ../..

This will create Visual Studio project and solution files in build/win32. You can then open the solution TyTools.sln.

To build 64-bit binaries, you should use VS2015 x64 Native Tools Command Prompt instead.

Build on Mac OS X

Install Xcode, the developer command-line tools and CMake. The native Clang compiler can build TyTools.

If you don't have Qt, only the libraries and command-line tools will be compiled. There are two options to enable Qt in TyTools:

  • dynamic Qt build: Easiest option, you only need to install the pre-built Qt DLLs for your compiler with the official Qt installer. The binaries need the Qt DLLs to work.
  • static Qt build: Harder, but will produce autonomous binaries. Read the README in the lib/qt5 directory for instructions.

After Qt is ready, you can build TyTools by executing the following commands in the project directory:

# You can of course use another directory if you prefer.
mkdir -p build/darwin && cd build/darwin
cd build/darwin
cmake ../..

If you want to build debug binaries instead, you should specify the build type:

cmake -DCMAKE_BUILD_TYPE=Debug ../..

Build on Linux

TyTools can be built with GCC or Clang.

Prerequisites

To install the dependencies on Debian or Ubuntu execute:

sudo apt-get install build-essential cmake libudev-dev qtbase5-dev pkg-config

On Arch Linux you can do so (as root):

pacman -S --needed base-devel cmake udev qt5-base

Compilation

Open the project directory in a terminal and execute:

# You can of course use another directory if you prefer.
mkdir -p build/linux && cd build/linux
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../..
make

If you want to build debug binaries instead, you should specify the build type:

cmake -DCMAKE_BUILD_TYPE=Debug ../..

The compiled binaries can be used directly from the build directory. Follow through the next section if you want to install the application.

Installation

You can deploy TyTools to your system with the following commands:

sudo make install

By default this will copy the files to /usr/local. To change this directory you need to change the CMAKE_INSTALL_PREFIX value in the Compilation section above.

Customized builds

A number of customized builds are available in the variants directory.

In order to activate a customized build, you need to specify it when running cmake. For example, in order to build the morningstar variant, run the following commands from the project directory:

mkdir build
mkdir build/morningstar
cd build/morningstar
cmake -DCONFIG_VARIANT=morningstar ../..
Comments
  • Multiple Serial Support

    Multiple Serial Support

    Teensy supports now multiple serial ports per device. (Here the corresponding pull request. https://github.com/PaulStoffregen/cores/pull/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.

    enhancement 
    opened by luni64 35
  • Teensy Bootloader Change

    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.

    enhancement 
    opened by Defragster 28
  • TYQT Crashes on start

    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

    bug 
    opened by xorionfe 25
  • Support for 'generic Serial' devices

    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.

    bug enhancement 
    opened by Defragster 21
  • Teensy MicroMod - New ID for same 1062

    Teensy MicroMod - New ID for same 1062

    @Koromix - in beta now is Sparkfun's MicroMod MCU board with a Teensy bootloader and 1062 processor.

    As far as uploading the FLASH went to 16MB ( instead of 2MB on 4.0 and 8MB on 4.1 )

    And it has a new ID of 0x26, but works and acts like the T_4.x's other wise AFAIK using the PJRC bootloader chip

    Beta hardware just released to three of us using TyCommander so far ... is it easy to put out an interim build that would recognize it to work?

    Thanks for any feedback, @defragster

    @KurtE and @mjs513

    opened by Defragster 19
  • TyCommanderC.exe trigger bootloader from -multi select list

    TyCommanderC.exe trigger bootloader from -multi select list

    Would it be easy and sensible to have the UPLOAD behavior presenting the 'choose board' dialog trigger a Reboot?

    In the case of platform.txt it uses :: upload --autostart --wait --multi

    Having the ability to command line present the list and then trigger 'Bootloader' would in the case where TyCommander is not integrated but using the TSET command line build from editor would take the Teensy offline and trigger the TeensyLoader to Upload the Teensy before it returned. Currently I have to click the GUI 'Bootloader' button - or the Teensy Button to disconnect TyCommander and allow TeensyLoader USB access to the desired Teensy.

    This comes up during Beta releases of TeensyDuino when avoiding the IDE GUI is okay - but need to see TeensyLoader do the upload without having to so Integrate.

    Using perhaps a variation of this that currently results in this with no prompting: T:\TyComm>TyCommanderC.exe reboot --autostart --wait --multi [email protected] Rebooting board '7819600-Teensy' (Teensy 4.1) [email protected] Board is already in bootloader mode [email protected] Rebooting board '1245170-Teensy' (Teensy 3.2) [email protected] Board is already in bootloader mode

    enhancement 
    opened by Defragster 16
  • Compatibility to upcoming Teensyduino version

    Compatibility to upcoming Teensyduino version

    The currently worked on version of Teensyduino changes the so far used device level CDC class to a composite device. Looks like the TyTools are not happy with this. The device manager shows the Teensy as e.g. COM3, Teensy.exe uploads correctly, but the TyTools detect it at COM4 which of course won't work. However, using the Teensy in dual / triple serial mode works normally.

    Here the differences in the generated devices before and after the change.

    The old version generates this device USB\VID_16C0&PID_0483\8077220
    The new version generates this device: USB\VID_16C0&PID_0483&MI_00\7&922067D&0&0000
    

    See here for some more information https://forum.pjrc.com/threads/63695-malloc-free-for-EXTMEM-and-DTCM?p=257329&viewfull=1#post257329

    I can send you a .hex showing the effect if you wan't

    opened by luni64 13
  • Dual Serial - How to select the displayed serial port

    Dual Serial - How to select the displayed serial port

    WIN10. I can upload a dual serial firmware and the information screen shows both ports. I want to connect the serial monitor to one of the two ports but how can I select which one to connect? It looks like it always connects to the first one in the list. Am I missing something?

    enhancement 
    opened by luni64 13
  • Send window filled with previous input

    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

    opened by paynterf 13
  • Teensy not found on Ubuntu 21.10, Raspberry Pi 4

    Teensy not found on Ubuntu 21.10, Raspberry Pi 4

    Hello!

    I have a Teensy 4.1 connected via USB to a Raspberry Pi 4 which is running Ubuntu Desktop 21.10. The system can see the Teensy at the USB level - running lsusb returns the following entry for the Teensy:

    Bus 001 Device 013: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial

    tycmd however cannot see the Teensy. Running tycmd list returns an empty result. I have built tytools v0.9.4 per the instructions, and it builds cleanly with no errors showing. The tycommander GUI runs on this system without errors but also shows no boards connected.

    For reference, I can see the same Teensy using tycmd and tycommander when connected to my macOS machine, using the same v0.9.4 release, the same running Teensy sketch and the same USB cables.

    I'm wondering if you have ever successfully used tycmd on Raspberry Pi 4? Or are there any special considerations to get it to be able to see the attached device(s)?

    Thanks!

    Josh

    bug 
    opened by mr-j-tree 12
  • Firmware too big (max 1048576 bytes) in

    Firmware too big (max 1048576 bytes) in

    It appears that this may be an issue with Teensy 4.1. Do I gather that 4.x is not supported. I have tytools installed with vsCode. But, cannot get the hex files to upload.

    opened by MikeMaurice 12
  • Mac 5,1 running Big Sur in OpenCore

    Mac 5,1 running Big Sur in OpenCore

    This was reported to me by a third party. I can't reproduce since I don't have the hardware. Looks like a serial comms issue. The "enable serial" option would not work.
    Board: Teensy LC

    BIG SUR IO error_Screen Shot 2022-08-19 at 6 20 24 PM

    opened by dbonin360 0
  • Backspace character '\b' in Serial output

    Backspace character '\b' in Serial output

    I'm trying to run a "spinner" in the serial output when my sketch is idle. This should output one of the '|' '/' '-' '\' characters on each loop with a backspace '\b' after the character.

    When I try this with my sketch and TyCommander 0.9.7-2-g2475490 I get, what I assume is, a notofu symbol between the characters instead of the backspace.

    Is the backspace character in the serial output a problem with TyCommander or a problem with the Serial print stuff in Arduino?

    If it matters I'm doing this with a Teensy 4.0 board, Arduino 1.8.13, and Teensyduino 1.53. I'm trying this on an Ubuntu 18.04.6 LTS system.

    opened by bigguiness 0
  • No method to uninstall

    No method to uninstall

    I made the mistake of doing sudo make install of tytools. There doesn't seem to be a way to uninstall tytools. Requesting a way to do this.

    There seems to be a very strong correlation with tycommander and hard crashing of my laptop. It occurs after flashing a Teensy. There are no breadcrumbs in syslog, nor dmesg. Just a USB access and a hard fault causing my laptop to turn power off. I recompiled with debug settings. I did not see a way to make sure optimization was turned off, ie. -O0. Running with valgrind showed there were memory leaks running tycommander, however, I do not know if some of the errors reported are false due to the optimization level. How can one tell cmake to set optimization to O0? Some of the leaks were related to uninitialized variables.

    tycommander has been crashing my laptop since 26 May 2022. Prior to that date, it was working ok. On that date there was an Ubuntu 20.04 LTS apt update. Then the crashes happened when ever I tried to program the Teensy. Since that time, I have done a fresh install on my machine to POP-OS 22.04. I am still getting Teensy flash related crashes using ty commander.

    I have uninstalled Arduino, and deleted the directory. Then reinstalled Arduino, along with Teensyduino. I don't know what to do at this point. I'd like to totally eliminate tytools from my system, at least for the moment. It is unfortunate, because when it was working it was very nice. But I have to stop the violent crashes, before my laptop file system is damaged. My syslog has been corrupted due to one of the crashes. Honestly, I really don't know what to do. This is on an i7 system running 64 bit OS with 32GB RAM and 1TB SSD, with a fresh OS install. Would appreciate any help on this. Thanks.

    opened by bdlabitt 7
  • Tycmd doesn’t work in docker container

    Tycmd doesn’t work in docker container

    Even though tycmd works at the computer which host the docker container, it doesn’t work in the docker container.

    I am able to see the device in the docker container using ls -l /dev/.

    I have included the 00.teensy udev rules.

    Any thoughts on this?

    opened by isouriadakis 7
  • TyCommander fails to release the com port

    TyCommander fails to release the com port

    Unlike the teensy loader, TyCommander 0 97 does not release the com port after loading. Since, TyC seems to be using the teensy loader to do the actual load, maybe there is something I am missing. Complicates debugging on the cmd window as TyCmd monitor won't open the com port until TyCommander is closed. Any thoughts?

    opened by MikeMaurice 1
Releases(v0.9.7)
Owner
Niels Martignène
Hynerian
Niels Martignène
The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for Vulkan application developers to leverage Vulkan Profiles while developing a Vulkan application

Copyright © 2021-2022 LunarG, Inc. Vulkan Profiles Tools (BETA) The Vulkan Profiles Tools are a collection of tools delivered with the Vulkan SDK for

The Khronos Group 61 Sep 17, 2022
Teensy 4 I2S Audio Library

Teensy 4 I2S Library This is a no-nonsense I2S library for Teensy 4 and 4.1. It was derived from the I2S code in Paul Stoffregen's Teensy Audio Librar

Valdemar Erlingsson 7 Sep 4, 2022
QNEthernet, an lwIP-Based Ethernet Library For Teensy 4.1

QNEthernet, an lwIP-Based Ethernet Library For Teensy 4.1 Version: 0.10.0-snapshot The QNEthernet library provides Arduino-like Ethernet functionality

Shawn Silverman 24 Sep 13, 2022
Arduino code for a high speed 8000hz wired mouse using a teensy 4 MCU

teensy4_mouse Arduino code for a high speed 8000Hz wired mouse using a teensy 4 MCU. This code is inspired by https://github.com/mrjohnk/PMW3360DM-T2Q

Herbert Trip 8 Jul 5, 2022
Use Atari keyboard as USB keyboard with a Teensy 3.6

Atari Keyboard Convert an Atari 600/800/1200 XL into a USB keyboard. I bricked my Atari mainboard. My goal is to use the keyboard of the Atari on a Ra

Jos Koenis 2 Dec 3, 2021
Project to create a teensy based gamecube controller with hall effect sensors, snapback filtering, and notch calibration

PhobGCC Gamecube controller motherboard using a teensy as the microcontroller. Aim is to make an accessible and consistent controller. Has the option

null 86 Sep 13, 2022
Suckless-tools - My fork of suckless tools.

suckless-tools Here is my fork of suckless tools. I didn't include tabbed, i was using but not actively. I am using xfce4-terminal instead of st. Beca

null 2 Jan 7, 2022
A collection of tools made by the nerds @ axial

Tools created by Nerds @ AXIAL Tool Name: Vichiti Author: 0x9747 Domain: Open-source Intelligence Tool Name: FLAMES Author: Devisha Rochlani Domain: M

AXIAL 16 Oct 31, 2021
sbase is a collection of unix tools that are inherently portable across UNIX and UNIX-like systems.

sbase is a collection of unix tools that are inherently portable across UNIX and UNIX-like systems.

Anton Samokhvalov 1 Nov 1, 2021
A collection of individual tools to randomize bdsp sheets

BDSP_Randomisers A collection of tools to randomize BDSP assets Setup (Windows 10 only) Install Ubuntu 18.04 via WSL1 (plenty of tutorials on that) In

null 6 Mar 1, 2022
An open collection of tools and experiments for rendering wide-gamut scene-linear data into an image for an SDR or HDR display device.

Open Display Transform An open collection of tools and experiments for rendering wide-gamut scene-linear data into an image for an SDR or HDR display

Jed Smith 121 Sep 9, 2022
A collection of tools for Multiple Alignments of DNA, RNA, Protein Sequence

T-Coffee T-Coffee is a collection of tools for Computing, Evaluating and Manipulating Multiple Alignments of DNA, RNA, Protein Sequences and Structure

Notredame Lab 68 Aug 13, 2022
A collection of command line tools for ARM devices with Allwinner SoCs.

sunxi-tools Copyright (C) 2012 Alejandro Mery [email protected] For a full list of contributors, see this link or use the command git shortlog -se --no-m

Free/Open Source Software for Allwinner SoCs (A10/A13/A10s/A20/A31/...) 444 Sep 20, 2022
A Visual Studio extension containing a collection of tools to help contributing code to the Chromium project.

VsChromium VsChromium is a Visual Studio Extension containing a collection of tools useful for editing, navigating and debugging code. VsChromium was

The Chromium Project 254 Sep 12, 2022
A collection of tools, libraries, and tests for Vulkan shader compilation.

Shaderc A collection of tools, libraries and tests for shader compilation. At the moment it includes: glslc, a command line compiler for GLSL/HLSL to

Google 1.4k Sep 21, 2022
A 3-D Printed Bot which can talk, cheer, dance and manage your day-to-day schedule.

cheerup A 3-D Printed Bot which can talk, cheer, dance and manage your day-to-day schedule. In childhood many of us have watched this show "SpongeBob

Aniket Dhole 4 Sep 5, 2021
way-displays: Manage Your Wayland Displays

way-displays: Manage Your Wayland Displays Sets preferred mode or highest at maximum refresh Arranges left to right Auto scales based on DPI: 96 is a

Alexander Courtis 64 Sep 8, 2022
ContactGot is an offline desktop app, where clients can leave their info, while an administrator can manage which information they need to gather on certain projects.

ContactGot Contents Description How to use Requirements Engineering Installation Documentation Design Architecture Demonstration 1. Description During

Elizaveta 15 Sep 17, 2022
Two alphanumeric LCDs and 2 LED bars to show and manage some in-flight parameters

FS2020-LCD-Panel with Arduino Two alphanumeric LCDs and 2 LED bars to show and manage some in-flight parameters for FS2020. In this project you can pl

null 5 Jun 27, 2022