Skip to content

Commit e9d077e

Browse files
Merge branch 'master' into fix/917_ncp_init
2 parents 6450af2 + 57ff3e6 commit e9d077e

File tree

24 files changed

+154
-247
lines changed

24 files changed

+154
-247
lines changed

.github/workflows/third-party-check.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
paths:
2222
- "third_party/**"
2323
- ".gitmodules"
24+
types: [opened, synchronize, reopened, labeled, unlabeled]
2425

2526
jobs:
2627
check-submodule-update-label:
@@ -32,7 +33,7 @@ jobs:
3233
run: |
3334
echo This pull request attempts to update submodules without the changing-submodules-on-purpose label. Please apply that label if the changes are intentional, or remove those changes.
3435
exit 1
35-
- if: ${{ contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }}
36+
- if: ${{ contains(github.event.pull_request.labels.*.name, 'changing-submodules-on-purpose') }}
3637
name: Success
3738
run: |
3839
echo PR looks good.

examples/contact-sensor-app/nxp/k32w1/BUILD.gn

-8
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,6 @@ mcxw71_k32w1_sdk("sdk") {
8686
defines += [
8787
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
8888
]
89-
90-
if (nxp_nvm_component == "littlefs") {
91-
include_dirs += [ "${example_platform_dir}/board" ]
92-
sources += [
93-
"${example_platform_dir}/board/peripherals.c",
94-
"${example_platform_dir}/board/peripherals.h",
95-
]
96-
}
9789
}
9890

9991
mcxw71_k32w1_executable("contact_sensor_app") {

examples/contact-sensor-app/nxp/k32w1/args.gni

-2
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,3 @@ chip_openthread_ftd = false
4242
nxp_enable_ot_cli = false
4343

4444
chip_with_diag_logs_demo = true
45-
46-
nxp_nvm_component = "nvs"

examples/contact-sensor-app/nxp/mcxw71/BUILD.gn

-8
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ mcxw71_k32w1_sdk("sdk") {
8585
defines += [
8686
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
8787
]
88-
89-
if (nxp_nvm_component == "littlefs") {
90-
include_dirs += [ "${example_platform_dir}/board" ]
91-
sources += [
92-
"${example_platform_dir}/board/peripherals.c",
93-
"${example_platform_dir}/board/peripherals.h",
94-
]
95-
}
9688
}
9789

9890
mcxw71_k32w1_executable("contact_sensor_app") {

examples/contact-sensor-app/nxp/mcxw71/args.gni

-2
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,3 @@ chip_openthread_ftd = false
4040
nxp_enable_ot_cli = false
4141

4242
chip_with_diag_logs_demo = true
43-
44-
nxp_nvm_component = "nvs"

examples/lighting-app/nxp/k32w1/BUILD.gn

-8
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,6 @@ mcxw71_k32w1_sdk("sdk") {
100100
defines += [
101101
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
102102
]
103-
104-
if (nxp_nvm_component == "littlefs") {
105-
include_dirs += [ "${example_platform_dir}/board" ]
106-
sources += [
107-
"${example_platform_dir}/board/peripherals.c",
108-
"${example_platform_dir}/board/peripherals.h",
109-
]
110-
}
111103
}
112104

113105
mcxw71_k32w1_executable("light_app") {

examples/lighting-app/nxp/k32w1/args.gni

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,5 @@ chip_system_config_provide_statistics = false
3535
chip_system_config_use_open_thread_inet_endpoints = true
3636
chip_with_lwip = false
3737

38-
nxp_nvm_component = "nvs"
39-
4038
nxp_use_smu2_static = true
4139
nxp_use_smu2_dynamic = true

examples/lighting-app/nxp/mcxw71/BUILD.gn

-8
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,6 @@ mcxw71_k32w1_sdk("sdk") {
100100
defines += [
101101
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
102102
]
103-
104-
if (nxp_nvm_component == "littlefs") {
105-
include_dirs += [ "${example_platform_dir}/board" ]
106-
sources += [
107-
"${example_platform_dir}/board/peripherals.c",
108-
"${example_platform_dir}/board/peripherals.h",
109-
]
110-
}
111103
}
112104

113105
mcxw71_k32w1_executable("light_app") {

examples/lighting-app/nxp/mcxw71/args.gni

-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,5 @@ chip_system_config_provide_statistics = false
3535
chip_system_config_use_open_thread_inet_endpoints = true
3636
chip_with_lwip = false
3737

38-
nxp_nvm_component = "nvs"
39-
4038
nxp_use_smu2_static = true
4139
nxp_use_smu2_dynamic = true

examples/lock-app/nxp/k32w1/BUILD.gn

-8
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ mcxw71_k32w1_sdk("sdk") {
8585
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
8686
]
8787

88-
if (nxp_nvm_component == "littlefs") {
89-
include_dirs += [ "${example_platform_dir}/board" ]
90-
sources += [
91-
"${example_platform_dir}/board/peripherals.c",
92-
"${example_platform_dir}/board/peripherals.h",
93-
]
94-
}
95-
9688
if (nxp_multiple_ble_connections) {
9789
include_dirs += [ "${example_platform_dir}/app_ble/include" ]
9890
defines += [

examples/lock-app/nxp/mcxw71/BUILD.gn

-8
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ mcxw71_k32w1_sdk("sdk") {
8585
"CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR=${setup_discriminator}",
8686
]
8787

88-
if (nxp_nvm_component == "littlefs") {
89-
include_dirs += [ "${example_platform_dir}/board" ]
90-
sources += [
91-
"${example_platform_dir}/board/peripherals.c",
92-
"${example_platform_dir}/board/peripherals.h",
93-
]
94-
}
95-
9688
if (nxp_multiple_ble_connections) {
9789
include_dirs += [ "${example_platform_dir}/app_ble/include" ]
9890
defines += [

examples/platform/nxp/mcxw71_k32w1/app/support/BUILD.gn

-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ source_set("freertos_memory_utils") {
5555

5656
if (nxp_nvm_component == "fwk_nvm") {
5757
defines = [ "CHIP_PLAT_NVM_SUPPORT=1" ]
58-
} else if (nxp_nvm_component == "littlefs") {
59-
defines = [ "CHIP_PLAT_NVM_SUPPORT=3" ]
6058
}
6159

6260
public_configs = [

scripts/spec_xml/generate_spec_xml.py

+4-15
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,18 @@
1919
import os
2020
import re
2121
import subprocess
22-
import sys
2322
import xml.etree.ElementTree as ElementTree
2423
from pathlib import Path
2524

2625
import click
27-
from paths import Branch, get_chip_root, get_data_model_path, get_documentation_file_path, get_in_progress_defines
26+
from chip.testing.spec_parsing import build_xml_clusters
27+
from paths import get_chip_root, get_documentation_file_path, get_in_progress_defines
2828

2929
# Use the get_in_progress_defines() function to fetch the in-progress defines
3030
CURRENT_IN_PROGRESS_DEFINES = get_in_progress_defines()
3131

3232
# Replace hardcoded paths with dynamic paths using paths.py functions
3333
DEFAULT_CHIP_ROOT = get_chip_root()
34-
DEFAULT_OUTPUT_DIR_1_4 = get_data_model_path(Branch.V1_4)
35-
DEFAULT_OUTPUT_DIR_IN_PROGRESS = get_data_model_path(Branch.IN_PROGRESS)
36-
DEFAULT_OUTPUT_DIR_TOT = get_data_model_path(Branch.MASTER)
3734
DEFAULT_DOCUMENTATION_FILE = get_documentation_file_path()
3835

3936

@@ -71,6 +68,7 @@ def make_asciidoc(target: str, include_in_progress: str, spec_dir: str, dry_run:
7168
help='Path to the spec root')
7269
@click.option(
7370
'--output-dir',
71+
required=True,
7472
help='Path to output xml files')
7573
@click.option(
7674
'--dry-run',
@@ -81,9 +79,6 @@ def make_asciidoc(target: str, include_in_progress: str, spec_dir: str, dry_run:
8179
'--include-in-progress',
8280
type=click.Choice(['All', 'None', 'Current']), default='All')
8381
def main(scraper, spec_root, output_dir, dry_run, include_in_progress):
84-
if not output_dir:
85-
output_dir_map = {'All': DEFAULT_OUTPUT_DIR_TOT, 'None': DEFAULT_OUTPUT_DIR_1_4, 'Current': DEFAULT_OUTPUT_DIR_IN_PROGRESS}
86-
output_dir = output_dir_map[include_in_progress]
8782
scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress)
8883
scrape_device_types(scraper, spec_root, output_dir, dry_run, include_in_progress)
8984
if not dry_run:
@@ -195,18 +190,12 @@ def dump_versions(scraper, spec_root, output_dir):
195190

196191

197192
def dump_cluster_ids(output_dir):
198-
python_testing_path = os.path.abspath(
199-
os.path.join(DEFAULT_CHIP_ROOT, 'src', 'python_testing'))
200-
sys.path.insert(0, python_testing_path)
201193
clusters_output_dir = os.path.abspath(
202194
os.path.join(output_dir, 'clusters'))
203-
204-
from spec_parsing_support import build_xml_clusters
205-
206195
header = '# List of currently defined spec clusters\n'
207196
header += 'This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.py`. DO NOT EDIT BY HAND!\n\n'
208197

209-
clusters, problems = build_xml_clusters(clusters_output_dir)
198+
clusters, problems = build_xml_clusters(Path(clusters_output_dir))
210199
all_name_lens = [len(c.name) for c in clusters.values()]
211200
name_len = max(all_name_lens)
212201
title_id_decimal = ' ID (Decimal) '

src/app/zap-templates/zcl/data-model/chip/camera-av-stream-management-cluster.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (c) 2024 Project CHIP Authors
3+
Copyright (c) 2024-2025 Project CHIP Authors
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -18,7 +18,7 @@ limitations under the License.
1818
XML generated by Alchemy; DO NOT EDIT.
1919
Source: src/app_clusters/CameraAVStreamManagement.adoc
2020
Parameters: in-progress
21-
Git: 1.4-446-g4a179b5f4
21+
Git: 1.4-526-g306635762
2222
-->
2323
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
2424
<domain name="Cameras"/>
@@ -508,7 +508,7 @@ Git: 1.4-446-g4a179b5f4
508508
</command>
509509

510510
<command code="0x05" source="client" name="VideoStreamModify" optional="true">
511-
<description>This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID.</description>
511+
<description>This command SHALL be used to modify a stream specified by the VideoStreamID.</description>
512512
<access op="invoke" privilege="manage"/>
513513
<arg id="0" name="VideoStreamID" type="int16u"/>
514514
<arg id="1" name="WatermarkEnabled" type="boolean" optional="true"/>

src/controller/data_model/controller-clusters.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -9823,7 +9823,7 @@ provisional cluster CameraAvStreamManagement = 1361 {
98239823
command access(invoke: manage) AudioStreamDeallocate(AudioStreamDeallocateRequest): DefaultSuccess = 2;
98249824
/** This command SHALL allocate a video stream on the camera and return an allocated video stream identifier. */
98259825
command access(invoke: manage) VideoStreamAllocate(VideoStreamAllocateRequest): VideoStreamAllocateResponse = 3;
9826-
/** This command SHALL be used to modify the resolution of a stream specified by the VideoStreamID. */
9826+
/** This command SHALL be used to modify a stream specified by the VideoStreamID. */
98279827
command access(invoke: manage) VideoStreamModify(VideoStreamModifyRequest): DefaultSuccess = 5;
98289828
/** This command SHALL deallocate a video stream on the camera, corresponding to the given video stream identifier. */
98299829
command access(invoke: manage) VideoStreamDeallocate(VideoStreamDeallocateRequest): DefaultSuccess = 6;

src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/platform/nxp/common/ota/ota.gni

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Copyright (c) 2025 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
import("//build_overrides/nxp_sdk.gni")
16+
import("${nxp_sdk_build_root}/nxp_sdk.gni")
17+
18+
ota_root = get_path_info(".", "abspath")
19+
20+
ota_sources = [
21+
"${ota_root}/OTAFirmwareProcessor.cpp",
22+
"${ota_root}/OTAFirmwareProcessor.h",
23+
"${ota_root}/OTAHooks.cpp",
24+
"${ota_root}/OTAImageProcessorImpl.cpp",
25+
"${ota_root}/OTAImageProcessorImpl.h",
26+
"${ota_root}/OTATlvProcessor.cpp",
27+
"${ota_root}/OTATlvProcessor.h",
28+
]
29+
30+
if (nxp_use_factory_data && nxp_enable_ota_factory_data_processor) {
31+
ota_sources += [
32+
"${ota_root}/OTAFactoryDataProcessor.cpp",
33+
"${ota_root}/OTAFactoryDataProcessor.h",
34+
]
35+
}

src/platform/nxp/mcxw71_k32w1/BUILD.gn

+8-28
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import("//build_overrides/openthread.gni")
1818

1919
import("${chip_root}/src/crypto/crypto.gni")
2020
import("${chip_root}/src/platform/device.gni")
21+
import("${chip_root}/src/platform/nxp/common/ota/ota.gni")
2122

2223
import("${nxp_sdk_build_root}/nxp_sdk.gni")
2324

@@ -53,22 +54,7 @@ source_set("nxp_factory_data") {
5354
source_set("nxp_ota") {
5455
public = [ "../common/ota/OTAImageProcessorImpl.h" ]
5556

56-
sources = [
57-
"../common/ota/OTAFirmwareProcessor.cpp",
58-
"../common/ota/OTAFirmwareProcessor.h",
59-
"../common/ota/OTAHooks.cpp",
60-
"../common/ota/OTAImageProcessorImpl.cpp",
61-
"../common/ota/OTAImageProcessorImpl.h",
62-
"../common/ota/OTATlvProcessor.cpp",
63-
"../common/ota/OTATlvProcessor.h",
64-
]
65-
66-
if (nxp_use_factory_data && nxp_enable_ota_factory_data_processor) {
67-
sources += [
68-
"../common/ota/OTAFactoryDataProcessor.cpp",
69-
"../common/ota/OTAFactoryDataProcessor.h",
70-
]
71-
}
57+
sources = ota_sources
7258

7359
deps = [
7460
":nxp_platform",
@@ -123,18 +109,6 @@ static_library("nxp_platform") {
123109
"ram_storage.c",
124110
"ram_storage.h",
125111
]
126-
} else if (nxp_nvm_component == "littlefs") {
127-
defines += [
128-
"CHIP_PLAT_NVM_SUPPORT=3",
129-
"EXTERNAL_KEYVALUESTOREMANAGERIMPL_HEADER=\"platform/nxp/common/KeyValueStoreManagerImpl.h\"",
130-
]
131-
132-
sources += [
133-
"../common/KeyValueStoreManagerImpl.cpp",
134-
"../common/KeyValueStoreManagerImpl.h",
135-
"../common/NXPConfig.h",
136-
"../common/NXPConfigKS.cpp",
137-
]
138112
} else if (nxp_nvm_component == "nvs") {
139113
defines += [
140114
"gAppNvsExternalFlash_c=0",
@@ -150,6 +124,12 @@ static_library("nxp_platform") {
150124
]
151125
}
152126

127+
# When the app is built using cmake, we must ensure the OTA platform files are also compiled.
128+
# When the app is built using gn, the app selects the nxp_ota target through its build file.
129+
if (nxp_external_sdk && chip_enable_ota_requestor) {
130+
sources += ota_sources
131+
}
132+
153133
if (nxp_use_plain_dac_key) {
154134
defines += [ "CHIP_USE_PLAIN_DAC_KEY=1" ]
155135
} else {

src/platform/nxp/mcxw71_k32w1/args.gni

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ openthread_root =
2121
nxp_platform = "mcxw71_k32w1"
2222
nxp_sdk_name = "mcxw71_k32w1_sdk"
2323
nxp_device_layer = "nxp/${nxp_platform}"
24+
nxp_nvm_component = "nvs"
2425
nxp_use_lwip = false
2526

2627
# ARM architecture flags will be set based on NXP board.

0 commit comments

Comments
 (0)