tytools icon indicating copy to clipboard operation
tytools copied to clipboard

Suggestion: Add tytools to platformio to automate use there

Open blackketter opened this issue 4 years ago • 3 comments

Not sure if this should be a tytools issue or a platformio one, but thought I'd start here. It would be great if tytools were a tool available to platformio users directly.

blackketter avatar Oct 19 '20 16:10 blackketter

That would be cool and maybe it can be done, though I don't know anything about platformio (tried it once and that's it). I'd like to look into it eventually but available time is very limited right now. So no promises :)

Koromix avatar Nov 20 '20 10:11 Koromix

This is how I use tyTools in PlatformIO:

  1. Add the following file upload_with_tycmd.py to the top-level directory of your PlatformIO project (next to platformio.ini):
Import("env")

env.Replace(
    UPLOADER="\"c:\\program files\\tyTools\\tycmd.exe\"",
    UPLOADCMD="$UPLOADER upload $UPLOADERFLAGS $SOURCE"
)
  1. Add this to platformio.ini:
extra_scripts = upload_with_tycmd.py
upload_protocol = custom
upload_flags = -B<teensy serial number> 

The last parameter (upload_flags) is optional and allows to send the sketch to a fixed Teensy, identified by its serial number.

Hope it helps

jbliesener avatar Jan 15 '21 20:01 jbliesener

Thanks, @jbliesener, but my purpose for this issue was to suggest that the tytools to be installed by platformio automatically, as they have been more reliable for me than the default tools.

FWIW, I already have tytools working with platformio on macOS with a slightly different technique:

[env]
upload_command = tycmd upload -B $UPLOAD_PORT $SOURCE

where tycmd is already in the $PATH, and for a specific teensy target:

[env:<your target name>]
upload_port = <your specific teensy, like "2236890-Teensy">

blackketter avatar Jan 16 '21 06:01 blackketter