'esp_ota_mark_app_valid_cancel_rollback' was not declared in this scope

I am installing a custom thermostat. I don’t want to remove and unwire it every time I update, however, I can’t fix / debug a crash from remote, so I need rollback. I modified the skdconfig file to include the line:


Hopefully that’s all I need to do to get rollback going…

‘esp_ota_mark_app_valid_cancel_rollback’ was not declared in this scope

I tried searching forever for an ESP library that includes that.

I found ota_ops.h… but then that sprouts errors that many identifiers haven’t been declared:

C:\Users\matt\Documents\Arduino\libraries\esp/ota_ops.h:56:7: error: 'esp_app_desc_t' does not name a type

 const esp_app_desc_t *esp_ota_get_app_description(void);


C:\Users\matt\Documents\Arduino\libraries\esp/ota_ops.h:214:79: error: 'esp_app_desc_t' has not been declared

 esp_err_t esp_ota_get_partition_description(const esp_partition_t *partition, esp_app_desc_t *app_desc);


C:\Users\matt\Documents\Arduino\libraries\esp/ota_ops.h:254:73: error: 'esp_ota_img_states_t' has not been declared

 esp_err_t esp_ota_get_state_partition(const esp_partition_t *partition, esp_ota_img_states_t *ota_state);