79759254

Date: 2025-09-08 19:01:15
Score: 1
Natty:
Report link

Your CMakeLists.txt mixes old ESP-IDF v4 style (register_component(), COMPONENT_* variables, manual project()/add_library()) with the new v5 style. That prevents IDF from correctly propagating the include path for esp_timer.h. The build system sees esp_timer in the requirements, but because of the legacy setup, the header isn’t actually on your target’s include path. Don’t call project(), add_library(), or register_component(). Instead, use only idf_component_register(..). By the way remove the ~ include paths. CMake won’t expand ~, and you don’t need them anyway. Delete all COMPONENT_ADD_INCLUDEDIRS, COMPONENT_REQUIRES, register_component(), target_link_libraries(... INTERFACE ...), etc. Those are legacy v4 constructs. No need for project() or add_library() inside an ESP-IDF component.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: colossus