Generation of .matter files from .zap files

Hi,

I am currently looking into setting up a Matter project (based on the template) and reached ZAP and the required files. As far as I understood, the ".zap" file is the only file that is actually needed, the corresponding ".matter" file is generated from the ".zap" file (as documented here: https://project-chip.github.io/connectedhomeip-doc/code_generation.html#ensure-you-have-a-matter-file).

My idea is to not even keep the generated files (e.g., not place them under version control) and instead generate all files from the ".zap" file. In the template, however, you're using "BYPASS_IDL" and as described in the example for adding a new cluster (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrf/protocols/matter/getting_started/adding_clusters.html) you're relying on pre-generated files.

My real question: Is it somehow possible to really generate all files during the build, or what is the reason why the samples use "BYPASS_IDL"?

I'm a bit dumbstruck by the Matter CMake integration, which actually uses the "generate.py" generator, but instead of first passing the ".zap" file, the function `chip_codegen` assumes that the ".matter" file already exists ... This integration could generate the ".matter" file during the build step but simply doesn't.

Parents Reply Children
No Data
Related