Search code examples
esp32

Can I program an ESP32 with another ESP32


I have basically made a circuit that has an ESP32 as the main microcontroller and some sensors and other hardware. I want to develop another circuit that will act as a testing circuit for the first circuit. Some wires from the testing circuit will be connected to the first circuit to test the inputs and outputs. What I want is for my test circuits to upload firmware to the ESP32 on my first circuit and then observe the inputs and outputs to confirm that they are as expected. I want to use ESP32 in my test circuit. Is it possible that this ESP32 in my test circuit already has the firmware that it uploads to the first circuit and then observes the inputs and outputs?


Solution

  • Yes, it is possible to flash an ESP32 using another ESP32 (or even a different microcontroller). You can do it over UART or SPI using the esp-serial-flasher library. Take a look at the README and the ESP32-to-ESP32 examples for all the details about how to use the library.