Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snippets: matter: Added snippet for matter debug purposes #19973

Merged

Conversation

ArekBalysNordic
Copy link
Contributor

Utilizing this snippet:

  • Extended log buffer size
  • Increased UART speed to 1M
  • Eabled OpenThread debug
  • Disabled log size optimization
  • Switched to log mode deferred.

@ArekBalysNordic ArekBalysNordic requested review from a team as code owners January 17, 2025 12:35
@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Jan 17, 2025
@ArekBalysNordic ArekBalysNordic requested a review from a team January 17, 2025 12:36
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Jan 17, 2025

CI Information

To view the history of this post, clich the 'edited' button above
Build number: 4

Inputs:

Sources:

sdk-nrf: PR head: 7995954fcc90a34f7e702ae0a82ca81eb7e9ffa4

more details

sdk-nrf:

PR head: 7995954fcc90a34f7e702ae0a82ca81eb7e9ffa4
merge base: cb640677e0fd450e4d90db9803fd0325f58a2921
target head (main): 5e125259f131cb4b5b7c1c72588df0fd0ae7f0c1
Diff

Github labels

Enabled Name Description
ci-disabled Disable the ci execution
ci-all-test Run all of ci, no test spec filtering will be done
ci-force-downstream Force execution of downstream even if twister fails
ci-run-twister Force run twister
ci-run-zephyr-twister Force run zephyr twister
List of changed files detected by CI (10)
CODEOWNERS
doc
│  ├── nrf
│  │  ├── protocols
│  │  │  ├── matter
│  │  │  │  ├── getting_started
│  │  │  │  │  │ advanced_kconfigs.rst
│  │  ├── releases_and_maturity
│  │  │  ├── releases
│  │  │  │  │ release-notes-changelog.rst
snippets
│  ├── matter-debug
│  │  ├── boards
│  │  │  ├── nrf52840dk_nrf52840.overlay
│  │  │  ├── nrf5340dk_nrf5340_cpuapp.overlay
│  │  │  ├── nrf54h20dk_nrf54h20_cpuapp.overlay
│  │  │  ├── nrf54l15dk_nrf54l15_cpuapp.overlay
│  │  │  │ nrf7002dk_nrf5340_cpuapp.overlay
│  │  ├── matter_debug.conf
│  │  │ snippet.yml

Outputs:

Toolchain

Version: 342151af73
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:342151af73_912848a074

Test Spec & Results: ✅ Success; ❌ Failure; 🟠 Queued; 🟡 Progress; ◻️ Skipped; ⚠️ Quarantine

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 38
  • ✅ Integration tests
Disabled integration tests
    • desktop52_verification
    • doc-internal
    • test_ble_nrf_config
    • test-fw-nrfconnect-apps
    • test-fw-nrfconnect-ble_mesh
    • test-fw-nrfconnect-ble_samples
    • test-fw-nrfconnect-boot
    • test-fw-nrfconnect-chip
    • test-fw-nrfconnect-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_mosh
    • test-fw-nrfconnect-nrf-iot_positioning
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-ps
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread
    • test-fw-nrfconnect-zigbee
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-sidewalk
    • test-sdk-wifi
    • test-secdom-samples-public

Note: This message is automatically posted and updated by the CI

@NordicBuilder
Copy link
Contributor

You can find the documentation preview for this PR at this link.

Note: This comment is automatically posted by the Documentation Publish GitHub Action.


Matter debug snippet allows you to enable additional debug features while using Matter samples.

Using this snippet there are the following features enabled:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Using this snippet there are the following features enabled:
The following features are enabled when using this snippet:


Using this snippet there are the following features enabled:

* UART speed is increased to 1Mbit/s.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* UART speed is increased to 1Mbit/s.
* UART speed is increased to 1 Mbit/s.

* Openthread shell is enabled.
* Openthread logging level is set to INFO.
* Full shell functionalities.
* Logging source code location on VerifyOrDie failure which occurs in Matter stack.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Logging source code location on VerifyOrDie failure which occurs in Matter stack.
* Logging source code location on VerifyOrDie failure that occurs in the Matter stack.


To use the snippet when building a sample, add ``-D<project_name>_SNIPPET=matter-debug`` to the west arguments list.

Example for the ``nrf52840dk/nrf52840`` board target and the :ref:`matter_lock_sample` sample:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Example for the ``nrf52840dk/nrf52840`` board target and the :ref:`matter_lock_sample` sample:
For example, for the ``nrf52840dk/nrf52840`` board target and the :ref:`matter_lock_sample` sample, use the following command:

Debug snippet
=============

Matter debug snippet allows you to enable additional debug features while using Matter samples.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Matter debug snippet allows you to enable additional debug features while using Matter samples.
The Matter debug snippet allows you to enable additional debug features while using Matter samples.

Copy link
Contributor

@LuDuda LuDuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

# Deferred mode of logging
CONFIG_LOG=y
CONFIG_LOG_MODE_DEFERRED=y
CONFIG_LOG_BUFFER_SIZE=40960
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it fit with this value on Light Bulb e.g. on nRF54L or we need to decrease it a bit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just decreased it a little bit to fit Light Bulb even on nRF52840.

EXTRA_CONF_FILE: matter_debug.conf

boards:
nrf52840dk/nrf52840:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could use wildcards to also support customer boards with these socs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing, good point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I've noticed now that it cannot be done by using wildcards. We want to change the UART speed in those .dts overlays, so it is applicable only for DKs. Customers must add their own dts overlay for UART if they want to increase the speed because they can use a different UART than is used on the DK. I will open a follow-up and describe it in our docs as well.

Utilizing this snippet:
- Extended log buffer size
- Increased UART speed to 1M
- Eabled OpenThread debug
- Disabled log size optimization
- Switched to log mode deferred.

Signed-off-by: Arkadiusz Balys <[email protected]>
@ArekBalysNordic ArekBalysNordic merged commit 533f31c into nrfconnect:main Jan 20, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-required PR must not be merged without tech writer approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants