Page 1 of 1

esp_ota_set_boot_partition doesn't work for factory partition

Posted: Wed Nov 30, 2016 2:27 pm
by aschweiz
The function esp_ota_set_boot_partition returns ESP_ERR_INVALID_ARG if I call it with the factory partition.

I guess the issue is with this call:
return esp_partition_erase_range(find_partition, find_partition->address, find_partition->size);

After a quick look at esp_partition_erase_range, I guess the address is an offset within the partition, so the call above should be changed to:
return esp_partition_erase_range(find_partition, 0, find_partition->size);

Is that correct?

cheers
Andreas

Re: esp_ota_set_boot_partition doesn't work for factory partition

Posted: Wed Nov 30, 2016 9:11 pm
by ESP_igrr
Thanks for reporting. I think this was not fixed when converting the code from spi_flash_* APIs to esp_partition_* APIs.