Page 1 of 1

Update Via UART

Posted: Tue Aug 28, 2018 1:34 pm
by KonradZ
Hello,

I Have a project with MCU running RTOS and I attached the ESP32 to add network communication to the project. I want to implement the ESP32 firmware update that will be done by the MCU via UART. There is no way of running the esptool.py script so I need to implment it myself. Do you have any good reference or maybe some simple solution to add the possibility of update ?

Re: Update Via UART

Posted: Tue Aug 28, 2018 4:40 pm
by fly135
The OTA example provides enough info to allow OTA update from any data source. You can also look at esp_https_ota module for an example of how to update an OTA partition. It doesn't have to be from the network.

John A

Re: Update Via UART

Posted: Wed Aug 29, 2018 4:13 pm
by jhinkle
Look at esptool.py and see how they program it using the uart.

Perform the same protocol via a uart in your external CPU.

Besides the uart, you will need some I/O to control reset and I/O manipulation to put the ESP into programming mode.

There are also a few C based ESP tools like esptool that are open source. You can review them if you are not proficient with python.

Re: Update Via UART

Posted: Thu Feb 04, 2021 8:07 pm
by Snappy
Please supply a link to one or more of the C coded programs to update the ESP32 firmware.

Thank you.

Re: Update Via UART

Posted: Fri Feb 05, 2021 12:02 am
by WiFive

Re: Update Via UART

Posted: Mon Feb 08, 2021 1:11 am
by braddd
https://github.com/espressif/esptool/wi ... l-Protocol will give you what you need to know, but beware that it's a little confusing and not all that straightforward. You'll also need to look at the serial flasher source code for some things, especially to see how they do the CRC because it's not a method I've ever seen before. I've written code using that serial protocol reference, which allows an ATmega1248P to erase and flash an ESP32 using just UART, but unfortunately it's closed source and currently only flashes up to 0x200000. Something in the ROM loeader appears to limit it. Maybe a bug