Skip to content

Conversation

kkasperczyk-no
Copy link
Contributor

No description provided.

@kkasperczyk-no kkasperczyk-no requested review from a team as code owners August 28, 2025 11:17
Copy link

Since quarantine was modified, please make sure you are following the process described in Quarantine Process.

@github-actions github-actions bot added the doc-required PR must not be merged without tech writer approval. label Aug 28, 2025
@NordicBuilder
Copy link
Contributor

NordicBuilder commented Aug 28, 2025

CI Information

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

Inputs:

Sources:

sdk-nrf: PR head: e1f673c0517f7c5ac0d9b79225baf06cc1d7b29d

more details

sdk-nrf:

PR head: e1f673c0517f7c5ac0d9b79225baf06cc1d7b29d
merge base: 312a62482566f1b93d161ac1be98c43d21b940ea
target head (main): 02439b1d88e65078e6deac33277b0b6b5e447041
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 (55)
doc
│  ├── nrf
│  │  ├── images
│  │  │  │ matter_qr_code_contact_sensor.png
│  │  ├── protocols
│  │  │  ├── matter
│  │  │  │  ├── getting_started
│  │  │  │  │  ├── low_power_configuration.rst
│  │  │  │  │  │ transmission_power.rst
│  │  ├── releases_and_maturity
│  │  │  ├── releases
│  │  │  │  │ release-notes-changelog.rst
│  │  ├── samples
│  │  │  │ matter.rst
samples
│  ├── matter
│  │  ├── common
│  │  │  ├── src
│  │  │  │  │ zap_samples.yml
│  │  ├── contact_sensor
│  │  │  ├── CMakeLists.txt
│  │  │  ├── Kconfig
│  │  │  ├── Kconfig.sysbuild
│  │  │  ├── README.rst
│  │  │  ├── VERSION
│  │  │  ├── boards
│  │  │  │  ├── nrf52840dk_nrf52840.overlay
│  │  │  │  ├── nrf5340dk_nrf5340_cpuapp.overlay
│  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp.overlay
│  │  │  │  ├── nrf54lm20dk_nrf54lm20a_cpuapp.overlay
│  │  │  │  ├── nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf
│  │  │  │  │ nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay
│  │  │  ├── pm_static_nrf52840dk_nrf52840.yml
│  │  │  ├── pm_static_nrf5340dk_nrf5340_cpuapp.yml
│  │  │  ├── pm_static_nrf54l15dk_nrf54l15_cpuapp.yml
│  │  │  ├── pm_static_nrf54lm20dk_nrf54lm20a_cpuapp.yml
│  │  │  ├── pm_static_nrf54lm20dk_nrf54lm20a_cpuapp_internal.yml
│  │  │  ├── prj.conf
│  │  │  ├── prj_release.conf
│  │  │  ├── sample.yaml
│  │  │  ├── src
│  │  │  │  ├── app_task.cpp
│  │  │  │  ├── app_task.h
│  │  │  │  ├── chip_project_config.h
│  │  │  │  ├── default_zap
│  │  │  │  │  ├── contact_sensor.matter
│  │  │  │  │  ├── contact_sensor.zap
│  │  │  │  │  ├── zap-generated
│  │  │  │  │  │  ├── IMClusterCommandHandler.cpp
│  │  │  │  │  │  ├── PluginApplicationCallbacks.h
│  │  │  │  │  │  ├── access.h
│  │  │  │  │  │  ├── callback-stub.cpp
│  │  │  │  │  │  ├── endpoint_config.h
│  │  │  │  │  │  │ gen_config.h
│  │  │  │  │ main.cpp
│  │  │  ├── sysbuild.conf
│  │  │  ├── sysbuild
│  │  │  │  ├── ipc_radio
│  │  │  │  │  ├── boards
│  │  │  │  │  │  │ nrf5340dk_nrf5340_cpunet.conf
│  │  │  │  │  ├── prj.conf
│  │  │  │  │  │ prj_release.conf
│  │  │  │  ├── mcuboot
│  │  │  │  │  ├── app.overlay
│  │  │  │  │  ├── boards
│  │  │  │  │  │  ├── nrf52840dk_nrf52840.conf
│  │  │  │  │  │  ├── nrf52840dk_nrf52840.overlay
│  │  │  │  │  │  ├── nrf5340dk_nrf5340_cpuapp.conf
│  │  │  │  │  │  ├── nrf5340dk_nrf5340_cpuapp.overlay
│  │  │  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp.conf
│  │  │  │  │  │  ├── nrf54l15dk_nrf54l15_cpuapp.overlay
│  │  │  │  │  │  ├── nrf54lm20dk_nrf54lm20a_cpuapp.conf
│  │  │  │  │  │  ├── nrf54lm20dk_nrf54lm20a_cpuapp.overlay
│  │  │  │  │  │  ├── nrf54lm20dk_nrf54lm20a_cpuapp_internal.conf
│  │  │  │  │  │  │ nrf54lm20dk_nrf54lm20a_cpuapp_internal.overlay
│  │  │  │  │  │ prj.conf
│  │  │  │ sysbuild_internal.conf
scripts
│  │ quarantine_integration.yaml

Outputs:

Toolchain

Version: 2b2cd9579a
Build docker image: docker-dtr.nordicsemi.no/sw-production/ncs-build:2b2cd9579a_bba2ea5f2e

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

  • ◻️ Toolchain - Skipped: existing toolchain is used
  • ✅ Build twister
    • sdk-nrf test count: 103
  • ✅ Integration tests
    • ✅ test-fw-nrfconnect-chip
Disabled integration tests
    • test-fw-nrfconnect-nrf_lrcs_mosh
    • test-fw-nrfconnect-nrf_lrcs_positioning
    • 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-fem
    • test-fw-nrfconnect-nfc
    • test-fw-nrfconnect-nrf-iot_libmodem-nrf
    • test-fw-nrfconnect-nrf-iot_lwm2m
    • test-fw-nrfconnect-nrf-iot_samples
    • test-fw-nrfconnect-nrf-iot_serial_lte_modem
    • test-fw-nrfconnect-nrf-iot_thingy91
    • test-fw-nrfconnect-nrf-iot_zephyr_lwm2m
    • test-fw-nrfconnect-nrf_crypto
    • test-fw-nrfconnect-proprietary_esb
    • test-fw-nrfconnect-ps-main
    • test-fw-nrfconnect-rpc
    • test-fw-nrfconnect-rs
    • test-fw-nrfconnect-tfm
    • test-fw-nrfconnect-thread-main
    • test-low-level
    • test-sdk-audio
    • test-sdk-dfu
    • test-sdk-find-my
    • test-sdk-mcuboot
    • test-sdk-pmic-samples
    • test-sdk-wifi
    • test-secdom-samples-public

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

@kkasperczyk-no kkasperczyk-no force-pushed the contact_sensor branch 2 times, most recently from 898dca4 to 04463b2 Compare August 28, 2025 12:34
@kkasperczyk-no kkasperczyk-no requested a review from peknis August 29, 2025 06:08
@kkasperczyk-no
Copy link
Contributor Author

@nrfconnect/ncs-co-build-system please review

Comment on lines 31 to 30
Copy link
Contributor

Choose a reason for hiding this comment

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

why would mcuboot power off ?

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 don't know the details, as @ArekBalysNordic added it, but as far as I remember it was a known issue for nRF54L15 and it was recommended to be set by LL team. Without it, the power consumption was too high, after leaving the bootloader stage.

Copy link
Contributor

Choose a reason for hiding this comment

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

@kl-cruz @nika-nordic can you help?

Copy link
Contributor

Choose a reason for hiding this comment

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

ping @kl-cruz @nika-nordic this Kconfig and reasoning makes no sense

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this CONFIG_POWEROFF=y is no longer needed. It is an artifact related to lack of zephyrproject-rtos/zephyr#79199 (merged in zephyrproject-rtos/zephyr#78631 ). Looks like GRTC power management was addressed properly in zephyrproject-rtos/zephyr#79199 however this CONFIG_POWEROFF=y remained in the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

Comment on lines 16 to 18
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
# Use minimal C library instead of the Picolib
CONFIG_MINIMAL_LIBC=y

piclibc build is smaller than minimal, never use minimal going forward unless it's for native_sim or a test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The background for this configuration is that in the past minimal LIBC allowed us to have much smaller memory usage than with picolib. I can see that now it's comparable, but still with picolib it's ~100 B greater memory size than with minimal libc. Also, please mind that a lot of other applications and samples from nrf use minimal libc for mcuboot (if not all of them).

Copy link
Contributor

Choose a reason for hiding this comment

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

Minimal libc is a testing library for unit and regression tests, it is not meant for usage in applications. To reduce MCUboot build size, enable LTO on the MCUboot image. Existing usage of minimal libc should be updated to use picolibc

Copy link
Contributor Author

@kkasperczyk-no kkasperczyk-no Sep 3, 2025

Choose a reason for hiding this comment

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

Ok, I can see that default mcuboot configuration was changed to picolib like 2 months ago. If this is what we currently recommend then I will align Matter configs as well.

Copy link
Contributor Author

@kkasperczyk-no kkasperczyk-no Sep 3, 2025

Choose a reason for hiding this comment

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

@nordicjm the comparable size that I've mentioned before was for nRF54L. For nRF52840, after switching to picolibc, the memory usage was increased by 16k. Do you have idea why? I can't enable it for nRF52840, as it will simply not fit in the partition.

Copy link
Contributor

Choose a reason for hiding this comment

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

@nordicjm I believe we just inherited it from some minimal mcuboot configuration in the past.

This is for example used here (recommended reference mcuboot configuration by Pluto): https://github.com/nrfconnect/sdk-nrf/blob/main/samples/zephyr/smp_svr_mini_boot/sysbuild/mcuboot/prj.conf#L32-L33

But ofc, if it makes code smaller and is used in testing, we should definitely switch!

Added temperature sensor sample entries for low power
and tx power configuration pages.

Signed-off-by: Kamil Kasperczyk <[email protected]>
@kkasperczyk-no
Copy link
Contributor Author

@nordicjm this PR is in fact copy+paste of other existing Matter samples with small code changes, but configuration is the same for majority of other samples. I will align style changes to other samples in follow-up PR.

You asked multiple questions about the mcuboot configuration that looks like this from at least few years, so unfortunately I'm not able to answer on all of them, because I simply don't remember, or I was not involved in configuring it this way. Nevertheless I tried to put some answers above.

@kkasperczyk-no
Copy link
Contributor Author

@nordicjm could you have a second look, so i could proceed with this PR?

@kkasperczyk-no kkasperczyk-no force-pushed the contact_sensor branch 2 times, most recently from 20e78e2 to 4b495c2 Compare September 9, 2025 12:49
@kkasperczyk-no
Copy link
Contributor Author

@nordicjm the minimal libc entry was removed.

Copy link
Contributor

@nordicjm nordicjm left a comment

Choose a reason for hiding this comment

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

changes OK but last 2 commits need squashing

@kkasperczyk-no
Copy link
Contributor Author

@nordicjm the minimal libc entry was removed.

@nordicjm after enabling the picolib Matter sample stops to boot.

@kkasperczyk-no
Copy link
Contributor Author

@nordicjm the minimal libc entry was removed.

@nordicjm after enabling the picolib Matter sample stops to boot.

Created KRKNWK-20774 to follow-up this one.

Comment on lines 28 to 29
src
${ZAP_PARENT_DIR}
Copy link
Contributor

Choose a reason for hiding this comment

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

cmake indent is 2 spaces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This comment and the one related to .overlay files applies to all Matter samples, as the files are copy-pasted. It will be fixed by: KRKNWK-20778.

Comment on lines 7 to 8
# Low Power mode
CONFIG_POWEROFF=y
Copy link
Contributor

Choose a reason for hiding this comment

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

so this is no longer needed either then as per LL comment? Whole file can go

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Possibly, but it would need to be verified on desk using PPK to not introduce regression in power consumption. I don't have it currently on desk to do that, so this will be done in scope of: KRKNWK-20777, as soon as I will visit office to measure it.


&cpuapp_sram {
reg = <0x20000000 DT_SIZE_K(256)>;
ranges = <0x0 0x20000000 0x40000>;
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
ranges = <0x0 0x20000000 0x40000>;
ranges = <0x0 0x20000000 0x40000>;


&cpuapp_sram {
reg = <0x20000000 DT_SIZE_K(512)>;
ranges = <0x0 0x20000000 0x80000>;
Copy link
Contributor

Choose a reason for hiding this comment

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

there are multiple issues as above, fix in whole PR

@doublemis1
Copy link
Contributor

Hi @nordicjm,
@kkasperczyk-no created tasks:

  • KRKNWK-20777
  • KRKNWK-20778
    To address your comments, and apply them to all matter samples.
    Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

@ArekBalysNordic
Copy link
Contributor

Hi @nordicjm, @kkasperczyk-no created tasks:

  • KRKNWK-20777
  • KRKNWK-20778
    To address your comments, and apply them to all matter samples.
    Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

I will fix them in all samples in the following PR, because I'm working on fixing consistency between all our samples.

@nordicjm
Copy link
Contributor

nordicjm commented Sep 12, 2025

Hi @nordicjm, @kkasperczyk-no created tasks:

* KRKNWK-20777

* KRKNWK-20778
  To address your comments, and apply them to all matter samples.
  Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

Why can't they be fixed in this PR (for this sample, other samples can be fixed in a future PR)? This PR is non compliant with our coding style

@ArekBalysNordic
Copy link
Contributor

Hi @nordicjm, @kkasperczyk-no created tasks:

* KRKNWK-20777

* KRKNWK-20778
  To address your comments, and apply them to all matter samples.
  Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

Why can't they be fixed in this PR (for this sample, other samples can be fixed in a future PR)?

Because I'm creating a script to check consistency between our samples, it is better for me to do it at once for all of them. Moreover, we want to finalize this PR.

@nordicjm
Copy link
Contributor

Hi @nordicjm, @kkasperczyk-no created tasks:

* KRKNWK-20777

* KRKNWK-20778
  To address your comments, and apply them to all matter samples.
  Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

Why can't they be fixed in this PR (for this sample, other samples can be fixed in a future PR)?

Because I'm creating a script to check consistency between our samples, it is better for me to do it at once for all of them. Moreover, we want to finalize this PR.

Not really a valid reason for not fixing things in this PR, a script can be made later, why is that needed to fix 7 dts spacing issues, fix 1 cmake spacing issue and remove 1 file, which should take < 1 minute

@ArekBalysNordic
Copy link
Contributor

Hi @nordicjm, @kkasperczyk-no created tasks:

* KRKNWK-20777

* KRKNWK-20778
  To address your comments, and apply them to all matter samples.
  Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

Why can't they be fixed in this PR (for this sample, other samples can be fixed in a future PR)?

Because I'm creating a script to check consistency between our samples, it is better for me to do it at once for all of them. Moreover, we want to finalize this PR.

Not really a valid reason for not fixing things in this PR, a script can be made later, why is that needed to fix 7 dts spacing issues, fix 1 cmake spacing issue and remove 1 file, which should take < 1 minute

Yeah, changing in the code takes < 1 minute, whereas waiting for CI is more than 1.5 hours...

@nordicjm
Copy link
Contributor

Hi @nordicjm, @kkasperczyk-no created tasks:

* KRKNWK-20777

* KRKNWK-20778
  To address your comments, and apply them to all matter samples.
  Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

Why can't they be fixed in this PR (for this sample, other samples can be fixed in a future PR)?

Because I'm creating a script to check consistency between our samples, it is better for me to do it at once for all of them. Moreover, we want to finalize this PR.

Not really a valid reason for not fixing things in this PR, a script can be made later, why is that needed to fix 7 dts spacing issues, fix 1 cmake spacing issue and remove 1 file, which should take < 1 minute

Yeah, changing in the code takes < 1 minute, whereas waiting for CI is more than 1.5 hours...

The comments were left yesterday which means if they were fixed then, this PR would have been merged by now

Added new Matter sample - contact sensor. Updated also
documentation and .yaml test configurations.

Introduced several fixes for the configuration recommended
during code review.

Signed-off-by: Kamil Kasperczyk <[email protected]>
@ArekBalysNordic
Copy link
Contributor

Hi @nordicjm, @kkasperczyk-no created tasks:

* KRKNWK-20777

* KRKNWK-20778
  To address your comments, and apply them to all matter samples.
  Do you see any other issues in the PR or can we merge as it is and apply styles fixes in follow-up PR?

Why can't they be fixed in this PR (for this sample, other samples can be fixed in a future PR)?

Because I'm creating a script to check consistency between our samples, it is better for me to do it at once for all of them. Moreover, we want to finalize this PR.

Not really a valid reason for not fixing things in this PR, a script can be made later, why is that needed to fix 7 dts spacing issues, fix 1 cmake spacing issue and remove 1 file, which should take < 1 minute

Yeah, changing in the code takes < 1 minute, whereas waiting for CI is more than 1.5 hours...

The comments were left yesterday which means if they were fixed then, this PR would have been merged by now

Done, @nordicjm, please take a look.

@kkasperczyk-no
Copy link
Contributor Author

Not really a valid reason for not fixing things in this PR

The valid reason for not fixing things in this PR is that I've communicated that we need to have this in to unblock our progress and you ignored it, requesting style fixes as a blocker for this PR.

@ArekBalysNordic thank you for handling it.

@nordicjm
Copy link
Contributor

nordicjm commented Sep 15, 2025

Not really a valid reason for not fixing things in this PR

The valid reason for not fixing things in this PR is that I've communicated that we need to have this in to unblock our progress and you ignored it, requesting style fixes as a blocker for this PR.

@ArekBalysNordic thank you for handling it.

And I quote https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html

PR Requirements

The code must follow the Zephyr [Coding Style Guidelines](https://docs.zephyrproject.org/latest/contribute/style/index.html#coding-style) and [Coding Guidelines](https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html#coding-guidelines).

Hopefully in future those checks are automated as part of CI and then if there is a disagreeance you can argue with a bot

@nordicjm nordicjm merged commit 0538930 into nrfconnect:main Sep 15, 2025
20 checks passed
@kkasperczyk-no
Copy link
Contributor Author

Not really a valid reason for not fixing things in this PR

The valid reason for not fixing things in this PR is that I've communicated that we need to have this in to unblock our progress and you ignored it, requesting style fixes as a blocker for this PR.
@ArekBalysNordic thank you for handling it.

And I quote https://docs.zephyrproject.org/latest/contribute/contributor_expectations.html

PR Requirements

The code must follow the Zephyr [Coding Style Guidelines](https://docs.zephyrproject.org/latest/contribute/style/index.html#coding-style) and [Coding Guidelines](https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html#coding-guidelines).

Hopefully in future those checks are automated as part of CI and then if there is a disagreeance you can argue with a bot

And I quote: https://github.com/zephyrproject-rtos/zephyr/blob/main/doc/contribute/reviewer_expectations.rst

Try to provide feedback on the entire PR in one shot. This provides the contributor an opportunity to address all comments in the next PR update.

and

When using the "Request Changes" option, mark trivial, non-functional, requests as "Non-blocking" in the comment. Reviewers should approve PRs once only non-blocking changes remain. The PR author has discretion as to whether they address all non-blocking comments.

and

Avoid increasing scope of the PR by requesting new features

Probably this is a matter of perspective, but to me, we currently have SDK in some shape. We have samples that have not-aligned style or configuration from like 4-5 years. And yes it should be planned and fixed, but requesting to do that in random moment of time is not a perfect solution for us considering project planning. Especially when we are not aware that these issues exist, so to me this is actually increasing scope of PR and to me, if the style issues were there from few years it's not a blocking comment to address them now.

I have already started discussion with @carlescufi about priorities, what is blocking and what is not in terms of our SDK. I have a hope we can produce some rules how to handle it and conclude it with some agreement.

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.

10 participants