Esp32S3 : Is it possible to access the OTA partition where the firmware is running in order to change some bytes ?

ThomasESP32
Posts: 229
Joined: Thu Jul 14, 2022 5:15 am

Esp32S3 : Is it possible to access the OTA partition where the firmware is running in order to change some bytes ?

Postby ThomasESP32 » Mon Jun 24, 2024 3:28 pm

Good afternoon,


I would like to change some bytes of the OTA partition where my firmware is running in order to create a CRC problem.
The goal would be to detect this CRC problem using the function esp_partition_get_sha256.

Unfortunately, when I try to write some bytes of the current OTA partition using esp_flash_write (I try to change the 4 last bytes of the partition which are unused), or when I try to erase the last region of the current OTA partition using esp_flash_erase_region (The same way I try to erase the last region of the OTA partition), I get an abort() message and the chip is resetted.

However, when I do the same thing on the other OTA partition (Which is unused), the functions are called normally.

Do you have any idea please ?
The goal would be to change some bytes of the firmware in order to test my CRC check function.

Best regards,
Thank you for your help,

Thomas TRUILHE


Bryght-Richard
Posts: 40
Joined: Thu Feb 22, 2024 3:59 pm

Re: Esp32S3 : Is it possible to access the OTA partition where the firmware is running in order to change some bytes ?

Postby Bryght-Richard » Wed Jun 26, 2024 4:40 pm

Does it need to be during app operation? If not, you could erase 1 page of your firmware using esptool, like https://docs.espressif.com/projects/esp ... ase-region

Who is online

Users browsing this forum: Baidu [Spider] and 96 guests