Hi there.
I have used the base template to create an empty IDF project. (working in VS Code)
I then created a component, called LedDriver. This is going to communicate with a serial LED using the RMT peripheral. In the header file I have written #include "driver/rmt_tx.h"
My component CMakeLists.txt contains:
idf_component_register(SRCS "SerialLedDriver.cpp"
INCLUDE_DIRS "include")
When I attempt to compile my code I get the following error:
components/LedDriver/include/LedDriver.hpp:4:10: fatal error: driver/rmt_tx.h: No such file or directory
4 | #include "driver/rmt_tx.h"
| ^~~~~~~~~~~~~~~~~
compilation terminated.
However, in the file LedDriver.hpp I can CTRL+LEFT-CLICK into the file rmt_tx.h. This makes me believe that I am missing a configuration somewhere.
How can I tell the compiler to look in the ESP IDF components to find this header file for my custom component?
Many thanks
Include RMT peripheral API in custom component.
-
- Posts: 9759
- Joined: Thu Nov 26, 2015 4:08 am
Re: Include RMT peripheral API in custom component.
Add a 'REQUIRES driver' there.idf_component_register(SRCS "SerialLedDriver.cpp"
INCLUDE_DIRS "include")
Re: Include RMT peripheral API in custom component.
Thank you! Solved
Who is online
Users browsing this forum: No registered users and 154 guests