Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link failure with BT (CON-1149) #926

Closed
jonsmirl opened this issue May 11, 2024 · 4 comments
Closed

Link failure with BT (CON-1149) #926

jonsmirl opened this issue May 11, 2024 · 4 comments

Comments

@jonsmirl
Copy link
Contributor

jonsmirl commented May 11, 2024

I just updated my esp-matter and I can't link. This is because I am allowing BSS in external memory

/home/jonsmirl/.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/bt/libbt.a(bt.c.obj):(.literal.esp_bt_mem_release+0x0): undefined reference to `_bt_bss_start'
/home/jonsmirl/.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/bt/libbt.a(bt.c.obj):(.literal.esp_bt_mem_release+0x4): undefined reference to `_bt_bss_end'
/home/jonsmirl/.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/bt/libbt.a(bt.c.obj):(.literal.esp_bt_mem_release+0x20): undefined reference to `_bt_data_start'
/home/jonsmirl/.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/bt/libbt.a(bt.c.obj):(.literal.esp_bt_mem_release+0x24): undefined reference to `_bt_data_end'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/jonsmirl/l6/build/log/idf_py_stderr_output_1242968 and /home/jonsmirl/l6/build/log/idf_py_stdout_output_1242968

I need this fix before I could link again

If you are having problems at link time, can you try removing the following lines from the component/bt/linker.lf file:

    if ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY = y:
        * (extram_bss)
and try compiling again.
@github-actions github-actions bot changed the title Link failure with BT Link failure with BT (CON-1149) May 11, 2024
@shubhamdp
Copy link
Contributor

This is something that is broken in IDF and we somehow pulled this in when updating the connectedhomeip submodule to fix crashes during ble-deinit sequence.

Can you please try to disable ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY for short run? This will be fixed in next IDF release or I'll check how this can be fixed in connectedhomeip.

@tanishqmanuja
Copy link

tanishqmanuja commented May 15, 2024

I am also having same issue with light_switch example .. i am new to such big build systems, can someone point towards the right file to fix. Where should i define this ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY to 0 ?

EDIT:
Got the symbol from search in menuconfig

@shubhamdp
Copy link
Contributor

This is fixed with esp-idf v5.2.2, can be used with CONFIG_ ESP_ALLOW_BSS_SEG_EXTERNAL_MEMORY=y. Please close the issue if resolved.

@dhrishi
Copy link
Collaborator

dhrishi commented Sep 9, 2024

Closing it now. Please re-open if you see this

@dhrishi dhrishi closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants