UART firmware update

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

UART firmware update

Postby pepopi » Wed Sep 21, 2022 10:34 am

Hello everyone,

I want to program the ESP32 using another ESP32 with different firmwares loaded in the fatfs partition, using vfs and choosing with push buttons which one to transfer to the slave mcu.

I have already accomplished uploading the firmware.bin partion table and the bootloader on different folders and listing them using fatfsgen. I'm at the point where I have to retrieve those files and transfer them. I know https://github.com/espressif/esp-serial-flasher exists, but I do not know how to continue. Also the slave mcu has two partitions, the one that is running the current firmware and the one that is transferred the chosen firmware. Should those partitions be type ota?
Furthermore, how do I embed the files from the vfs, is it even necessary?
Basically what I want to do is an OTA update but from one esp32 to another esp32.

Thank you

ESP_Sprite
Posts: 8921
Joined: Thu Nov 26, 2015 4:08 am

Re: UART firmware update

Postby ESP_Sprite » Thu Sep 22, 2022 12:21 am

You're confusing two things, I think. With esp-serial-flasher, the update is a 'normal' one, as in the same as you would get if you were to program the ESP32 from your PC. As you can always do this, even if the ESP32 firmware is corrupted, there's no need for two OTA partitions, one (factory) partition already is enough.

If you want to do OTA anyway, you'd have to design your own code (both on the sending and receiving side) that would receive data via UART and use the OTA api to program it, but I'd honestly wouldn't bother; I think in this case it would only complicate things compared to the esp-serial-flasher setup.

pepopi
Posts: 32
Joined: Mon Apr 11, 2022 9:45 am

Re: UAtRT firmware update

Postby pepopi » Fri Sep 23, 2022 8:11 am

Thanks,
I will simply flash it directly. So, could you give me some guidance on what modifications I should do to the serial flasher library?
The ESP32 example flashes the files on binaries folder, what should I change to flash the binary selected on the fatfs vfs by a button? I did not find that kind of information on the esp idf webpage.

Thank you and sorry for bothering with some questions that it may seem obvious, but I am a newbie in the mcu memory programming

Who is online

Users browsing this forum: No registered users and 127 guests