I have currently problem with http_client_perform function, when i try to call http_client_perform function i have "Guru Meditation Error: Core 0 panic'ed (Instruction access fault). Exception was unhandled." error.
there is solution to that. I tried disable NEWLIB_NANO_FORMAT but in VS Code extension for esp idf skdconfig file is always generated with enabled NEWLIB_NANO_FORMAT even if i disable it in config.
Below is part of my code for http_client_perform
Code: Untitled.c Select all
_Bool OTA_IsUpdateAvailable(){
DEBUG_LOG_OTA("Looking for firmware");
esp_http_client_config_t http_client_config={.url=FIRMWARE_INFO_URL,.event_handler=_http_event_handler};
DEBUG_LOG_OTA("Creating http client");
esp_http_client_handle_t client=esp_http_client_init(&http_client_config);
DEBUG_LOG_OTA("Client perform");
//DEBUG_LOG_OTA("Firmware%s",http_client_config.url);
esp_err_t error= esp_http_client_perform(client);
if(error==ESP_OK){
cJSON * json=cJSON_Parse(Otadrv.RCV_Buff);
if(json==NULL){
DEBUG_LOG_OTA("Invalid JSON");
}else{
cJSON * boot_hash=cJSON_GetObjectItemCaseSensitive(json,"boot_hash");
cJSON * firmware_hash=cJSON_GetObjectItemCaseSensitive(json,"firmware_hash");
cJSON * file=cJSON_GetObjectItemCaseSensitive(json,"file");
DEBUG_LOG_OTA("boot_hash:%s\n",boot_hash->valuestring);
DEBUG_LOG_OTA("firmware_hash:%s\n",firmware_hash->valuestring);
DEBUG_LOG_OTA("file:%s\n",file->valuestring);
}
}
esp_http_client_cleanup(client);
return false;
}
I'm using esp-idf 5.1.1 version.
Thanks in advance.