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

undefined reference to `esp_ble_gap_start_advertising' #6954

Closed
1 task done
Kampi opened this issue Jul 7, 2022 · 5 comments
Closed
1 task done

undefined reference to `esp_ble_gap_start_advertising' #6954

Kampi opened this issue Jul 7, 2022 · 5 comments
Assignees
Labels
IDE: PlaformIO Issue relates to PlatformIO IDE Status: Solved

Comments

@Kampi
Copy link

Kampi commented Jul 7, 2022

Board

esp32-c3-devkitm-1

Device Description

No

Hardware Configuration

No

Version

latest master (checkout manually)

IDE Name

PlatformIO

Operating System

Windows 10

Flash frequency

80MHz

PSRAM enabled

no

Upload speed

115200

Description

I try to compile a project for the ESP32-C3 by using esp-idf 4.4.1 in PlatformIO and the Arduino Core as a component. The linking failes, because of this error:

c:/users/konta/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: .pio\build\debug\esp-idf\arduino-esp32\libarduino-esp32.a(BLEAdvertising.o): in function `BLEAdvertising::start()':
C:\Users\konta\Desktop\firmware/components/arduino-esp32/libraries/BLE/src/BLEAdvertising.cpp:247: undefined reference to `esp_ble_gap_start_advertising'
c:/users/konta/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\konta\Desktop\firmware/components/arduino-esp32/libraries/BLE/src/BLEAdvertising.cpp:214: undefined reference to `esp_ble_gap_config_adv_data'
c:/users/konta/.platformio/packages/toolchain-riscv32-esp/bin/../lib/gcc/riscv32-esp-elf/8.4.0/../../../../riscv32-esp-elf/bin/ld.exe: C:\Users\konta\Desktop\firmware/components/arduino-esp32/libraries/BLE/src/BLEAdvertising.cpp:225: undefined reference to `esp_ble_gap_config_adv_data'

Compiling for the ESP32 Dev-board works without an issue.

Sketch

Nothing

Debug Message

Nothing

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@Kampi Kampi added the Status: Awaiting triage Issue is waiting for triage label Jul 7, 2022
@SuGlider SuGlider self-assigned this Jul 8, 2022
@SuGlider SuGlider added IDE: PlaformIO Issue relates to PlatformIO IDE and removed Status: Awaiting triage Issue is waiting for triage labels Jul 8, 2022
@SuGlider
Copy link
Collaborator

SuGlider commented Jul 8, 2022

@Kampi

I tested the BLE_server.ino example that uses this same API and I compiled it using the Arduino IDE with no errors.

I think it may be a problem of PlatformIO configuration from your side.
Please test your Project using the Arduino IDE if necessary.

If the problem persists, maybe you can open an issue within PlatformIO github.

@Kampi
Copy link
Author

Kampi commented Jul 8, 2022

CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y was not set in sdkconfig.

@Kampi Kampi closed this as completed Jul 8, 2022
@SuGlider
Copy link
Collaborator

SuGlider commented Jul 8, 2022

@valeros - Is this something that should be configured in the PIO side?
Please let me know.

@valeros
Copy link
Contributor

valeros commented Jul 11, 2022

Hi @SuGlider, everything is fine. It was a mixed IDF/Arduino project that required a special option in the sdkconfig.

@ZhongWwwHhh
Copy link

ZhongWwwHhh commented Sep 10, 2024

I also face this problem today. It only needs to tick CONFIG_BT_BLE_42_FEATURES_SUPPORTED=y in menuconfig

image

But it is not tick by default. And some document like this https://github.com/nkolban/esp32-snippets/blob/master/Documentation/BLE%20C%2B%2B%20Guide.pdf not mention this.

Could we add this to this document? https://docs.espressif.com/projects/arduino-esp32/en/latest/esp-idf_component.html

Thanks for the reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE: PlaformIO Issue relates to PlatformIO IDE Status: Solved
Projects
None yet
Development

No branches or pull requests

5 participants