ESP-IDF add component help

dindondee
Posts: 1
Joined: Tue Aug 29, 2023 12:45 am

ESP-IDF add component help

Postby dindondee » Fri Nov 17, 2023 2:40 am

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 3677 times
It is possible that I could be missing something, I appreciate any help with figuring this out.

Thanks!

Checky
Posts: 4
Joined: Sun Oct 29, 2023 4:13 pm

Re: ESP-IDF add component help

Postby Checky » Thu Nov 23, 2023 10:58 am

"../esp_wrapper/esp_wrapper.c" ? you just need one CMakeList in main i think

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP-IDF add component help

Postby MicroController » Thu Nov 23, 2023 2:42 pm

Did you include the components as "REQUIRES" in the main CMakeLists.txt?

Who is online

Users browsing this forum: Google [Bot] and 114 guests