Loading .hex file into Teensy 3.6

Status
Not open for further replies.

Sully

New member
I've got a device that I have a customer using. If I am in MSVS Community with vMicro installed, I can do a build and upload (without pressing the manual button). vMicro is able to use the Teensy loader to load an image. However, with just the Teensy Loader I can't figure a way to do this without pushing the button. Obviously, I would prefer to not send the source code to the customer.

Is there an equivalent executable which would do the same thing as vMicro or is there another app that would be able to accomplish the same thing?

Thanks for any help
 
YES, you can load a *.HEX file from windows. I bought a DIY thermocam from GroupGets and there were instructions on how to do it. Sorry, but is has been awhile since I did this, so can't give specifics.
 
Yes, all you need is Teensy Loader. Get it here:

https://www.pjrc.com/teensy/loader.html

Run it, and click File > Open HEX File. Like this:

sc.png

Then press the button on your Teensy. The Teensy Loader window will change, and the toolbar button to program the board will activate. Click it and your code will get written to the Teensy. Easy stuff!
 
I have Teensy Loader... and can definitely load a .hex that way. I did a whole bunch of devices like that.

In MSVisualStudio using the vMicro plugin I can connect the USB... then do Upload Last Build. The plugin then puts the Teensy in loader mode and uploads the compiled project. So you don't have to press the button (unless you really screw something up - like loop to fast or something like that). Works most of the time, or you can recover by rebooting everything (PC, Teensy, Hubs)

Since vMicro knows what the USB command is to put the Teensy into Loader Mode, I was wondering if someone had an app that basically just issued that command.

-As I was thinking about this... if there isn't a command on the Teensy side... is it possible vMicro has added something to the serial handler?
 
However, with just the Teensy Loader I can't figure a way to do this without pushing the button. Obviously, I would prefer to not send the source code to the customer.

Is there an equivalent executable which would do the same thing as vMicro or is there another app that would be able to accomplish the same thing?

I can think of a few different options to try:

a) When Teensy installs on Arduino it installs the Teensy program as well, as a reboot and reset program: Look in your Arduino install/hardware/tools directory for these.

b) You could try using the Teensy Command line stuff for this. More information up at: https://www.pjrc.com/teensy/loader_cli.html

c) You can trying using the TyCommander and related tools: https://github.com/Koromix/tytools
 
I was wondering if someone had an app that basically just issued that command.

You probably want TEENSY_REBOOT.EXE. It's default install location is C:\Program Files (x86)\Arduino\hardware\tools.

It's a command line utility. Normally it talks to Teensy Loader, to make sure auto mode is set and the verify Teensy Loader saw a board appear. To run it in stand-alone mode, where it just sends the request in a "fire and forget" kind of way, add a "-s" flag.

As with Arduino (which just runs this utility) the automatic reboot only works if Teensy is still properly running USB code. If your program does something like noInterrupts() in setup() and then a tight loop where nothing runs that turns interrupts back on, then no USB communication is possible. Teensy won't be able to hear the request and reboot. Every Teensy is made with a pushbutton for exactly this reason - if your code crashes and USB is off, the button is the only way to recover.

But if your code is still running properly, that TEENSY_REBOOT.EXE program will do the trick.
 
Status
Not open for further replies.
Back
Top