Skip to content

Commit ef01566

Browse files
Merge branch 'master' into cleanup/wfx_host_events_header_file
2 parents a002962 + 12f04dc commit ef01566

File tree

139 files changed

+4699
-894
lines changed

Some content is hidden

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

139 files changed

+4699
-894
lines changed

.github/workflows/examples-nxp.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,7 @@ jobs:
243243
--target nxp-rw61x-freertos-all-clusters-wifi \
244244
--target nxp-rw61x-freertos-all-clusters-thread \
245245
--target nxp-rw61x-freertos-all-clusters-thread-wifi \
246+
--target nxp-rw61x-freertos-all-clusters-wifi-ota-cmake \
246247
build \
247248
--copy-artifacts-to out/artifacts \
248249
"
@@ -274,7 +275,7 @@ jobs:
274275
with:
275276
platform-name: RW61X
276277
zephyr:
277-
name: ZEPHYR_RW61X
278+
name: ZEPHYR
278279

279280
runs-on: ubuntu-latest
280281
if: github.actor != 'restyled-io[bot]'
@@ -290,12 +291,13 @@ jobs:
290291
with:
291292
platform: nxp
292293

293-
- name: Build RW61x Zephyr examples
294+
- name: Build NXP Zephyr examples
294295
run: |
295296
scripts/run_in_build_env.sh "\
296297
./scripts/build/build_examples.py \
297298
--target nxp-rw61x-zephyr-all-clusters \
298299
--target nxp-rw61x-zephyr-thermostat \
299300
--target nxp-rw61x-zephyr-laundry-washer-factory \
301+
--target nxp-rw61x_eth-zephyr-thermostat-ethernet \
300302
build \
301303
"

.github/workflows/examples-openiotsdk.yaml

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@
1515
name: Build example - Open IoT SDK
1616

1717
on:
18-
push:
19-
branches-ignore:
20-
- 'dependabot/**'
21-
pull_request:
22-
merge_group:
18+
# Workflow disabled due to lack of maintainer
2319
workflow_dispatch:
2420

2521
concurrency:

config/nxp/chip-cmake-freertos/CMakeLists.txt

+67-10
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,24 @@ if(NOT CHIP_ROOT)
2020
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH)
2121
endif()
2222

23-
get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/nxp/chip-gn-freertos REALPATH)
23+
if (NOT GN_ROOT_TARGET)
24+
get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/nxp/chip-gn-freertos REALPATH)
25+
endif()
26+
27+
# Include common NXP helpers for build & pre/post-build process
28+
include(${CHIP_ROOT}/third_party/nxp/nxp_matter_support/cmake/build_helpers.cmake)
2429

2530
include(${CHIP_ROOT}/config/nxp/cmake/common.cmake)
2631
include(${CHIP_ROOT}/src/app/chip_data_model.cmake)
2732

33+
if(NOT CONFIG_CHIP_BUILD_APP_WITH_GN)
2834
# Prepare compiler flags
2935
matter_add_cflags(${CMAKE_C_FLAGS})
3036
matter_add_cxxflags(${CMAKE_CXX_FLAGS})
3137

3238
matter_get_compiler_flags_from_targets("${CONFIG_CHIP_EXTERNAL_TARGETS}")
39+
endif()
40+
3341

3442
# ==============================================================================
3543
# Generate configuration for CHIP GN build system
@@ -39,31 +47,80 @@ matter_add_gn_arg_string("nxp_platform" ${CONFIG_CHIP_NXP_PLATFORM})
3947
matter_add_gn_arg("chip_with_factory_data" ${CONFIG_CHIP_FACTORY_DATA})
4048
matter_add_gn_arg("chip_enable_secure_dac_private_key_storage" ${CONFIG_CHIP_SECURE_DAC_PRIVATE_KEY_STORAGE})
4149
matter_add_gn_arg("chip_enable_secure_whole_factory_data" ${CONFIG_CHIP_ENABLE_SECURE_WHOLE_FACTORY_DATA})
50+
matter_add_gn_arg_bool("chip_enable_matter_cli" CONFIG_CHIP_LIB_SHELL)
51+
matter_add_gn_arg_bool("chip_enable_pairing_autostart" CONFIG_CHIP_ENABLE_PAIRING_AUTOSTART)
4252

4353
if (CONFIG_USE_CHIP_DATA_MODEL_INTERFACE)
4454
set(DATA_MODEL_INTERFACE "enabled")
4555
else()
4656
set(DATA_MODEL_INTERFACE "disabled")
4757
endif()
4858

49-
matter_common_gn_args(
50-
DEBUG CONFIG_DEBUG
51-
LIB_SHELL CONFIG_CHIP_LIB_SHELL
52-
LIB_TESTS CONFIG_CHIP_BUILD_TESTS
53-
PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG}
54-
PROJECT_CONFIG_INC_DIR ${CONFIG_CHIP_PROJECT_CONFIG_INCLUDE_DIRS}
55-
DEVICE_INFO_EXAMPLE_PROVIDER CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER
56-
DATA_MODEL_INTERFACE ${DATA_MODEL_INTERFACE}
57-
)
59+
if(CONFIG_BOOTLOADER_MCUBOOT)
60+
matter_add_gn_arg_bool("no_mcuboot" false)
61+
endif(CONFIG_BOOTLOADER_MCUBOOT)
62+
63+
# Enable map file generation by default
64+
matter_add_gn_arg_bool("chip_generate_link_map_file" true)
65+
66+
if(CONFIG_CHIP_BUILD_APP_WITH_GN)
67+
include(${CHIP_ROOT}/third_party/nxp/nxp_matter_support/cmake/nxp_sdk_gn_build.cmake)
68+
else()
69+
matter_common_gn_args(
70+
DEBUG CONFIG_DEBUG
71+
LIB_SHELL CONFIG_CHIP_LIB_SHELL
72+
LIB_TESTS CONFIG_CHIP_BUILD_TESTS
73+
PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG}
74+
PROJECT_CONFIG_INC_DIR ${CONFIG_CHIP_PROJECT_CONFIG_INCLUDE_DIRS}
75+
DEVICE_INFO_EXAMPLE_PROVIDER CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER
76+
DATA_MODEL_INTERFACE ${DATA_MODEL_INTERFACE}
77+
)
78+
endif()
5879

5980
matter_generate_args_tmp_file()
6081

6182
# ==============================================================================
6283
# Build chip library
6384
# ==============================================================================
85+
if(NOT CONFIG_CHIP_BUILD_APP_WITH_GN)
6486
matter_build(chip
6587
LIB_SHELL ${CONFIG_CHIP_LIB_SHELL}
6688
LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS}
6789
DEVICE_INFO_EXAMPLE_PROVIDER ${CONFIG_CHIP_EXAMPLE_DEVICE_INFO_PROVIDER}
6890
GN_DEPENDENCIES ${CONFIG_GN_DEPENDENCIES}
6991
)
92+
endif()
93+
94+
95+
#**************************************************************************************
96+
# Pre-build instructions
97+
#**************************************************************************************
98+
nxp_pre_build_process()
99+
100+
#**************************************************************************************
101+
# Post-build instructions
102+
#**************************************************************************************
103+
if(CONFIG_CHIP_OTA_REQUESTOR)
104+
105+
if (CONFIG_BOOTLOADER_MCUBOOT)
106+
# Build mcuboot application
107+
nxp_generate_mcuboot()
108+
109+
# Sign application binaries with mcuboot imgtool
110+
nxp_sign_app_imgtool("${CONFIG_REMOVE_SECTIONS_FROM_BIN}")
111+
112+
endif()
113+
114+
# Generate .ota file
115+
nxp_generate_ota_file()
116+
117+
endif(CONFIG_CHIP_OTA_REQUESTOR)
118+
119+
if (CONFIG_CHIP_FACTORY_DATA_BUILD)
120+
121+
set(OUTPUT_FILE_PATH ${gn_build}/factory_data)
122+
123+
# Generate factory data binaries
124+
nxp_generate_factory_data()
125+
126+
endif(CONFIG_CHIP_FACTORY_DATA_BUILD)

config/nxp/chip-module/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ endif()
123123

124124
if (CONFIG_NET_L2_OPENTHREAD)
125125
matter_add_gn_arg_string("chip_mdns" "platform")
126-
elseif(CONFIG_WIFI_NXP)
126+
elseif(CONFIG_WIFI_NXP OR CONFIG_CHIP_ETHERNET)
127127
matter_add_gn_arg_string("chip_mdns" "minimal")
128128
else()
129129
matter_add_gn_arg_string("chip_mdns" "none")

config/nxp/chip-module/Kconfig.defaults

+16-4
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,6 @@ choice SCHED_ALGORITHM
252252
default SCHED_MULTIQ
253253
endchoice
254254

255-
choice LIBC_IMPLEMENTATION
256-
default NEWLIB_LIBC
257-
endchoice
258-
259255
choice WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_CHOICE
260256
default WIFI_NM_WPA_SUPPLICANT_LOG_LEVEL_INF
261257
endchoice
@@ -326,6 +322,22 @@ config CHIP_MALLOC_SYS_HEAP_SIZE
326322

327323
endif
328324

325+
if CHIP_ETHERNET || CHIP_WIFI
326+
327+
choice LIBC_IMPLEMENTATION
328+
default NEWLIB_LIBC
329+
endchoice
330+
331+
endif
332+
333+
if CHIP_ETHERNET
334+
335+
choice NXP_ENET_DRIVER
336+
default ETH_NXP_ENET
337+
endchoice
338+
339+
endif
340+
329341
# Configure MBEDTLS lib
330342
config MBEDTLS
331343
default y

config/nxp/chip-module/Kconfig.features

+23
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,27 @@ config CHIP_WIFI_CONNECTION_RECOVERY_JITTER
7676
a random jitter interval is added to it to avoid periodicity. The random jitter is selected
7777
within range [-JITTER; +JITTER].
7878

79+
config CHIP_ETHERNET
80+
bool "Enable NXP Ethernet support"
81+
default n
82+
depends on !CHIP_WIFI
83+
select NET_MGMT_EVENT
84+
select NET_MGMT_EVENT_INFO
85+
select NET_L2_ETHERNET
86+
select NET_L2_ETHERNET_MGMT
87+
select NET_UDP
88+
select NET_IP
89+
select NET_CONFIG_SETTINGS
90+
select NET_MGMT
91+
select NET_IPV4
92+
select NET_DHCPV4
93+
select NET_NATIVE_IPV4
94+
select NET_NATIVE
95+
select NET_TCP
96+
select DNS_RESOLVER
97+
select MDNS_RESOLVER
98+
select MBEDTLS_PKCS5_C
99+
select MBEDTLS_HKDF_C
100+
select MBEDTLS_ECDSA_C
101+
select PSA_CRYPTO_ENABLE_ALL
79102
endif # CHIP

config/nxp/chip-module/generate_factory_data.cmake

+3-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@ function(nxp_generate_factory_data)
218218
# Localize all scripts needed to generate factory data partition
219219
set(GENERATE_CERTS_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/nxp/generate_certs.py)
220220
set(GENERATE_FDATA_SCRIPT_PATH ${CHIP_ROOT}/scripts/tools/nxp/factory_data_generator/generate.py)
221-
set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR}/zephyr)
221+
if (NOT OUTPUT_FILE_PATH)
222+
set(OUTPUT_FILE_PATH ${APPLICATION_BINARY_DIR}/zephyr)
223+
endif()
222224

223225
if(CONFIG_CHIP_FACTORY_DATA_CERT_SOURCE_GENERATED)
224226
# Generate certificates

config/nxp/cmake/common.cmake

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_
4444
matter_add_gn_arg_bool ("chip_automation_logging" FALSE)
4545
matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP)
4646
matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_CHIP_WIFI)
47+
matter_add_gn_arg_bool ("chip_enable_ethernet" CONFIG_CHIP_ETHERNET)
4748
matter_add_gn_arg_bool ("chip_system_config_provide_statistics" CONFIG_CHIP_STATISTICS)
4849
matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT)
4950
matter_add_gn_arg_bool ("enable_eventlist_attribute" TRUE)

examples/all-clusters-app/ameba/main/chipinterface.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
#include "Globals.h"
2525
#include "LEDWidget.h"
2626
#include "chip_porting.h"
27+
#if CHIP_AMEBA_APP_TASK
28+
#include "ameba_main_task.h"
29+
#endif
2730
#include <DeviceInfoProviderImpl.h>
2831

2932
#include <app/clusters/identify-server/identify-server.h>
@@ -170,7 +173,9 @@ static void InitServer(intptr_t context)
170173
#if CONFIG_ENABLE_CHIP_SHELL
171174
InitBindingHandler();
172175
#endif
173-
176+
#if CHIP_AMEBA_APP_TASK
177+
AppTaskInit();
178+
#endif
174179
chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(&sAmebaObserver);
175180
}
176181

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
17+
cmake_minimum_required(VERSION 3.13.1)
18+
19+
project(chip-rw61x-all-cluster-example)
20+
21+
if (NOT CHIP_ROOT)
22+
get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../../../.. REALPATH)
23+
endif()
24+
25+
# Define the GN root target for the application
26+
get_filename_component(GN_ROOT_TARGET ${CMAKE_CURRENT_LIST_DIR} REALPATH)
27+
28+
# Include platform specific configs / variables
29+
include(${CHIP_ROOT}/examples/platform/nxp/rt/rw61x/platform_config.cmake)
30+
31+
add_subdirectory(${CHIP_ROOT}/config/nxp/chip-cmake-freertos ./chip)
32+
33+
#**************************************************************************************
34+
# Build example application
35+
#**************************************************************************************
36+
if(CONFIG_CHIP_BUILD_APP_WITH_GN)
37+
nxp_build_app_with_gn()
38+
endif()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
* Copyright (c) 2024 Project CHIP Authors
3+
* All rights reserved.
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http: //www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#include "rd_rw612_bga.overlay"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
17+
CONFIG_SETTINGS_NVS_SECTOR_COUNT=16
18+
19+
# 0xA226
20+
CONFIG_CHIP_DEVICE_PRODUCT_ID=41510
21+
CONFIG_CHIP_DEVICE_PRODUCT_URL="https://www.nxp.com/products/wireless-connectivity/wi-fi-plus-bluetooth-plus-802-15-4/wireless-mcu-with-integrated-tri-radio-1x1-wi-fi-6-plus-bluetooth-low-energy-5-3-802-15-4:RW612"
22+
CONFIG_CHIP_DEVICE_PRODUCT_LABEL="RW612"
23+
CONFIG_CHIP_DEVICE_PART_NUMBER="RW612"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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+
17+
# Options needed for Ethernet are located in this file
18+
19+
# ethernet discriminator
20+
CONFIG_CHIP_DEVICE_DISCRIMINATOR=0x700
21+
22+
CONFIG_CHIP_WIFI=n
23+
CONFIG_CHIP_ETHERNET=y
24+
25+
CONFIG_NET_DEFAULT_IF_WIFI=n
26+
CONFIG_BT=n
27+
CONFIG_BT_DEVICE_NAME=""

0 commit comments

Comments
 (0)