LibreSolar / esp32-edge-firmware

Firmware for CAN/UART to WiFi/BLE gateway using ESP32
Apache License 2.0
26 stars 12 forks source link

Fixes ota firmware upgrade for STM32G431 #27

Closed Gretel5X closed 3 years ago

Gretel5X commented 3 years ago

I added a reset method to change the option bytes and a struct to hold information about the different MCUs used by LibreSolar. I restricted the chunk that is written to the bootloader to 128bytes. In theory, it could be 256bytes but that led to unclear errors. It only takes a few seconds longer since overhead is small anyway. I also changed the way the ID is extracted from the url because my 1210-HUS had an ID with length 2, which should not happen but but now the code is more robust and the ID can be whatever length.