Firmware update through Ethernet

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
GaelZorro
Posts: 2
Joined: Wed Jul 08, 2020 3:59 pm

Firmware update through Ethernet

Post by GaelZorro »

Hello to all,

I'm quite new to the STM32, I made some projects with ESP8266 / ESP32 and I'm in the process of porting these to customs boards with STM32F103 and a W5500 ethernet interface base because I think it is better solution...
One feature that I'm using very often is the remote firmware update, via an HTTP web server or by downloading the BIN file from a specific URL.
These particular units will be hidden in not easily accessible locations so a remote firmware update without having to plug in a USB or FTDI is really important!

I'm looking for examples of this using stm32duino, but I can't seem to find any. I am not an expert programmer, do you think it would be possible for me to port something like the "Update" library from the arduino-esp32 : (https://github.com/espressif/arduino-es ... ies/Update) for use onto the STM32F103?

Thanks in advance for any advice!

User avatar
Juraj
Posts: 28
Joined: Fri Jan 03, 2020 7:47 pm
Answers: 1
Location: Slovakia
Contact:

Re: Firmware update through Ethernet

Post by Juraj »

My ArduinoOTA library still doesn't have support for STM32, but you could try the upload over SD card with the SD bootloader. Use the ATmega_SD example.
https://github.com/jandrassy/ArduinoOTA
viewtopic.php?f=67&t=144

I work on testing it, but I can't make my Blue Pill reliably work with SPI devices. (I blame my bad soldering of headers right now.)

GaelZorro
Posts: 2
Joined: Wed Jul 08, 2020 3:59 pm

Re: Firmware update through Ethernet

Post by GaelZorro »

Thanks for the suggestion!

I've seen that it is possible, but due to the fact that these units will be hidden there's no easy way to access the hardware.

I guess I'll play around with it and try to make something work, I don't see why it wouldn't be possible. The MCU I work with is the STM32F103RE and with 512K of flash there's plenty of space.

User avatar
Juraj
Posts: 28
Joined: Fri Jan 03, 2020 7:47 pm
Answers: 1
Location: Slovakia
Contact:

Re: Firmware update through Ethernet

Post by Juraj »

I don't suggest update from SD card. The file to SD card is uploaded over network. Then the MCU is reset and the SD bootloader bootloads the binary.

Of course better is to use the upper half of the internal flash to store the uploaded binary and then before reset copy it to final location in flash with a function running in RAM.

Post Reply

Return to “General discussion”