Dear all,
I have imported a framework 5.1.1 project into framework 5.1.2, and now the linker can't find some header files. I used the File-> Import facility.
I need the header files spi_master.h and spi_common.h, but how do I get them included? I have tried several permutations, but none works.
The path of the header files is: /frameworks/esp-idf-v5.1.2/components/driver/spi/include/driver/spi_master.h and the same for spi_common.h.
My CMakeLists.txt for the component needing the spi is:
idf_component_register{ SRCS "SDC.c" INCLUDE_DIRS "include" REQUIRES "driver" "esp_timer"}
In the source file SDC.c is: #include "esp_timer.h" #include "driver/spi_master.h" #include "driver/spi_common.h"
CMake finds the esp_timer.h but not spi_master.h and not spi_common.h.
How do I get spi_master.h and spi_common.h included?
I have tried to use REQUIRES "driver/spi" within idf_component_register, but that results in several error messages in red ink from the builder.
I use the Espressif IDE as is, and I use the C language.
Regards
Jorgen
CMakeLists.txt and #include for spi_master.h
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: CMakeLists.txt and #include for spi_master.h
Not sure if it's just a copy/paste error, but:
I think you should use normal brackets () rather than curly braces {} there.idf_component_register{ SRCS "SDC.c" INCLUDE_DIRS "include" REQUIRES "driver" "esp_timer"}
Who is online
Users browsing this forum: No registered users and 90 guests