2025-11-13 8:41 AM - last edited on 2025-11-13 10:06 AM by Andrew Neil
Hello,
Do you think it's possible to flash an ESP32 through a STM32 using a .stldr and the CubeProgrammer ?
Same way we flash an external memory through SPI interface.
The ESP32 is interfaced with the STM32G4 through a UART.
I just want to know if this can be done, and if someone already did it ?
Thank you
2025-11-13 10:00 AM
Let's just say it's not a good fit.
The external loader basically assumed things are memory-mapped into the ARM's address space, either directly, or abstracted via the access methods of the device, say SPI or eMMC.
Perhaps you can pipe or tunnel a serial connection in boot mode (EN/GPIO0), so you can interact from the PC
https://docs.espressif.com/projects/esptool/en/latest/esp32s3/advanced-topics/serial-protocol.html
My suggestion would be to either build/test the piping method, or build an ISPTOOL equivalent on the STM32, to test your ability to interact with the ESP32. And if you can implement an IAP method.
If that's fruitful, perhaps gauge if that will translate to a "memory" programming method that might work as an external loader. Think about the complexity of the interaction, and how STM32 Cube Programmer might be used and its timing expectations.