Questions about components included in project, and inconsistent resolving of headers

mylenedipenta
Posts: 9
Joined: Tue Dec 31, 2019 1:45 am

Questions about components included in project, and inconsistent resolving of headers

Postby mylenedipenta » Thu Oct 28, 2021 6:16 pm

I'm experimenting with the ADC example project supplied by espressif, using VSCode and ESP-IDF V4.3.1 on Win 10.

I notice that the main component's #include's are automatically registered as dependencies, but other components have to have all their #include's copied into CMakeLists.txt as either PRIV_REQUIRES or REQUIRES. What is the advantage of this? Why not treat the custom components the same as main?

Conversely, the VSCode Project Components pane shows that this very simple ADC driver, which uses stdio, freertos and esp_adc_cal but little else, contains esp_http_client, esp_wifi, freemodbus, etc. They are all showing up in the build folder. Are these seriously getting compiled into my project? If so, why, and how can I stop it?

Who is online

Users browsing this forum: No registered users and 308 guests