Coder Social home page Coder Social logo

esp32-musings / ota_update_stm32_using_esp32 Goto Github PK

View Code? Open in Web Editor NEW
342.0 6.0 67.0 36.29 MB

Program STM32Fxx MCUs Over-the-Air using ESP32

License: MIT License

CMake 1.27% C 46.81% Python 51.91%
esp32 stm32 bluepill ota ota-firmware-updates programming firmware-update

ota_update_stm32_using_esp32's People

Contributors

laukik-hase avatar rickie95 avatar udit7395 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

ota_update_stm32_using_esp32's Issues

Flashing with DFU

A project I'm running builds to a DFU file instead of a .bin file. It's crashing before I can even upload the file. Is it possible to flash this? When I attempt to upload the 110KB DFU file it returns

I (18706) FILE_SERVER_HTTP: Found file : Blink.ino.bin (13492 bytes)
E (24596) FILE_SERVER_HTTP: Failed to create file : /spiffs/myproject.ino.dfu
W (24596) httpd_txrx: httpd_resp_send_err: 500 Internal Server Error - Failed to create file
W (24606) httpd_uri: httpd_uri: uri handler execution failed
E (24816) FILE_SERVER_HTTP: Failed to create file : /spiffs/myproject.ino.dfu
W (24826) httpd_txrx: httpd_resp_send_err: 500 Internal Server Error - Failed to create file
W (24836) httpd_uri: httpd_uri: uri handler execution failed

and on the webpage it shows

Server closed the connection abruptly!

URI Header too long

Hey, I am able to successfully upload the code on the local server but when I am pressing the flash button the web page breaks and I see this error (I (1540683) FILE_SERVER_HTTP: Found file : I2C_RTC.bin (11668 bytes)
I (1540693) FILE_SERVER_HTTP: Found file : UartTest.bin (8220 bytes)
I (1540703) FILE_SERVER_HTTP: Found file : blink.bin (4552 bytes)
I (1542803) FILE_SERVER_HTTP: Sending file : /blink.bin (4552 bytes)...
I (1542813) FILE_SERVER_HTTP: File sending complete
W (1548003) httpd_parse: parse_block: request URI/header too long
) when I monitor the COM port . I just built and flashed the file_serving_stm folder and flashed it, is it correct?

Replacing UART by RS485

Hello,

We have 2 boards, one ESP32 and one STM32. They are communicating by RS485 over UART with at each side one RS485 transceiver.
Do you think it's possible to download the STM32 firmware by RS485 ?

Thank you.

Compatibility with F407

I want to flash my STM32F407 discovery board, but I can't quite get it to work
I've tried it on a F103 (bluepill) and it worked fine.

Everything looks great, but after trying to erase memory, I get a sync failure.

Screenshot_20201110_230134

I (78643) : stm_pro_mode (initGPIO:78) GPIO Initialized
I (78643) : stm_flash (flashSTM:83) Writing STM32 Memory
I (78643) : stm_flash (writeTask:7) Write Task
I (78653) : stm_pro_mode (resetSTM:83) Starting RESET Procedure
I (78663) : stm_pro_mode (resetSTM:84) Toggling pin (19)
I (79263) : stm_pro_mode (resetSTM:91) Finished RESET Procedure
I (79263) : stm_pro_mode (cmdSync:117) SYNC, 0x7F
I (79263) : stm_pro_mode (sendBytes:222) Sync Success
I (79263) : stm_pro_mode (cmdGet:126) GET
I (79273) : stm_pro_mode (sendBytes:222) Sync Success
I (79273) : stm_pro_mode (cmdVersion:135) GET VERSION & READ PROTECTION STATUS
I (79283) : stm_pro_mode (sendBytes:222) Sync Success
I (79293) : stm_pro_mode (cmdId:144) CHECK ID
I (79293) : stm_pro_mode (sendBytes:222) Sync Success
I (79303) : stm_pro_mode (cmdErase:152) ERASE MEMORY
E (79303) : stm_pro_mode (sendBytes:228) Sync Failure
I (79313) : stm_pro_mode (cmdExtErase:169) EXTENDED ERASE MEMORY
I (79323) : stm_pro_mode (sendBytes:222) Sync Success
E (79913) : stm_pro_mode (sendBytes:234) Serial Timeout
I (79913) : stm_flash (writeTask:19) Writing block: 1
I (79913) : stm_pro_mode (flashPage:282) Flashing Page
I (79923) : stm_pro_mode (cmdWrite:186) WRITE MEMORY
E (80503) : stm_pro_mode (sendBytes:234) Serial Timeout
E (81083) : stm_pro_mode (sendBytes:234) Serial Timeout
E (81673) : stm_pro_mode (flashPage:321) Serial Timeout
I (81673) : stm_flash (flashSTM:92) STM32 Flashed Successfully!!!
I (81683) : stm_flash (flashSTM:95) Ending Connection
I (81683) : stm_pro_mode (resetSTM:83) Starting RESET Procedure
I (81693) : stm_pro_mode (resetSTM:84) Toggling pin (19)
I (82293) : stm_pro_mode (resetSTM:91) Finished RESET Procedure
I (82293) : stm_pro_mode (endConn:101) Ending Connection
I (82293) : stm_flash (flashSTM:98) Closing file
E (82293) : FILE_SERVER_HTTP (flash_post_handler:444) Target flashing failed

Have you tried it with an F4? Any idea on what I should test/debug? I've tried reducing the baud rate to 9600bps, which didn't help.

Here's are the packets during the attempted flash:
ota_stm32f4_uart_traffic.zip

Thanks!!

control BOOT0 pin from ESP

By adding an additional pin, controlling BOOT0, the whole programming operation can be automated without human intevention

running the project in vscode

Hello! thanks for the project. How to compile it in vscode if we have here two directories esp_stm_flash and file_serving_stm and each of them has its own main file?

For OTA updates for AVR MCUs, you can follow this project: ESP-LINK (ESP8266 it's cheaper)

The esp-link firmware connects a micro-controller to the internet using an ESP8266 Wifi module. It implements a number of features:

transparent bridge between Wifi and serial, useful for debugging or inputting into a uC
flash-programming attached Arduino/AVR microcontrollers and LPC800-series and other ARM microcontrollers via Wifi
built-in stk500v1 programmer for AVR uC's: program using HTTP upload of hex file
outbound REST HTTP requests from the attached micro-controller to the internet
MQTT client pub/sub from the attached micro-controller to the internet
serve custom web pages containing data that is dynamically pulled from the attached uC and that contain buttons and fields that are transmitted to the attached uC (feature not fully ready yet)

https://github.com/jeelabs/esp-link

flash ESP32 instead of STM32 after uploading the file to the file server

Hello! I downloaded the project about flashing ESP instead of STM32 through a file server on the link https://github.com/versamodule/ESP32-OTA-Webserver but I face some problems:

-I can't open menuconfig so as to set the SSID and password;
-When I try to build I get the error Unknown CMake command "register_component" . When I comment this line in CMakeLists.txt , the compilation is done but the flashin is not possible(command flash from idf.py not found).

Thanks for your sharing

It's a pretty good project.
While, I must recovery jumper cap of Boot pins and put down the reset button to ensure the program downloaded in MCU to restart.
In orther word, through ESP32 can flash the MCU wirelessly, we have to recover the wiring and reset it offline .

Serial Timeout ERROR

Hi for all, I am trying to use this example, but I couldnt it successfully. I got Serial timeout error.( esp32 and stm32 could not talk successfully. ) I have tried everything, powered up stm32 and esp32 with different sources, erased stm32 flash memory with STMFlashLoader, changed up baudrate, or buttons and still got error. What could be the reason of this?
Thank you...

D (337256) : stm_flash (flashSTM:74) File name: /spiffs/blink.bin
I (337256) : stm_pro_mode (initGPIO:76) GPIO Initialized
I (337256) : stm_flash (flashSTM:83) Writing STM32 Memory
I (337256) : stm_flash (writeTask:7) Write Task
I (337256) : stm_pro_mode (resetSTM:81) Starting RESET Procedure
I (337856) : stm_pro_mode (resetSTM:88) Finished RESET Procedure
I (337856) : stm_pro_mode (cmdSync:114) SYNC
E (337896) : stm_pro_mode (sendBytes:231) Serial Timeout
I (337896) : stm_pro_mode (cmdGet:123) GET
E (337936) : stm_pro_mode (sendBytes:231) Serial Timeout
I (337936) : stm_pro_mode (cmdVersion:132) GET VERSION & READ PROTECTION STATUS
E (337976) : stm_pro_mode (sendBytes:231) Serial Timeout
I (337976) : stm_pro_mode (cmdId:141) CHECK ID
E (338016) : stm_pro_mode (sendBytes:231) Serial Timeout
I (338016) : stm_pro_mode (cmdErase:149) ERASE MEMORY
E (338056) : stm_pro_mode (sendBytes:231) Serial Timeout
I (338056) : stm_pro_mode (cmdExtErase:166) EXTENDED ERASE MEMORY
E (338096) : stm_pro_mode (sendBytes:231) Serial Timeout
I (338106) : stm_flash (writeTask:19) Writing block: 1
I (338106) : stm_pro_mode (flashPage:279) Flashing Page
I (338106) : stm_pro_mode (cmdWrite:183) WRITE MEMORY
E (338146) : stm_pro_mode (sendBytes:231) Serial Timeout
E (338186) : stm_pro_mode (sendBytes:231) Serial Timeout
E (338496) : stm_pro_mode (flashPage:318) Serial Timeout
I (338496) : stm_flash (flashSTM:92) STM32 Flashed Successfully!!!
I (338496) : stm_flash (flashSTM:95) Ending Connection
I (338496) : stm_pro_mode (resetSTM:81) Starting RESET Procedure
I (339096) : stm_pro_mode (resetSTM:88) Finished RESET Procedure
I (339096) : stm_pro_mode (endConn:98) Ending Connection
I (339096) : stm_flash (flashSTM:98) Closing file
E (339096) : FILE_SERVER_HTTP (flash_post_handler:445) Target flashing failed

ESP32 can't using other Serial?

Can't I use other serial ports? Do I have to use the main serial port? I use ESP32, I can use Serial, but I can't use Serial2

fatal error: driver/uart.h: No such file or directory

Hello! I am trying to test the file_serving_stm project but I can´t manage to make it compile.
It throws the following error:
fatal error: driver/uart.h: No such file or directory

image

It would be really helpful if someone can help me to solutionate this.
Thanks! real

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.