esp-iot-solution icon indicating copy to clipboard operation
esp-iot-solution copied to clipboard

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

Open gallex opened this issue 1 year ago • 1 comments

Answers checklist.

  • [X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • [X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • [X] I have searched the issue tracker for a similar issue and not found a similar issue.

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

gallex avatar Dec 02 '23 17:12 gallex

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:
  • Specify the bootloader_support_plus storage path in the yml file of the main directory. main_yml

  • Specify the bootloader_support_plus storage path in the yml file of the bootloader_components directory. bootloader_yml

WangYuxin-esp avatar Dec 04 '23 11:12 WangYuxin-esp