5

So here's the scenario.

I have sent my teensy 3.1 circuit to a client of mine And now I need to update the code burned onto teensy without providing client access to the code

So is it possible to create an exe or an installer of a kind which on execution simply upload the new code onto the teensy?

Since the code is finally a hex file uploaded onto the controller I hope this must be possible But on doing a quick google search i was not able to find any valid resource which would guide me how to go about it.

  • Yes, but note that while you can avoid distributing your source code, it will be hard to prevent the recipient from loading the hex file into multiple boards. – Chris Stratton Dec 16 '15 at 5:10
1

Yes, it is perfectly possible.

You will need three things:

  1. The HEX file you want to program
  2. The programming utility for your chosen board (would be in the IDE folder somewhere - not sure what Teensy uses off hand)
  3. A text editor.

Then, using the text editor, you create a .BAT file which executes the programming utility with the right parameters to program the board.

It can help to do an upload in the IDE in verbose mode so you can see exactly what command and parameters are being executed.

1

Yes. Teensy has a command line loader available at https://www.pjrc.com/teensy/loader_cli.html or https://github.com/PaulStoffregen/teensy_loader_cli

Given the hex file, the teensy_cli client could upload it without giving your client the source code. For non-teensy devices, avrdude could be used similarly.

Alternately, one could fork the cli code, modify it to use an embedded copy of your hex file data in a hard-coded or encrypted constant, and then deliver that modified single-purpose executable file to your client.

  • So here it has been mentioned in 'Required command line parameters' that valid options for Teensy 3.2, Teensy 3.1 and Teensy LC are only applicable for mac and linux. Does that mean I cannot make this loader on windows? – newbie2015 Dec 14 '15 at 18:51
  • Also here the hex files for blink slow for Teensy 3.2, Teensy 3.1 and Teensy LC have been provided only for Linux operating system. Does that imply it is not possible on windows at all? – newbie2015 Dec 14 '15 at 18:52
  • 1
    The hex files should be specific to the teensy/AVR hardware, not the host system. As for the cli program not being able to work on Windows, I'm sorry I missed that--Mikael Patel's answer of the windows GUI solution might be best. – Dave X Dec 14 '15 at 20:55
1

The simplest solution is to ask you client to install the TeensyLoader application. https://www.pjrc.com/teensy/loader.html

Send the new HEX file to the client. The client should then connect the board to the computer. Run the TeensyLoader and upload the HEX file. The TeensyLoader will recognize the board when the reset button is pushed. The HEX file will need to be located on disk (after download or mail attachment).

Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.