undefined reference to `esp_ble_hidd_dev_init'

magesing
Posts: 3
Joined: Tue Sep 03, 2024 6:42 pm

undefined reference to `esp_ble_hidd_dev_init'

Postby magesing » Fri Oct 25, 2024 3:28 pm

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?

nopnop2002
Posts: 111
Joined: Thu Oct 03, 2019 10:52 pm
Contact:

Re: undefined reference to `esp_ble_hidd_dev_init'

Postby nopnop2002 » Sat Oct 26, 2024 11:20 pm

You probably need this.
After adding this, you need to delete sdkconfig.
https://github.com/espressif/esp-idf/bl ... g.defaults

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 208 guests