All Projects → laukik-hase → Ota_update_stm32_using_esp32

laukik-hase / Ota_update_stm32_using_esp32

Licence: mit
Program STM32Fxx MCUs Over-the-Air using ESP32

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Ota update stm32 using esp32

Blog
A set of various projects based on ESP8266, ESP32, ATtiny13, ATtiny85, ATtiny2313, ATmega8, ATmega328, ATmega32, STM32 and more.
Stars: ✭ 198 (+62.3%)
Mutual labels:  esp32, stm32, programming
M5ez
Complete interface builder for the M5Stack, an ESP32 based mini tinker-computer
Stars: ✭ 260 (+113.11%)
Mutual labels:  esp32, programming
SinricPro Generic
Simple way to control your IOT development boards like ESP8226, ESP32, Arduino SAMD21, Adafruit SAMD21, SAMD51, nRF52, STM32, Teensy, SAM DUE with Amazon Alexa or Google Home
Stars: ✭ 18 (-85.25%)
Mutual labels:  esp32, stm32
Esphelper
A library to make using WiFi & MQTT on the ESP8266 easy.
Stars: ✭ 310 (+154.1%)
Mutual labels:  esp32, ota
BIPES
BIPES: Block based Integrated Platform for Embedded Systems allows text and block based programming for several types of embedded systems and Internet of Things modules using MicroPython, CircuitPython, Python or Snek. You can connect, program, debug and monitor several types of boards using network, USB or Bluetooth. No software install needed!
Stars: ✭ 72 (-40.98%)
Mutual labels:  programming, esp32
ESP32 BLE OTA Arduino
OTA update on ESP32 via BLE
Stars: ✭ 41 (-66.39%)
Mutual labels:  ota, esp32
Blynk Library
Blynk library for embedded hardware. Works with Arduino, ESP8266, Raspberry Pi, Intel Edison/Galileo, LinkIt ONE, Particle Core/Photon, Energia, ARM mbed, etc.
Stars: ✭ 3,305 (+2609.02%)
Mutual labels:  esp32, ota
SuperGreenOS
🧠 SuperGreenOS home farming automation software for esp32, all in one package, and controllable from your smartphone, pc, mac, linux, toaster, plumbus, whatnot...
Stars: ✭ 83 (-31.97%)
Mutual labels:  ota, esp32
Atomvm
Tiny Erlang VM
Stars: ✭ 834 (+583.61%)
Mutual labels:  esp32, stm32
Atc
STM32 LL AT-Command parser
Stars: ✭ 53 (-56.56%)
Mutual labels:  esp32, stm32
Lws Esp32 Factory
Libwebsockets ESP32 Factory Application
Stars: ✭ 60 (-50.82%)
Mutual labels:  esp32, ota
firmware
设备固件库,适用于IntoRobot系列产品
Stars: ✭ 19 (-84.43%)
Mutual labels:  esp32, stm32
esp32FOTA
Experiments in firmware OTA updates for ESP32 dev boards
Stars: ✭ 185 (+51.64%)
Mutual labels:  ota, esp32
nanoFramework.WebServer
📦 Web server for nanoFramework packed with features: REST api using attributes, multithread requests, parameters in query URL, static files serving.
Stars: ✭ 15 (-87.7%)
Mutual labels:  esp32, stm32
FT800-FT813
Multi-Platform C code Library for EVE graphics controllers from FTDI / Bridgetek (FT810, FT811, FT812, FT813, BT815, BT816, BT817, BT818)
Stars: ✭ 80 (-34.43%)
Mutual labels:  esp32, stm32
Deviot
Sublime Text plugin for IoT development based in PlatformIO ecosystem (Arduino IDE)
Stars: ✭ 281 (+130.33%)
Mutual labels:  esp32, ota
Stm32 Ota
STM32-OTA on Arduino IDE
Stars: ✭ 72 (-40.98%)
Mutual labels:  stm32, ota
LMIC-node
LMIC-node | One example to rule them all. LMIC-node is an example LoRaWAN application for a node that can be used with The Things Network. It demonstrates how to send uplink messages, how to receive downlink messages, how to implement a downlink command and it provides useful status information. With LMIC-node it is easy to get a working node qu…
Stars: ✭ 108 (-11.48%)
Mutual labels:  esp32, stm32
MySQL MariaDB Generic
This MySQL_MariaDB_Generic library helps you connect your boards directly to a MySQL / MariaDB server, either local or cloud-based, so that you can store / retrieve data to / from the server. Supported boards are ESP8266/ESP32, WT32_ETH01 (ESP32 + LAN8720A), nRF52, SAMD21/SAMD51, STM32F/L/H/G/WB/MP1, Teensy, SAM DUE, Mega, RP2040-based boards, P…
Stars: ✭ 35 (-71.31%)
Mutual labels:  esp32, stm32
Home
🏠 The landing page for nanoFramework repositories.
Stars: ✭ 315 (+158.2%)
Mutual labels:  esp32, stm32

Stargazers Forks Issues License


Logo

OTA for STM32Fxx MCU using ESP32

Program your STM32Fxx 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 STM32Fxx series MCUs Over-the-Air using ESP32.

Testing was done with ESP32-DevKitC v4 board and STM32F103C8T6 (Blue Pill) and STM32F072C8T6. You can try with any other STM32Fxx MCUs and let us know how it worked out.

Code

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

/file_serving_stm -> 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 STM32, you can use the STM32 Blue Pill.

Prerequisites

  • ESP-IDF v4.0 and above

    You can visit the ESP-IDF Programmming Guide for the installation steps.

  • Arduino IDE

    Arduino IDE provides with an easy way to generate the .bin files for your STM32 MCU. For setting up Arduino Core for the STM32 family, you can follow this link.

    You can also use CubeIDE or Keil for generation of .bin files.

Setting Up

  1. Wire your STM32 (e.g. Blue Pill) to the ESP32 as follows:

    ESP32 STM32
    GPIO4(TX) PA10(RX)
    GPIO5(RX) PA9(TX)
    GPIO19 RESET
    GND GND
  2. Generate a .bin file for the STM32 MCU code you want to flash.

Disclaimer

We have assumed that the STM32 is already in boot mode before flashing the code (Step 1 & 5 in Usage section). You can use a MOSFET as a switch to automate the process, using an ESP32 GPIO as an input.

The program code uses only the path of the binary file to be flashed as a parameter. Thus, it can be easily integrated into any other projects as the file can be sent to ESP32 over any protocol (MQTT, HTTP Client, WebSockets).

Usage (For STM32 Blue Pill)

  1. Make sure the BOOT0 jumper pin on the board is set to 1 (programming mode) while uploading the code. Once the code is flashed this pin can be changed back to initial position (operating mode). This procedure with your STM32Fxx MCU varies according with your MCU version.

    Refer this documentation for help.

  1. Open the project configuration menu (idf.py menuconfig) go to Example Connection Configuration ->
    1. WiFi SSID: WiFi network to which your PC is also connected to.
    2. WiFi Password: WiFi password

  1. In order to test the OTA demo -> /file_serving_stm :
    1. Compile and burn the firmware idf.py -p PORT -b BAUD flash
    2. Run idf.py -p PORT monitor and note down the IP assigned to your ESP module. The default port is 80.
    3. Test the example interactively on a web browser (assuming IP is 192.168.43.82):
      • Open path http://192.168.43.82/ to see an HTML web page with list of files on the server (initially empty)
      • Use the file upload form on the webpage to select and upload a .bin file to the server
      • Click a file link to download / open the file on browser (if supported)
      • Click the delete link visible next to each file entry to delete them
      • Click on the flash link to flash the .bin code file uploaded to the connected STM32.

  1. After clicking the flash link, you should get the following results -

  1. Revert the BOOT0 pin to its initial position and press the RESET Button on the STM32.
  2. Voila! your STM32 is now running the code you uploaded Over-the-Air!

Troubleshooting

  • Check your wiring. Make sure that the ESP32 and STM32 are powered separately. Don't power one MCU using the other.
  • Verify your WiFi SSID and password.
  • Check if your STM32 is locked using this official tool by STMicroelectronics and unlock it by erasing the memory of your chip.
  • Check your STM32 code, which generated the .bin file, for any 'logical' errors.
  • For any other bugs or errors, you can always raise issues.

Contributors

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

Acknowledgements and Resources

License

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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].