Documentation for adding Matter in existing firmware

I have a very complex existing firmware that is multi-platform. I've ported it to nRF5340 + Zephyr already, but as you can imagine, it's a very unorthodox project, as it's not using west, vscode extension, or any other tools.

I need to add Matter over Thread to this project, but in the development docs it only mentions the matter samples and creating new projects by modifying them.

Is there any documentation on how to add Matter and Thread to an existing project? What are the requirements and kconfig flags I need?

More info about my project:

- Build with CMake and ninja

- One code-base that can be compiled for ESP32, STM32, POSIX, and nRF. 

- Several firmware targets, one for each product. Targets are configured with kconfig flags.

Related