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.

Chris Stratton
  • 5,411
  • 20
  • 40
newbie2015
  • 223
  • 2
  • 9

3 Answers3

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.

Majenko
  • 105,851
  • 5
  • 82
  • 139
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.

Dave X
  • 2,350
  • 15
  • 29
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!

Mikael Patel
  • 7,989
  • 2
  • 16
  • 21