Remote Update of Teensy 3.2 with teensy loader CLI

Status
Not open for further replies.

gravel

New member
I am working on a project that uses a Teensy 3.2 mounted on the same PCB as a raspberry PI 4B that operates multile devices.
We have remote access to the system to update the code the PI is running.
We dont want to run the Arduino IDE on the PI, or put the source code file on the PI.
Is it possible to open a terminal on the PI, using a teensy loader CLI on the PI to upload new firmware into the teensy?

I would like to complile new firmware for the teensy on a windows machine ( using the arduino IDE).
As I undstand it, ( could be wrong here) there are hex file(s) created by the IDE that would allow me to use the Teensy CLI loader on the PI to update code on the Teensy.
We have access to nearly all the GPIO pins on the PI. ( I am using two PI GPIO pins to communicate with other external devices.)
We can leave a permanent connection from the USB on the teensy to the usb on the PI. We dont use the Teensy USB in our system.
I can get access to the prog button pin on the Teensy, and the reset pin as well if necessary.
I have poked around on the web and on this forum, and cant seem to find a clear ( to a newbie like me) answer if this can be done, It appears others have done this but may have had different circumstances.
I found a number of references to pressing the proram button to force the teensy to upload code after the Teensy loader CLI has been started.
I'm thinking I could trigger the update by using the code in the PI to "press" the prog button.
I am hoping our process would boil down to:
1. Precompile source code on a local machine, creating the necessary file(s). I read one post indicating there might be another file involved as well.
2. Move the necessary files onto the remote PI.
3. Open a terminal link on the remote PI.
4. Run the teensy loader CLI, with the -w (wait) command, referencing the files.
5. "Press" the Program button by running a small program on the PI toggling the Prog pin.
Is this possible?
Any recommendations would be helpful for sure.
 
Yes, it can be done. I use the -s option on my linux boxes that only have one Teensy connected, that often means that I don't need to press the program button or use a GPIO to "press" it.
 
Status
Not open for further replies.
Back
Top