espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
12.93k stars 7.09k forks source link

fatal error: esp_nimble_hci.h: No such file or directory (IDFGH-13110) #14057

Open zzzh opened 2 weeks ago

zzzh commented 2 weeks ago

Answers checklist.

IDF version.

v5.2.1

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

no error

What is the actual behavior?

fatal error: esp_nimble_hci.h: No such file or directory

Steps to reproduce.

  1. include "esp_nimble_hci.h" in a c file.

  2. idf.py set-target esp32c2
  3. idf.py menuconfig, enable vluetooth and select NimBLE - BLE only
  4. idf.py build

Build or installation Logs.

../main/ble1.c:22:10: fatal error: esp_nimble_hci.h: No such file or directory
   22 | #include "esp_nimble_hci.h"
      |          ^~~~~~~~~~~~~~~~~~
compilation terminated.

More Information.

No response

rahult-github commented 2 weeks ago

Hi @zzzh ,

include "esp_nimble_hci.h" in a c file.

This step is incorrect. May i know why you are explicitly including this file ? The VHCI interface is not used in esp32c2 and hence this file won't be found during compilation for esp32c2.