espressif / esp-iot-solution

Espressif IoT Library. IoT Device Drivers, Documentations And Solutions.
Apache License 2.0
1.88k stars 755 forks source link

Change normal OTA to use bootloader_support_plus , compile error (AEGHB-475) #315

Open gallex opened 9 months ago

gallex commented 9 months ago

Answers checklist.

IDF version.

V5.5

Espressif SoC revision.

ESC32

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

Development Kit.

CustomerBoard

Steps to reproduce.

  1. I have make a OTA project, it run OK.
  2. I add bootloader_support_plus as dependency module, It can't compile

Build Logs.

.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/esp_https_ota/libesp_https_ota.a(esp_https_ota.c.obj):(.literal.esp_https_ota_begin+0x4c): undefined reference to `__wrap_esp_ota_get_next_update_partition'
.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/esp_https_ota/libesp_https_ota.a(esp_https_ota.c.obj): in function `esp_https_ota_begin':
/home/lg/esp/esp-idf/components/esp_https_ota/src/esp_https_ota.c:350:(.text.esp_https_ota_begin+0x212): undefined reference to `__wrap_esp_ota_get_next_update_partition'
.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/app_update/libapp_update.a(esp_ota_ops.c.obj):(.literal.image_validate+0x4): undefined reference to `__wrap_esp_image_verify'
.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/app_update/libapp_update.a(esp_ota_ops.c.obj): in function `image_validate':
/home/lg/esp/esp-idf/components/app_update/esp_ota_ops.c:114:(.text.image_validate+0x14): undefined reference to `__wrap_esp_image_verify'
.espressif/tools/xtensa-esp-elf/esp-13.2.0_20230928/xtensa-esp-elf/bin/../lib/gcc/xtensa-esp-elf/13.2.0/../../../../xtensa-esp-elf/bin/ld: esp-idf/app_update/libapp_update.a(esp_ota_ops.c.obj): in function `esp_ota_end':
/home/lg/esp/esp-idf/components/app_update/esp_ota_ops.c:365:(.text.esp_ota_end+0x46): undefined reference to `__wrap_esp_image_verify'
collect2: error: ld returned 1 exit status

More Information.

No response

WangYuxin-esp commented 9 months ago

Thanks for reporting it. Here is an example of using bootloader_support_plus. By default, it uses the IDF Component Manager mechanism to import the component.
Of course, if you are used to putting components in the components directory, you can still do so. But this requires adding some additional modifications in your project. This includes: 1) Create a components directory in the same level directory as the main directory and move the bootloader_support_plus to the components directory.
2) Modify the yml file that uses this component. This includes: