Skip to content

[BUG] Issue with Linking Components  #26172

Open
@ychani

Description

Reproduction steps

  1. Check out one of the connectedhomeip/examples (I tried light-switch-app and lighting-app)
  2. Open the project (light-switch-app/esp32) in VS Code and configure ESP-IDF extension
  3. Run Add Arduino-ESP as ESP-IDF components command in VS Code
  4. Add #include "Arduino.h" in Button.cpp
  5. Change CONFIG_FREERTOS_HZ=1000 in sdkconfig
  6. Run idf.py reconfigure then idf.py build

Then I get the below error.

main/Button.cpp:1:10: fatal error: Arduino.h: No such file or directory
 #include "Arduino.h"

It happens not only to Arduino but other libraries. I can resolve the issue by manually adding include_directories("${CMAKE_SOURCE_DIR}/components/arduino/cores/esp32") in main/CMakeLists.txt, but I believe that is not the proper way and the esp-idf should handle it automatically with the provided CMakeLists.txt under the components (and running idf.py create-manifest --component=<name>).

I suspect the issue is something like cmake definition not propagating through the project properly for the esp-matter example projects.
When the same workflow is done to the examples under esp-idf/examples/get-started, I do not experience the issue.

Bug prevalence

All the time

GitHub hash of the SDK that was being used

commit 4088a77

Platform

esp32, vscode, windows

Platform Version(s)

No response

Anything else?

No response

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions