I moved your topic to an appropriate forum category @gr8rithic.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
@Juraj The ESP32 for my project is connected to the Serial1 of the arduino mega. I wish to do OTA firmware update to the arduino through UART that is connected to the ESP32. I would like to store the firmware hex file in spiffs of the esp32, and then using this spiffs file to update the arduino mega.
Thats the only requirements as of now.
If possible can you also provide me with the steps or document for the same, it will be very helpful.
that would require something like avrdude for serial bootloader implementaion on esp32 and bootloader listening on Serial1 in Mega. both are possible, but I guess there is no tutorial for that.
so what I can offer is:
If you use Linux on your PC, you can bridge avrdude over telnet to Mega. that would still require a bootloader listening on Serial1. the binary wouldn't be stored in spiffs.
a self update of Mega with my ArduinoOTA library:
2a) a normal way is to use a networking library to receive the update binary from the IDE. so with esp32 as WiFi adapter you would put AT firmware into the esp32 and use my WiFiEspAT library in Mega.
2b) you make your own transport of the update binary (maybe over Serial1 from esp32 spiffs) and you use InternalStorage from ArduinoOTA library to store and apply the update binary
@Juraj I wanted to know how to perform the the 2nd option. Anything in the 2nd one is fine. Just wanted to know if I use WiFiEspAT library then can I continue working with the esp32 as well or I will have to do some particular changes so that I can use both the microcontrollers.
And if possible some links or some documentaion for step by step approach.
with 2a) you have to put the AT firmware into the esp32 so it will work only as a simple WiFi adapter. it is an acceptable role for a C3. I wouldn't use more capable esp32 versions for this inferior task