esp_ota_set_boot_partition doesn't work for factory partition

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

esp_ota_set_boot_partition doesn't work for factory partition

Postby aschweiz » Wed Nov 30, 2016 2:27 pm

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

ESP_igrr
Posts: 1658
Joined: Tue Dec 01, 2015 8:37 am

Re: esp_ota_set_boot_partition doesn't work for factory partition

Postby ESP_igrr » Wed Nov 30, 2016 9:11 pm

Thanks for reporting. I think this was not fixed when converting the code from spi_flash_* APIs to esp_partition_* APIs.

Who is online

Users browsing this forum: No registered users and 1 guest