OTA flash sector size inconsistent between bootloader and OTA component

aschweiz
Posts: 16
Joined: Wed Nov 30, 2016 1:57 pm

OTA flash sector size inconsistent between bootloader and OTA component

Postby aschweiz » Thu Dec 01, 2016 4:19 pm

Hi,

I guess the following is a bug:

The bootloader code assumes that the two flash sectors follow immediately after each other (bootloader_start.c):
sa = ota_select_map[0];
sb = ota_select_map[1];

The app_update component assumes a fixed distance of the two structures of SPI_FLASH_SEC_SIZE (=4096) bytes:
memcpy(&s_ota_select[0], result, sizeof(ota_select));
memcpy(&s_ota_select[1], result + SPI_FLASH_SEC_SIZE, sizeof(ota_select));

As a result, the bootloader will never see a valid second sector.

Could you please verify this?

Thanks and greetings
Andreas

ESP_Angus
Posts: 176
Joined: Sun May 08, 2016 4:11 am

Re: OTA flash sector size inconsistent between bootloader and OTA component

Postby ESP_Angus » Mon Dec 19, 2016 10:08 pm

Hi Andreas,

Thanks for reporting this, you are correct about the bug. We are testing a fix internally, it should be in esp-idf master soon.

Angus

Who is online

Users browsing this forum: No registered users and 1 guest