Undefined reference to `esp_image_basic_verify' Linker Error


Try to implement ESP32-IDF OTA project, but have very strange linker error:

Linking .pioenvs/node32s/firmware.elf
.pioenvs/node32s/libapp_update.a(esp_ota_ops.o):(.literal.esp_ota_end+0x0): undefined reference to esp_image_basic_verify' .pioenvs/node32s/libapp_update.a(esp_ota_ops.o): In functionesp_ota_end’:
…/.platformio/packages/framework-espidf/components/app_update/esp_ota_ops.c:218: undefined reference to esp_image_basic_verify' .pioenvs/node32s/libapp_update.a(esp_ota_ops.o): In functionesp_ota_set_boot_partition’:
…/.platformio/packages/framework-espidf/components/app_update/esp_ota_ops.c:359: undefined reference to `esp_image_basic_verify’
collect2: error: ld returned 1 exit status
*** [.pioenvs/node32s/firmware.elf] Error 1

Code seems to be ok, maybe somebody knows how to add necessary libs to linker?


Have you tried this example?

Thank you!

I tried to compile this example: GitHub - classycodeoss/esp32-ota-https: Secure over-the-air updates for the ESP32 platform

Code you suggest seems to be ok to start. I’ll try it.

Tried to use this example.
Well… There a some errors in Platformio too.

For example:
error: ‘esp_ota_get_running_partition’ was not declared in this scope
error: ‘esp_ota_get_next_update_partition’ was not declared in this scope

When i tried to find this functions in “esp_ota_ops.h” platformio i did not find anything like that.
Pretty strange to understand that platformio esp-idf differ from original one.


Example you provided was in ESP-IDF previous version.

Hi, thecashit

Were you able to get the classycodeoss esp32-ota-https example to run with Platformio? In another post you said you “need to remove “bootloader_support” from ignore_dirs variable in platformio espidf.py.” Can you give more details (location of file or settings)?

Thanks for your help.