Inquiry About Enabling Matter Diagnostic Log Function in Sample Project

I am currently working with the Matter sample project and have encountered a question regarding the diagnostic log function. I would like to inquire about how to enable the Matter diagnostic log function in the sample project, and if possible, could you provide detailed step-by-step instructions?

As diagnostic logs are crucial for troubleshooting and project debugging during my development process, clear guidance on the enabling process (such as relevant configuration files to modify, command-line operations to execute, or specific settings in the development environment) would be of great help to me.
Additionally, I encountered an inconsistent compilation result when trying to enable this function, and I hope to clarify the correct operation with you: When I directly select "diagnostic-logs" under the snippets in the VS Code Build Configuration, the compilation fails; however, if I only add -Dlight_bulb_SNIPPET=diagnostic-logs under "Extra Cmake arguments" in the VS Code Build Configuration, the compilation succeeds.
I am confused about this difference—what is the correct way to enable the Matter diagnostic log function? What exact steps should I follow? Could you also help explain why the direct snippet selection leads to compilation failure, while adding the CMake argument works?
If there are any additional prerequisites (e.g., specific versions of dependent tools or SDKs required) or precautions to note when enabling the diagnostic log function (to avoid compilation issues), please also kindly inform me.
Thank you very much for your time and support. I look forward to your reply at your earliest convenience.
Parents
  • Hi,

    Selecting the diagnostic-logs snippet in the VS Code build configuration is the same as adding -DSNIPPET=diagnostic-logs to the build command. With sysbuild, when you only use -DSNIPPET, the snippet will be applied to all images in the build (in this case, both light_bulb and MCUboot). Since the configs enabled by the diagnostic-logs snippet should only be applied to the light_bulb image, you must specify the image as part of the command, i.e., you must use -Dlight_bulb_SNIPPET=diagnostic-logs.

    Adding the snippet with -Dlight_bulb_SNIPPET=diagnostic-logs should be enough to use it, but you can also find more information in our documentation: Matter - Diagnostic logs snippet.

    Best regards,
    Marte

Reply
  • Hi,

    Selecting the diagnostic-logs snippet in the VS Code build configuration is the same as adding -DSNIPPET=diagnostic-logs to the build command. With sysbuild, when you only use -DSNIPPET, the snippet will be applied to all images in the build (in this case, both light_bulb and MCUboot). Since the configs enabled by the diagnostic-logs snippet should only be applied to the light_bulb image, you must specify the image as part of the command, i.e., you must use -Dlight_bulb_SNIPPET=diagnostic-logs.

    Adding the snippet with -Dlight_bulb_SNIPPET=diagnostic-logs should be enough to use it, but you can also find more information in our documentation: Matter - Diagnostic logs snippet.

    Best regards,
    Marte

Children
No Data
Related