Adding Matter SDK/Components to a Platformio Project

Hi!

I am trying to add the necessary matter components/files to an existing project that compiles fine atm.
Sadly the documentation (GitHub - project-chip/connectedhomeip: Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.) is not up to date for installing all dependencies (explicitly, it calls for a script ./scripts/checout_submodules.py which does not exist on the repository master atm)

I tried adding the components according to the pio docs in the simplest way possible.

checked out GitHub - espressif/esp-matter: Espressif's SDK for Matter
and copied components/esp_matter and esp_matter_controller into my projects components.

I then instantly got an error for a missing “chip” component:

-- Found Git: /usr/bin/git (found version "2.40.0") 
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /home/zweieuro/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/zweieuro/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc
-- Check for working C compiler: /home/zweieuro/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/zweieuro/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++
-- Check for working CXX compiler: /home/zweieuro/.platformio/packages/toolchain-xtensa-esp32/bin/xtensa-esp32-elf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building ESP-IDF components for target esp32
Processing 5 dependencies:
[1/5] espressif/esp_encrypted_img (2.0.3)
[2/5] espressif/esp_secure_cert_mgr (2.3.1)
[3/5] espressif/esp_websocket_client (1.1.0)
[4/5] espressif/json_parser (1.0.0)
[5/5] idf (5.0.2)
-- Configuring incomplete, errors occurred!
See also "/home/zweieuro/Documents/work/intertechno/master_gate/.pio/build/selectionDev/CMakeFiles/CMakeOutput.log".

fatal: not a git repository (or any of the parent directories): .git
CMake Error at /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/build.cmake:245 (message):
  Failed to resolve component 'chip'.
Call Stack (most recent call first):
  /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/build.cmake:281 (__build_resolve_and_add_req)
  /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/build.cmake:574 (__build_expand_requirements)
  /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/project.cmake:447 (idf_build_process)
  CMakeLists.txt:3 (project)

I figured this is the former name of matter/connetedhomeip so I:

mkdir connectedhomeip
git clone https://github.com/espressif/connectedhomeip/tree/master

It now takes ages to compile but fails as well:

-- Building ESP-IDF components for target esp32
Processing 5 dependencies:
[1/5] espressif/esp_encrypted_img (2.0.3)
[2/5] espressif/esp_secure_cert_mgr (2.3.1)
[3/5] espressif/esp_websocket_client (1.1.0)
[4/5] espressif/json_parser (1.0.0)
[5/5] idf (5.0.2)
-- Configuring incomplete, errors occurred!
See also "/home/zweieuro/Documents/work/intertechno/master_gate/.pio/build/selectionDev/CMakeFiles/CMakeOutput.log".

fatal: not a git repository (or any of the parent directories): .git
CMake Error at /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/component.cmake:224 (message):
 CMake Warning (dev) at
 .pio/build/selectionDev/build_properties.temp.cmake:8:

   Syntax Warning in cmake code at column 51

 

   Argument not separated from preceding token by whitespace.

 Call Stack (most recent call first):

   /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/scripts/component_get_requirements.cmake:3 (include)

 This warning is for project developers.  Use -Wno-dev to suppress it.

 

Call Stack (most recent call first):
 /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/build.cmake:553 (__component_get_requirements)
 /home/zweieuro/.platformio/packages/framework-espidf/tools/cmake/project.cmake:447 (idf_build_process)
 CMakeLists.txt:3 (project)


Which I, frankly, have no idea what it means

Now at this point I am kind of out of ideas ? How can I install these components as esp components so i can then compile/upload with platformio ?

Any help would be great!

1 Like

Related: ESP-IDF Matter in PlatformIO

Did you manage to make any progress on this? I’ve been trying as well.

Nope, I’ve not made any progress. I am really just waiting for a developer to chime in on this.