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

esp-as-lib with CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y doesn't build (IDFGH-4444) #6274

Closed
meros opened this issue Dec 15, 2020 · 2 comments
Closed

Comments

@meros
Copy link

meros commented Dec 15, 2020

Environment

  • Development Kit: ESP32-Wrover-Kit
  • Kit version WroverKit: v4
  • Module or chip used: ESP32-WROOM-32D
  • IDF version (run git describe --tags to find it):
    v4.3-dev-2136-gb0150615d
  • Build System: cmake (idf-as-lib)
  • Compiler version (run xtensa-esp32-elf-gcc --version to find it):
    xtensa-esp32-elf-gcc (crosstool-NG esp-2020r3) 8.4.0
  • Operating System: macOS
  • (Windows only) environment type: [MSYS2 mingw32|ESP Command Prompt|Plain Command Prompt|PowerShell].
  • Using an IDE?: No
  • Power Supply: USB

Problem Description

Using idf-as-lib build method, enabling CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y causes an undefined reference to `esp_gdbstub_panic_handler' during linkage of esp_system

Expected Behavior

esp_system should link with esp_gdbstub when this flag is set (manually updating esp_system to include this dep 'fixes' the problem)

Actual Behavior

esp_system doesn't link with esp_gdbstub causing undefined reference

Steps to reproduce

  1. step1
    clone esp-idf
  2. build examples/build_system/cmake/idf_as_lib according to README.md (this should work)
  3. change ESP System settings to use CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y
  4. build again, this will fail with the undefined reference described above

Debug Logs

l  -u pthread_include_pthread_cond_impl  -u pthread_include_pthread_local_storage_impl  -u vfs_include_syscalls_impl  -L /Users/meros/git/above/ahhbe-fw-esp32/external/esp-idf/components/esp_wifi/lib/esp32 && :
/Volumes/git/above/ahhbe-fw-esp32/external/espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/esp_system/libesp_system.a(panic.c.obj):(.literal.esp_panic_handler+0x30): undefined reference to `esp_gdbstub_panic_handler'
/Volumes/git/above/ahhbe-fw-esp32/external/espressif/tools/xtensa-esp32-elf/esp-2020r3-8.4.0/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: esp-idf/esp_system/libesp_system.a(panic.c.obj): in function `esp_panic_handler':
/Users/meros/git/above/ahhbe-fw-esp32/external/esp-idf/components/esp_system/panic.c:287: undefined reference to `esp_gdbstub_panic_handler'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Other items if possible

sdkconfig.zip

@github-actions github-actions bot changed the title esp-as-lib with CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y doesn't build esp-as-lib with CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y doesn't build (IDFGH-4444) Dec 15, 2020
@Alvin1Zhang
Copy link
Collaborator

Thanks for the report and letting us know, we will look into.

@renzbagaporo
Copy link
Contributor

Hi @meros, incidentally, there is a pending MR that solves this. This should be in the public repo in the coming days.

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

3 participants