Skip to content

Commit bffb446

Browse files
authored
Merge branch 'master' into feature/app-install-flow-public
2 parents 584a694 + 2405b12 commit bffb446

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2330
-43
lines changed

.github/workflows/examples-nxp.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -60,36 +60,36 @@ jobs:
6060
run: |
6161
scripts/run_in_build_env.sh "\
6262
./scripts/build/build_examples.py \
63-
--target nxp-k32w0-lighting \
64-
--target nxp-k32w0-lighting-factory \
65-
--target nxp-k32w0-lighting-rotating-id \
66-
--target nxp-k32w0-contact-sensor \
67-
--target nxp-k32w0-contact-sensor-low-power \
68-
--target nxp-k32w0-contact-sensor-low-power-factory \
69-
--target nxp-k32w1-lighting \
70-
--target nxp-k32w1-contact-sensor-low-power \
63+
--target nxp-k32w0-freertos-lighting \
64+
--target nxp-k32w0-freertos-lighting-factory \
65+
--target nxp-k32w0-freertos-lighting-rotating-id \
66+
--target nxp-k32w0-freertos-contact-sensor \
67+
--target nxp-k32w0-freertos-contact-sensor-low-power \
68+
--target nxp-k32w0-freertos-contact-sensor-low-power-factory \
69+
--target nxp-k32w1-freertos-lighting \
70+
--target nxp-k32w1-freertos-contact-sensor-low-power \
7171
build \
7272
--copy-artifacts-to out/artifacts \
7373
"
7474
- name: Get lighting app size stats
7575
run: |
7676
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
7777
nxp k32w0+release light \
78-
out/artifacts/nxp-k32w0-lighting/chip-k32w0x-light-example.elf \
78+
out/artifacts/nxp-k32w0-freertos-lighting/chip-k32w0x-light-example.elf \
7979
/tmp/bloat_reports/
8080
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
8181
nxp k32w1+release light \
82-
out/artifacts/nxp-k32w1-lighting/chip-k32w1-light-example.elf \
82+
out/artifacts/nxp-k32w1-freertos-lighting/chip-k32w1-light-example.elf \
8383
/tmp/bloat_reports/
8484
- name: Get contact sensor size stats
8585
run: |
8686
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
8787
nxp k32w0+release contact \
88-
out/artifacts/nxp-k32w0-contact-sensor-low-power/chip-k32w0x-contact-example.elf \
88+
out/artifacts/nxp-k32w0-freertos-contact-sensor-low-power/chip-k32w0x-contact-example.elf \
8989
/tmp/bloat_reports/
9090
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
9191
nxp k32w1+release contact \
92-
out/artifacts/nxp-k32w1-contact-sensor-low-power/chip-k32w1-contact-example.elf \
92+
out/artifacts/nxp-k32w1-freertos-contact-sensor-low-power/chip-k32w1-contact-example.elf \
9393
/tmp/bloat_reports/
9494
- name: Uploading Size Reports
9595
uses: ./.github/actions/upload-size-reports
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
#
2+
# Copyright (c) 2023-2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
cmake_minimum_required(VERSION 3.13.1)
17+
18+
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/third_party/connectedhomeip REALPATH)
19+
get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH)
20+
get_filename_component(ALL_CLUSTERS_COMMON_DIR ${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common REALPATH)
21+
get_filename_component(ALL_CLUSTERS_NXP_COMMON_DIR ${CHIP_ROOT}/examples/all-clusters-app/nxp/common REALPATH)
22+
get_filename_component(EXAMPLE_PLATFORM_NXP_COMMON_DIR ${CHIP_ROOT}/examples/platform/nxp/common REALPATH)
23+
get_filename_component(EXAMPLE_PLATFORM_NXP_ZEPHYR_DIR ${CHIP_ROOT}/examples/platform/nxp/zephyr REALPATH)
24+
25+
# Perform common operations like detecting extra overlays in the platform folder for the target board
26+
# This must be called before find_package(Zephyr)
27+
include(${CHIP_ROOT}/config/nxp/app/pre-zephyr.cmake)
28+
29+
list(APPEND ZEPHYR_EXTRA_MODULES ${CHIP_ROOT}/config/nxp/chip-module)
30+
find_package(Zephyr HINTS $ENV{ZEPHYR_BASE})
31+
32+
# -Wmaybe-uninitialized has too many false positives, including on std::optional
33+
# and chip::Optional. Make it nonfatal.
34+
#
35+
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635
36+
target_compile_options(app PRIVATE -Werror -Wno-error=maybe-uninitialized)
37+
38+
project(chip-nxp-all-clusters-app-example)
39+
40+
include(${CHIP_ROOT}/config/nxp/app/enable-gnu-std.cmake)
41+
include(${CHIP_ROOT}/src/app/chip_data_model.cmake)
42+
43+
target_include_directories(app
44+
PRIVATE
45+
${ALL_CLUSTERS_NXP_COMMON_DIR}/main/include
46+
${ALL_CLUSTERS_COMMON_DIR}/include
47+
${GEN_DIR}/app-common
48+
${GEN_DIR}/all-clusters-app
49+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/device_manager/include
50+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/icd/include
51+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/device_callbacks/include
52+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/factory_data/include
53+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/app_task/include
54+
)
55+
56+
target_sources(app
57+
PRIVATE
58+
main/main.cpp
59+
${ALL_CLUSTERS_NXP_COMMON_DIR}/main/AppTask.cpp
60+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/device_manager/source/CHIPDeviceManager.cpp
61+
${ALL_CLUSTERS_NXP_COMMON_DIR}/main/DeviceCallbacks.cpp
62+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/device_callbacks/source/CommonDeviceCallbacks.cpp
63+
${ALL_CLUSTERS_NXP_COMMON_DIR}/main/ZclCallbacks.cpp
64+
${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp
65+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/app_task/source/AppTaskBase.cpp
66+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/app_task/source/AppTaskZephyr.cpp
67+
${EXAMPLE_PLATFORM_NXP_ZEPHYR_DIR}/factory_data/source/AppFactoryDataExample.cpp
68+
)
69+
70+
target_compile_definitions(app PUBLIC
71+
"EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/zephyr/FactoryDataProviderImpl.h\""
72+
)
73+
74+
if(CONFIG_CHIP_OTA_REQUESTOR)
75+
target_sources(app PRIVATE
76+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/ota_requestor/source/OTARequestorInitiatorCommon.cpp
77+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/ota_requestor/source/OTARequestorInitiatorZephyr.cpp
78+
)
79+
target_include_directories(app PRIVATE
80+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/ota_requestor/include/
81+
)
82+
endif()
83+
84+
chip_configure_data_model(app
85+
INCLUDE_SERVER
86+
ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/all-clusters-app.zap
87+
)
88+
89+
if(CONFIG_CHIP_LIB_SHELL)
90+
target_compile_definitions(app PRIVATE ENABLE_CHIP_SHELL)
91+
target_include_directories(app PRIVATE
92+
${CHIP_ROOT}/examples/shell/shell_common/include
93+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/matter_cli/include
94+
)
95+
target_sources(app PRIVATE
96+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/matter_cli/source/AppCLIBase.cpp
97+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/matter_cli/source/AppCLIZephyr.cpp
98+
${CHIP_ROOT}/examples/shell/shell_common/cmd_misc.cpp
99+
${CHIP_ROOT}/examples/shell/shell_common/cmd_otcli.cpp
100+
${CHIP_ROOT}/examples/shell/shell_common/cmd_server.cpp
101+
)
102+
endif()
103+
104+
target_sources(app
105+
PRIVATE
106+
${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp
107+
${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-modes-manager.cpp
108+
${ALL_CLUSTERS_COMMON_DIR}/src/static-supported-temperature-levels.cpp
109+
${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp
110+
${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp
111+
${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp
112+
${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp
113+
${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp
114+
${EXAMPLE_PLATFORM_NXP_COMMON_DIR}/icd/source/ICDUtil.cpp
115+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Copyright (c) 2024 Project CHIP Authors
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
mainmenu "Matter NXP All Clusters Example Application"
17+
18+
rsource "../../../../config/nxp/chip-module/Kconfig.features"
19+
rsource "../../../../config/nxp/chip-module/Kconfig.defaults"
20+
source "Kconfig.zephyr"

0 commit comments

Comments
 (0)