What you are describing (a component in EXTRA_COMPONENT_DIRS outside of the project tree) works in ESP-IDF. Here is a code snippet I have tried in examples/get-started/hello_world/CMakeLists.txt:
Code: Select all
cmake_minimum_required(VERSION 3.16)
set(EXTRA_COMPONENT_DIRS ../../common_components/protocol_examples_common)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(hello_world)
and after "idf.py reconfigure", "protocol_examples_common" is visible in the list of components included into the build.
What I didn't realize why you asked the question is that you aren't using ESP-IDF, but ESP8266_RTOS_SDK. I didn't expect this since this is an esp32.com forum
I don't have much experience with ESP8266_RTOS_SDK, but it looks like you can try adding some debugging here:
https://github.com/espressif/ESP8266_RT ... #L144-L147
Code: Select all
get_filename_component(component_dir "${component_dir}" ABSOLUTE)
message(STATUS "Considering ${component_dir}/CMakeLists.txt")
if(EXISTS ${component_dir}/CMakeLists.txt)
message(STATUS "Found ${component_dir}/CMakeLists.txt, adding it to the build")
idf_build_component(${component_dir})
else()
message(STATUS "Didn't find ${component_dir}/CMakeLists.txt")
...
and then run "idf.py reconfigure" again. You should see additional lines in the log, hopefully there will be a mention of "common" component. Based on whether its CMakeLists.txt is found or not, we can continue troubleshooting the issue.