Page 1 of 1

undefined reference to `esp_ble_hidd_dev_init'

Posted: Fri Oct 25, 2024 3:28 pm
by magesing
I'm trying to make a simple bluetooth media controller which will use an esp32 to cause a paired phone to change the song its playing. I have been basing my code on the generic_gpio, esp_hid_device examples

the code is available here:
https://github.com/ohcfe/OneButtonMediaRemote

Currently I'm struggling with a linking error. When I try to build the project I get the following linking error

Code: Select all

/home/mgesing/.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_hid/libesp_hid.a(esp_hidd.c.obj):(.literal.esp_hidd_dev_init+0x0): undefined reference to `esp_ble_hidd_dev_init'
/home/mgesing/.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_hid/libesp_hid.a(esp_hidd.c.obj): in function `esp_hidd_dev_init':
/home/mgesing/src/esp/esp-idf/components/esp_hid/src/esp_hidd.c:32:(.text.esp_hidd_dev_init+0x18): undefined reference to `esp_ble_hidd_dev_init'
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/mgesing/Documents/MediaControlEsp32/AndrewsMediaRemote/build/log/idf_py_stderr_output_54853 and /home/mgesing/Documents/MediaControlEsp32/AndrewsMediaRemote/build/log/idf_py_stdout_output_54853
I'm assuming there's something wrong with one of my various `CMakeLists.txt` files... what should I change to link to the object containing `esb_ble_hidd_dev_init` properly?

Re: undefined reference to `esp_ble_hidd_dev_init'

Posted: Sat Oct 26, 2024 11:20 pm
by nopnop2002
You probably need this.
After adding this, you need to delete sdkconfig.
https://github.com/espressif/esp-idf/bl ... g.defaults