Programming multiple Teensy 3.x simultaneously

Status
Not open for further replies.

syso2342

Well-known member
Is it possible to program multiple Teensies, where every single is connected to a USB hub, with the same hex file
or different hex files from the console, or would I need to modify the stand-alone linux version of the firmware uploader?
 
multiple Teensies on hubs, yes, without re-plugging. But one at a time. Unless you device some sort of script/batch file.
 
Stevech's response (which interpreted OP differently than I did) suggests the OP question could be more clear.

But to elaborate on his response, each teensy will show up on a different COM port (assuming linux is like windows.) So you can individually program them. In the arduino ide you select the COM port before choosing upload, and I suspect the firmware uploader works based on the IDE setting, and can probabl be overridden as well.

Personally I first thought syso was asking how to program multiple teensies simultaneously. I do not know the answer.
 
Edit:
This is wrong. There is no way to differentiate between teensy board with an option from the command line. Ignore my comment.


Yes, they could be concurrent using the command line loader: https://www.pjrc.com/teensy/loader_cli.html

Then in your Linux or Mac script file have each line terminated with the character that tells it to not wait for the output of the current process.

http://stackoverflow.com/questions/20670911/run-shell-command-and-dont-wait-for-return

So there will be a slight lag from first to last, but it will program them nearly at the same time. You will have to find out where the hex files are stored as well. It may be the hex files are not stored in unique files. So you may need a custom compile solution.

Honestly I do not know what doing this will buy you other than programming them slightly quicker.


Edit:
Ummm, wait, does the loader find the teensy by device? Or port? Or by some other magic? I may have made an assumption here.
 
Last edited:
I assumed the command line loader wasn't designed for multiple concurrent instances running as separate processes.
Maybe it can - on some or all OSes.
 
After looking at the command line version I am guessing it will program the first teensy 3.1 it finds. I don't think it is a limitation of how it was programmed, more a limitation of how to address the teensy you want to program. I could see if being done if you could control the USB port activation via another means, but that would be dependent upon the platform.

I am not sure if you can say control a USB port via script or not. I know you can do some things via some Python extensions, but I don't know if a port can be shut off. It might be worthwhile to figure this out for an automated programming system, but just for convenience this is overkill.
 
I ran into this when trying to use more than 1 on some machine, sometimes I would solve by unplugging some of them. Other times resolved by using verify command on arduino IDE, and hitting program button on the one I wanted to reprogram. But this implies you have access to program button.
 
I've been able to plug in several Teensy 3s and choose which one I wish to program via the IDE (AS/VM).
Not using Arduino IDE though I suspect it doesn't matter.
 
Status
Not open for further replies.
Back
Top