how to check firmware bin file of another microcontroller like STM32 on esp32 before writing it to SPIFFS ?

aygh4266
Posts: 20
Joined: Mon Mar 04, 2024 10:33 am

how to check firmware bin file of another microcontroller like STM32 on esp32 before writing it to SPIFFS ?

Postby aygh4266 » Wed Oct 02, 2024 8:58 am

Hello everyone,

I managed to get the STM32 to update through esp32. I send the firmware bin file from a PC to esp32 using BT. The esp32 saves it in SPIFFS and forwards it to stm32. My scenario is, how can I first check the firwmare bin file for digital signature on the esp32 side before it is written to SPIFFS. Can esp32 even do that, when the firware file has been signed from STM32 itself.

Best regards

MicroController
Posts: 1597
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: how to check firmware bin file of another microcontroller like STM32 on esp32 before writing it to SPIFFS ?

Postby MicroController » Wed Oct 02, 2024 9:50 am

aygh4266 wrote:
Wed Oct 02, 2024 8:58 am
Can esp32 even do that, when the firware file has been signed from STM32 itself.
ST seems to use a port of mcuboot for secure boot and firmware updates. mcuboot also has a port for Espressif chips, so it should be doable to use mcuboot code to verify a 'foreign' FW image on an ESP. It seems however that this might take quite some fiddling around with mcuboot, so the question is if this would be worth it.
Maybe a preliminary CRC or SHA check on the ESP is sufficient, detecting corrupted transmissions on the ESP while leaving the signature verification to the STM32.

Who is online

Users browsing this forum: No registered users and 79 guests