ESP32 Bluetooth Stack Problem

Sysprogs forums Forums VisualGDB ESP32 Bluetooth Stack Problem

This topic contains 6 replies, has 2 voices, and was last updated by  JN 1 week, 5 days ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #25592

    JN
    Participant

    I have an existing esp-idf project to which I would like to add bluetooth. It was created with VGDB 5.3 or before. I tried enabling the bluetooth from the project properties. However, the project doesn’t load saying the below included inline code.

    I even tried creating a new project with the bt_discovery example code so as to port over the project config to my old project, but that didn’t load either. I have attached the project output for the newly created project for reference. Any help appreciated. I looked at the other post in this forum: https://sysprogs.com/w/forums/topic/esp32-problem-with-enabling-bt-stack/, but that didn’t help.

    Project Output

    CMake Error at C:/SysGCC/esp32/esp-idf/v3.2/tools/cmake/components.cmake:62 (add_library):
    No SOURCES given to target: bt
    Call Stack (most recent call first):
    C:/SysGCC/esp32/esp-idf/v3.2/components/bt/CMakeLists.txt:278 (register_component)

    Exception reported by CMake server: Failed to compute build system.
    fo2+r: Exception reported by CMake server: Failed to compute build system.
    at fo2.j1[_InType,_OutType](_InType a)
    at fo2.g1(String a)
    at mp2.i_4(Hello a)
    at fo2.n()

    Attachments:
    You must be logged in to view attached files.
    #25594

    support
    Keymaster

    Hi,

    It looks like your ESP-IDF installation is corrupt and is missing some files referenced by the CMake scripts. Please try building the project manually (using idf.py build) and ensure it builds without errors. If the build outside VisualGDB fails as well, please try reinstalling the toolchain/ESP-IDF and if it doesn’t help, try re-creating the project from scratch.

    #25595

    JN
    Participant

    Thanks for the prompt response. Had already redone the esp-idf & visualgdb installation prior. However, this time I used the release v3.3 and the project now loads and compiles fine.

    However, it fails at the linker. It can’t seem to find the references to the compiled bluetooth functions.
    error : undefined reference to esp_bt_gap_set_scan_mode
    error : undefined reference to esp_bt_gap_register_callback'
    error : undefined reference toesp_bt_gap_start_discovery'
    ....similar others`

    • This reply was modified 1 week, 5 days ago by  JN.
    #25597

    support
    Keymaster

    Hi,

    Does the project also fail at the linking stage when building it directly via command line (outside VisualGDB)?

    #25598

    JN
    Participant

    Yes it did also fail at the linker while compiling from the command line. I suppose the issue isn’t with VisualGDB now that esp-idf files were included and it is compiling.

    Any pointers? I have the Arduino included as a component per https://visualgdb.com/tutorials/esp32/arduino/component/ and am trying to use the BluetoothSerial library in it to quickly test the bluetooth functionality.

    • This reply was modified 1 week, 5 days ago by  JN.
    Attachments:
    You must be logged in to view attached files.
    #25601

    support
    Keymaster

    If the project also doesn’t build directly, it might be missing some configuration entries, or it might be meant for a different version of ESP-IDF (unfortunately, different ESP-IDF versions are not always backward-compatible). Please consider posting on the ESP32 forum to get support for ESP-IDF-specific issues.

    #25603

    JN
    Participant

    Will do. Thanks for the help! I now atleast have a project that loads and compiles.

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.