Skip to content

Doesn't compile in esp-idf 6.0 #610

@rajeev1982

Description

@rajeev1982

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

What is the expected behavior?

I am using esp-idf 6.0 and trying to write a simple example app. I should be able to include espp/led as a dependency and use the example code given in the library.

What is the actual behavior?

I am getting error while building. In the include/led.hpp file, below errors is displayed

fatal error: driver/ledc.h: No such file or directory

Steps to reproduce.

  1. Create a new esp-idf project and use idf version 6.0
  2. Include the library as dependency using below command ```
    df.py add-dependency "espp/led^1.0.36"
3. Clean and build you project

### Build or installation Logs.

```plain
In file included from /Users/rajeev/Workspace/HomeLab/automation/power-sensor/managed_components/espp__led/src/led.cpp:1:
/Users/rajeev/Workspace/HomeLab/automation/power-sensor/managed_components/espp__led/include/led.hpp:9:10: fatal error: driver/ledc.h: No such file or directory
    9 | #include <driver/ledc.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.

More Information.

If you add REQUIRES esp_driver_ledc in the component CMakeFile the error goes away.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions