ESP-OTA setup esp_ota_ops.h: No such file or directory

djoshi
Posts: 53
Joined: Wed Jan 12, 2022 9:59 pm

ESP-OTA setup esp_ota_ops.h: No such file or directory

Postby djoshi » Mon Mar 14, 2022 4:26 pm

Hi All

I am trying to run the following code to update the ESP32

Code: Select all

void update_fwm(void)
{
    esp_http_client_config_t config = {
        .url = "https://abc.com/ESP32/Device1/fmw.bin",
        //.cert_pem = (char *)server_cert_pem_start,
    };
    esp_err_t ret = esp_https_ota(&config);
    if (ret == ESP_OK) {
        esp_restart();
    } else {
        return ESP_FAIL;
    }
    return ESP_OK;

}
When I perform a build

I get the following

Code: Select all

../main/azure_iot_freertos_esp32_main.c:23:11: fatal error: esp_ota_ops.h: No such file or directory
  #include "esp_https_ota.h"
           ^~~~~~~~~~~~~~~
From my understanding, all the header files are dealt with by the compiler. Is there a reason why it's giving be this error? Do i need to add this file some specify it.

SHouldent this be all in ESP32 folder?

mschultz
Posts: 8
Joined: Mon Apr 26, 2021 6:41 pm

Re: ESP-OTA setup esp_ota_ops.h: No such file or directory

Postby mschultz » Mon Mar 14, 2022 11:32 pm

Not sure I can help you, aside from saying that at least for the ESP-IDF master branch (5.0) the header file you're looking for is in

esp_idf_dir/components/esp_https_ota/include/esp_https_ota.h

If I add a
#include "esp_https_ota.h"
in one of my ESP projects, the compiler finds and includes it just fine.

Who is online

Users browsing this forum: Basalt, Bing [Bot] and 333 guests