How to get one Teensy to program others


Well-known member
I want to have a master Teensy 4.1 that is programmable in the normal way and for it to connect to 8 others (4.1 or 4.0) and for the master to be able to re-program each of the others. Is this possible and are there any examples anywhere? I've done a few searches and found nothing. My objective is to have a single hex file that is loaded to the master and then the master sends a program to the others. I don't mind if it's the same (master) program that finds its way to each slave, as each will be able to work out which parts of the program are appropriate for it. Maybe the solution is to simultaneously load the same program to all devices - not sure if this is possible or desirable. Thanks!
See the github link below for a method (FlasherX) to update firmware on Teensy 4.1 via UART. In my case, the UART connection to T4.1 is from a PC host, but you could use the same method to update firmware in one T4.1 from another T4.1, and since T4.1 has 8 x UART, you could have one T4.1 update 8 other T4.1 via 8 x separate UART connections. The idea behind FlasherX is that the firmware in the Teensy to be updated contains code to set up a buffer, receive a new firmware version via UART and write it to the buffer, confirm that the firmware is complete and correct, and finally erase the existing firmware and write the new firmware to the standard flash address. I would suggest that your master T4.1 could update each of the others one at a time, as opposed to 8 at the same time, which would be hard to manage. Theoretically, FlasherX can also work over SPI or I2C, but you would have to figure out how to connect all of the T4.1 on an SPI or I2C bus, with one being SPI/I2C master, and the others being SPI/I2C slaves. UART is easy to test because you can directly connect Teensy RX/TX pins.