Is it possible to use the Espressif Matter SDK with platoformIO?

I would like to develop a device which can use matter. And since there is and matter SDK for the ESP32 chips I thought I would like to give it a try. Is there a way how I can install the SDK so I can use it with platformIO?
I only found that so far: ESP Matter framework support · Issue #854 · platformio/platform-espressif32 · GitHub

Many thanks in advance.

Is it not possible to start a ESP-IDF project and import all ESP Matter components into the proejct? Like platform-espressif32/examples/espidf-aws-iot at develop · platformio/platform-espressif32 · GitHub for example.

So where do I have to clone this in PlatformIO or how can I add it? GitHub - espressif/esp-matter: Espressif's SDK for Matter (Do I need to create this component folder? or add it in the CMakeLists with list(APPEND EXTRA_COMPONENT_DIRS componentname))
Can I add it to an existing Project or do I have to start a new one?
Or can´t I use the normal project tasks like build, upload, monitor etc with it and I need to use the cli to use the matter sdk?

I just started to use the IDF and I am pretty new to it. Using the arduino framework was much easier but I think I need to get the next step to get more control over the device.

Adding components is done per documentation.

https://docs.platformio.org/en/latest/frameworks/espidf.html#esp-idf-components

So if I put the components in a folder components I can use them?
Do I need to execute the install.sh too?

How can I import the example project (e.g. light). I guess I need to change something in the CMakeLists to use the main folder instad of the main.c or do I get mixed up something? Which files do I need to change so I can use this project as test project. (esp-matter/examples/light at main · espressif/esp-matter · GitHub)
Thank you for your help so far.

I first thought I may did something wrong as I tryed it but I always get this after adding an component:
This the message on the bottom. Which says, that it is trying to maybe find an Sub Git in the module but can not find one and goes up to “/” which is the highes directory. If it helps I can add the CMakeOutput too

Schwerwiegend: Kein Git-Repository (oder irgendein Elternverzeichnis bis zum Einhängepunkt /)
Stoppe bei Dateisystemgrenze (GIT_DISCOVERY_ACROSS_FILESYSTEM nicht gesetzt).
CMake Error at .pio/build/esp32-s2-saola-1/CMakeFiles/git-data/grabRef.cmake:48 (file):
  file failed to open for reading (No such file or directory):

    /home/djpx/Dokumente/PlatformIO/Projects/ESP32S2IDFTest/.pio/build/esp32-s2-saola-1/CMakeFiles/git-data/head-ref
Call Stack (most recent call first):
  /home/djpx/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:80 (include)
  /home/djpx/.platformio/packages/framework-espidf/tools/cmake/third_party/GetGitRevisionDescription.cmake:90 (get_git_head_revision)
  /home/djpx/.platformio/packages/framework-espidf/tools/cmake/project.cmake:61 (git_describe)
  /home/djpx/.platformio/packages/framework-espidf/tools/cmake/project.cmake:436 (__project_get_revision)
  CMakeLists.txt:3 (project)


Schwerwiegend: Kein Git-Repository (oder irgendein Elternverzeichnis bis zum Einhängepunkt /)
Stoppe bei Dateisystemgrenze (GIT_DISCOVERY_ACROSS_FILESYSTEM nicht gesetzt).
Schwerwiegend: Kein Git-Repository: /home/djpx/.platformio/packages/framework-espidf/components/openthread/openthread/../../../.git/modules/components/openthread/openthread

@valeros, do you have any ideas?

in principle, is possible Builder(user-friendly) for any (competently built) SDK
for full PlatformIO support (without MAKE, CMAKE)
in my experiments with Raspberry PI(Pico), Mediatek(GSM), Microchip(XC16, XC32),
I simply added an imitation of CMakeLists.txt

is as extra script for uncompiled framework source codes ( existing ones, third-party )

I believe it should work, although it may require additional configuration as specified in init.sh

@djpx What version of the development platform are you using? It seems only IDF v4.4.3 is supported. I also noticed that you’re compiling for esp32-s2-saola-1 but ESP32-S2 is not mentioned in the repository:

Is it a typo on their side?

I just tried first the S3 but then I tryed to use a differend component and tested if I can get it to work with arduino as componet. Then I changed the S3 to a S2 to test if only the chip platform was the problem. I am not sure if it was correct I followed a guide which said I had to to add this “framework = espidf,arduino” to use it.
Then I get the error and when I remove the arduino again I get the same error as with it.
I am not sure which version I got I use the one which PIO installed.

Is there some kind of documentation how to cleanly (step-by-step) add matter to PIO?
A library or component would be great; but even a step by step guide would be amazing.

I’ve tried to follow what you guys have been discussing but can’t really get it to work in any way…