OTA flash sector size inconsistent between bootloader and OTA component
Posted: 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
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