Page 1 of 1

ESP-IDF add component help

Posted: Fri Nov 17, 2023 2:40 am
by dindondee
Hello,

Hope you're well. I have 2 components that I need to add to a project, however, I have added the directory using the EXTRA_COMPONENT_DIRS in the top level cmakelists.txt file and I get build errors.

Also, it seems the components do not have a CMakeLists.txt file so I added them. The components are esp8266_wrapper and lis3mdl. For the esp8266_wrapper, the cmakelist contains

Code: Select all

idf_component_register(SRCS esp8266_wrapper.c
                        INCLUDE_DIRS .
                        REQUIRES driver)

and for the lis3mdl, the cmakelist contains

Code: Select all

idf_component_register(SRCS lis3mdl.c
                        INCLUDE_DIRS .
                        )
Here is what the directory looks like.
esp.JPG
esp.JPG (32.74 KiB) Viewed 3607 times
It is possible that I could be missing something, I appreciate any help with figuring this out.

Thanks!

Re: ESP-IDF add component help

Posted: Thu Nov 23, 2023 10:58 am
by Checky
"../esp_wrapper/esp_wrapper.c" ? you just need one CMakeList in main i think

Re: ESP-IDF add component help

Posted: Thu Nov 23, 2023 2:42 pm
by MicroController
Did you include the components as "REQUIRES" in the main CMakeLists.txt?