[Resolved] ESP_HTTPS_OTA gives memory allocation failed error
Posted: Wed Feb 02, 2022 5:57 pm
Here are the logs that i am getting in the terminal
i am sending url in json to esp32 (which is my http webserver) and starting ota task on that link but its giving error of memory allocation failed
logs during startup of ESP32
I (570) cpu_start: Application information:
I (575) cpu_start: Project name: template-app
I (580) cpu_start: App version: 7bcdc7e-dirty
I (586) cpu_start: Compile time: Feb 2 2022 22:32:05
I (592) cpu_start: ELF file SHA256: ec97cfa832198e8c...
I (598) cpu_start: ESP-IDF: v4.4-dev-3703-gddc44956bf-dirty
I (605) heap_init: Initializing. RAM available for dynamic allocation:
I (612) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (618) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (624) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (630) heap_init: At 3FFCC018 len 00013FE8 (79 KiB): DRAM
I (637) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (643) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (649) heap_init: At 4009AAC0 len 00005540 (21 KiB): IRAM
I (657) spi_flash: detected chip: generic
I (660) spi_flash: flash io: dio
I (676) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
log during ota start
I (40647) OTA: Starting OTA example<ESC>[0m<CR><LF>
I (40697) before OTA: [APP] Free memory: 121004 bytes<ESC>[0m<CR><LF>
E (40767) HTTP_CLIENT: Allocation failed<ESC>[0m<CR><LF>
E (40817) esp_https_ota: Failed to initialise HTTP connection<ESC>[0m<CR><LF>
I (40897) after OTA: [APP] Free memory: 124116 bytes<ESC>[0m<CR><LF>
E (40967) OTA: Firmware upgrade failed<ESC>[0m<CR><LF>
Please help me i am not getting much help on the internet in this issue While i figured out that this is heap size issue is there any way to clear all unnecessary heap before ota_start
Although i am also printing the availabe heap size before ota_start which is more than 110Kb still don't know what causing the issue.
looking forward for some breath taking solution
Thanks in advance !!!
cheers
i am sending url in json to esp32 (which is my http webserver) and starting ota task on that link but its giving error of memory allocation failed
logs during startup of ESP32
I (570) cpu_start: Application information:
I (575) cpu_start: Project name: template-app
I (580) cpu_start: App version: 7bcdc7e-dirty
I (586) cpu_start: Compile time: Feb 2 2022 22:32:05
I (592) cpu_start: ELF file SHA256: ec97cfa832198e8c...
I (598) cpu_start: ESP-IDF: v4.4-dev-3703-gddc44956bf-dirty
I (605) heap_init: Initializing. RAM available for dynamic allocation:
I (612) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (618) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (624) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (630) heap_init: At 3FFCC018 len 00013FE8 (79 KiB): DRAM
I (637) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (643) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (649) heap_init: At 4009AAC0 len 00005540 (21 KiB): IRAM
I (657) spi_flash: detected chip: generic
I (660) spi_flash: flash io: dio
I (676) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
log during ota start
I (40647) OTA: Starting OTA example<ESC>[0m<CR><LF>
I (40697) before OTA: [APP] Free memory: 121004 bytes<ESC>[0m<CR><LF>
E (40767) HTTP_CLIENT: Allocation failed<ESC>[0m<CR><LF>
E (40817) esp_https_ota: Failed to initialise HTTP connection<ESC>[0m<CR><LF>
I (40897) after OTA: [APP] Free memory: 124116 bytes<ESC>[0m<CR><LF>
E (40967) OTA: Firmware upgrade failed<ESC>[0m<CR><LF>
Please help me i am not getting much help on the internet in this issue While i figured out that this is heap size issue is there any way to clear all unnecessary heap before ota_start
Although i am also printing the availabe heap size before ota_start which is more than 110Kb still don't know what causing the issue.
looking forward for some breath taking solution
Thanks in advance !!!
cheers