Update from 4.4 to 5.2 leads to linker errors

N3xus132
Posts: 5
Joined: Mon Jun 10, 2024 8:45 pm

Update from 4.4 to 5.2 leads to linker errors

Postby N3xus132 » Mon Jun 10, 2024 9:04 pm

Hi all!

This is my first post in this forum and I hope that you are able to help me.

I inherited a project that uses IDF 4.4. Because of the maintenance period I now wanted to update the complete Project to the latest one (5.2.1).
I did this by downloading the IDF 5.2.1 to my Laptop and running the build. Of course many problems popped up so I solved one after the other. During this process it was necessary to manually go through the sdkconfig file because nearly none of the settings that were used were correctly translated or reused. It seems that most of them were set to the defaults.

Now I got stuck with the following error message:

Code: Select all

/Documents/esp/.espressif/python_env/idf5.2_py3.9_env/bin/python /Users/-/Documents/esp/v5.2.1/esp-idf/components/esptool_py/esptool/espsecure.py sign_data -k secure_boot_signing_key2.pem -v 2 --append_signatures -o signed_bootloader.bin build/bootloader/bootloader.bin" && /opt/homebrew/Cellar/cmake/3.28.2/bin/cmake -E echo "Secure boot enabled, so bootloader not flashed automatically." && /opt/homebrew/Cellar/cmake/3.28.2/bin/cmake -E echo "      /Users/-/Documents/esp/.espressif/python_env/idf5.2_py3.9_env/bin/python  /Users/-/Documents/esp/v5.2.1/esp-idf/components/esptool_py/esptool/esptool.py --chip esp32s2 --port=(PORT) --baud=(BAUD) --before=default_reset --after=no_reset write_flash --flash_mode dio --flash_freq 80m --flash_size keep 0x1000 /Users/-/Documents/project/build/bootloader/bootloader.bin" && /opt/homebrew/Cellar/cmake/3.28.2/bin/cmake -E echo ==============================================================================
/Users/-/Documents/esp/.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_hw_support/libesp_hw_support.a(rtc_time.c.obj):(.literal.startup.enable_timer_group0_for_calibration+0x4): undefined reference to `periph_rcc_acquire_enter'
/Users/-/Documents/esp/.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_hw_support/libesp_hw_support.a(rtc_time.c.obj):(.literal.startup.enable_timer_group0_for_calibration+0x8): undefined reference to `periph_rcc_acquire_exit'
/Users/-/Documents/esp/.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_hw_support/libesp_hw_support.a(rtc_time.c.obj): in function `enable_timer_group0_for_calibration':
/Users/-/Documents/esp/v5.2.1/esp-idf/components/esp_hw_support/port/esp32s2/rtc_time.c:266:(.text.startup.enable_timer_group0_for_calibration+0x6): undefined reference to `periph_rcc_acquire_enter'
/Users/-/Documents/esp/.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: /Users/-/Documents/esp/v5.2.1/esp-idf/components/esp_hw_support/port/esp32s2/rtc_time.c:266:(.text.startup.enable_timer_group0_for_calibration+0x53): undefined reference to `periph_rcc_acquire_exit'
Can somebody help me with this error?
Is there generally a more straightforward way to update the IDF?

Thanks in advance!

ESP_Sprite
Posts: 9727
Joined: Thu Nov 26, 2015 4:08 am

Re: Update from 4.4 to 5.2 leads to linker errors

Postby ESP_Sprite » Tue Jun 11, 2024 5:37 am

Strange. Do you still get this when you delete the 'build' directory and do a full rebuild?

N3xus132
Posts: 5
Joined: Mon Jun 10, 2024 8:45 pm

Re: Update from 4.4 to 5.2 leads to linker errors

Postby N3xus132 » Tue Jun 11, 2024 6:20 am

Yes, unfortunately the problem still exists after a complete rebuild.

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: Update from 4.4 to 5.2 leads to linker errors

Postby chegewara » Tue Jun 11, 2024 8:05 am

Did you finish update with

Code: Select all

git submodule update
and
./install.sh

ESP_Sprite
Posts: 9727
Joined: Thu Nov 26, 2015 4:08 am

Re: Update from 4.4 to 5.2 leads to linker errors

Postby ESP_Sprite » Tue Jun 11, 2024 9:57 am

Can you share your sdkconfig file? EDIT: Also what ^^ said.

N3xus132
Posts: 5
Joined: Mon Jun 10, 2024 8:45 pm

Re: Update from 4.4 to 5.2 leads to linker errors

Postby N3xus132 » Tue Jun 11, 2024 3:33 pm

chegewara wrote:
Tue Jun 11, 2024 8:05 am
Did you finish update with

Code: Select all

git submodule update
and
./install.sh
I made the update to the new IDF by installing the new version using VS Code. Nevertheless I went to the folder and ran the commands above. Unfortunately without success. The same error still shows up.
ESP_Sprite wrote: Can you share your sdkconfig file? EDIT: Also what ^^ said.
I attached the sdkconfig (as a txt to fulfill the requirements of the forum).
Attachments
sdkconfig.txt
(62.05 KiB) Downloaded 56 times

N3xus132
Posts: 5
Joined: Mon Jun 10, 2024 8:45 pm

Re: Update from 4.4 to 5.2 leads to linker errors

Postby N3xus132 » Tue Jun 11, 2024 8:41 pm

I also realized now that it seems to happen if I enable the option CONFIG_BOOTLOADER_RESERVE_RTC_SIZE in menuconfig.
Does it help somehow?

N3xus132
Posts: 5
Joined: Mon Jun 10, 2024 8:45 pm

Re: Update from 4.4 to 5.2 leads to linker errors

Postby N3xus132 » Tue Jun 18, 2024 9:13 pm

No ideas somebody?

DreadNaught
Posts: 8
Joined: Thu May 09, 2024 1:17 am

Re: Update from 4.4 to 5.2 leads to linker errors

Postby DreadNaught » Thu Jun 20, 2024 6:09 pm

I am fairly new to IDF and just migrated a project from IDF 4.4 to 5.2.
It also had many linking errors when the 4.4 project was opened in 5.2

My solution was to create a new project in IDF 5.2 using the template-app and copy over the source code.
It did have a few different #include errors, but the migration documents showed the old and new include name.

chegewara
Posts: 2364
Joined: Wed Jun 14, 2017 9:00 pm

Re: Update from 4.4 to 5.2 leads to linker errors

Postby chegewara » Thu Jun 27, 2024 11:59 pm

N3xus132 wrote:
Tue Jun 11, 2024 8:41 pm
I also realized now that it seems to happen if I enable the option CONFIG_BOOTLOADER_RESERVE_RTC_SIZE in menuconfig.
Does it help somehow?
It looks like a bug to report on github

Who is online

Users browsing this forum: No registered users and 99 guests