ESP32-Musings / OTA_update_AVR_using_ESP32

Program AVR MCUs Over-the-Air using ESP32
MIT License
38 stars 15 forks source link
arduino avr esp32 ota ota-firmware-updates programmer

Stargazers Forks Issues License


Logo

OTA for AVR MCU using ESP32

Program your AVR MCU Over-the-Air using ESP32

View Code · Report Bug · Request Feature · Create a Pull Request

Table of Contents

About the Project

The project aims at enabling firmware update of AVR-powered boards Over-the-Air using ESP32.

Testing was done with ESP32-DevKitC v4 board and Arduino UNO, Leonardo and MEGA. You can try with any other AVR-powered board and let me know how it worked out.

Code

/esp_avr_flash -> Basic flashing utility, requires path of the .bin file which has been already uploaded in SPIFFS

/file_serving_avr -> OTA demo, with HTTP File Server with embedded flash link

/references -> Python scripts for understanding the flashing protocol commands and verification

Getting Started

Hardware Required

To run the OTA demo, you need an ESP32 dev board (e.g. ESP32-WROVER Kit) or ESP32 core board (e.g. ESP32-DevKitC). For the AVR MCU, you can use an Arduino UNO, Leonardo or MEGA.

Prerequisites

Setting Up

  1. Wire your AVR MCU (e.g. Arduino UNO, Leonardo, Mega, etc.) to the ESP32. All the following connections should be made through a Bi-Directional Logic Level Converter (LLC -> 5V - 3.3V).

    ESP32 LLC (L) LLC (H) AVR
    3.3V 3.3V - -
    - - 5V 5V
    GND GND GND GND
    GPIO4 (TX) L1 H1 RX
    GPIO5 (RX) L2 H2 TX
    GPIO19 L3 H3 RESET
  2. Generate a .hex file for the AVR MCU code you want to flash. You can follow this link for instructions.

Usage

Troubleshooting

Contributors

For OTA updates for STM32Fxx MCUs, you can follow this project.

Acknowledgements

License

Distributed under the MIT License. See LICENSE for more information.