Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into remove_darwin_com…
Browse files Browse the repository at this point in the history
…piled_yaml
  • Loading branch information
cecille committed Jan 26, 2024
2 parents 8dc8697 + 6a35ffa commit 5328c6b
Show file tree
Hide file tree
Showing 484 changed files with 24,962 additions and 107,844 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,6 @@ jobs:

- name: Build example Lighting App (external platform)
run: scripts/examples/esp_example.sh lighting-app sdkconfig.ext_plat.defaults

- name: Build example Energy Management App
run: scripts/examples/esp_example.sh energy-management-app sdkconfig.defaults
3 changes: 2 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_CGEN_2_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TestGroupTableReports.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TestBatchInvoke.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_1.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_2.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TC_TIMESYNC_2_4.py" --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
Expand All @@ -484,6 +485,7 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_ICDM_2_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_DA_1_5.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_1_4.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_IDM_4_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_1.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app --factoryreset --app-args "--discriminator 1234 --KVS kvs1 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json" --script "src/python_testing/TC_FAN_3_2.py" --script-args "--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"'
Expand Down Expand Up @@ -591,4 +593,3 @@ jobs:
path: objdir-clone/
# objdirs are big; don't hold on to them too long.
retention-days: 5

2 changes: 2 additions & 0 deletions .restyled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ exclude:
- "scripts/setup/pigweed.json" # TODO(#29547). This file is temporary copy from pigweed repo that has minor edits. No restyle help in diff.
- "docs/ERROR_CODES.md" # generated by scripts, not easy to align tables
- "docs/clusters.md" # generated by scripts, not easy to align tables
- "docs/testing/yaml_pseudocluster.md" # generated by scripts, restyler makes the tables render improperly
- "docs/testing/yaml_schema.md" # generated by scripts, restyler makes the tables render improperly

changed_paths:
maximum: 100000
Expand Down
1 change: 0 additions & 1 deletion config/ameba/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ static_library("pw_rpc") {
"$dir_pw_rpc:server",
"$dir_pw_rpc/nanopb:echo_service",
"${chip_root}/examples/platform/ameba/pw_sys_io:pw_sys_io_ameba",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_hdlc,
dir_pw_log,
Expand Down
1 change: 0 additions & 1 deletion config/bouffalolab/common/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ static_library("pw_rpc") {
"$dir_pw_rpc:server",
"$dir_pw_rpc/nanopb:echo_service",
"${chip_root}/examples/platform/bouffalolab/common/rpc/pw_sys_io:pw_sys_io",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_checksum,
dir_pw_hdlc,
Expand Down
1 change: 0 additions & 1 deletion config/efr32/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ static_library("pw_rpc") {
"$dir_pw_rpc:server",
"$dir_pw_rpc/nanopb:echo_service",
"${chip_root}/examples/platform/silabs/pw_sys_io:pw_sys_io_silabs",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_checksum,
dir_pw_hdlc,
Expand Down
1 change: 0 additions & 1 deletion config/esp32/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ static_library("pw_rpc") {
"$dir_pw_rpc:server",
"$dir_pw_rpc/nanopb:echo_service",
"${chip_root}/examples/platform/esp32/pw_sys_io:pw_sys_io_esp32",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_hdlc,
dir_pw_log,
Expand Down
1 change: 0 additions & 1 deletion config/linux/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ static_library("pw_rpc") {
public_configs = [ "${dir_pigweed}/pw_hdlc:default_config" ]
deps = [
"$dir_pw_hdlc:encoder",
"$dir_pw_hdlc:pw_rpc",
"$dir_pw_hdlc:rpc_channel_output",
"$dir_pw_rpc/system_server:facade",
"$dir_pw_stream:socket_stream",
Expand Down
1 change: 0 additions & 1 deletion config/mbed/chip-gn/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ static_library("pw_rpc") {
deps = [
"$dir_pw_rpc:server",
"${chip_root}/examples/platform/mbed/pw_sys_io:pw_sys_io_mbed",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_hdlc,
dir_pw_log,
Expand Down
10 changes: 10 additions & 0 deletions config/nxp/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# NXP Zephyr build and configuration files

This directory contains build scripts and common configuration files used by
CHIP NXP Zephyr applications. It is structured as follows:

| File/Folder | Contents |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| chip-gn | GN project used to build selected CHIP libraries with the _nxp_zephyr_ platform integration layer |
| chip-module | CMake wrapper for the GN project defined in `chip-gn` directory, and other components that allow one to use CHIP as a Zephyr module |
| app | Common and optional Kconfig configuration files that can be used in NXP Zephyr applications |
25 changes: 25 additions & 0 deletions config/nxp/app/bootloader.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Options to be used for MCUBOOT build are located on this file.

# The default signature key used by MCUBOOT is located on their repository,
# change this to the appropriate one.
# NOTE: This option needs to contain a path to the same file used by
# MCUBOOT_SIGNATURE_KEY_FILE.
#CONFIG_BOOT_SIGNATURE_KEY_FILE="root-rsa-2048.pem"

CONFIG_BOOT_MAX_IMG_SECTORS=2048
22 changes: 22 additions & 0 deletions config/nxp/app/enable-gnu-std.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

add_library(gnu17 INTERFACE)
target_compile_options(gnu17
INTERFACE
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
-D_SYS__PTHREADTYPES_H_)
target_link_libraries(app PRIVATE gnu17)
21 changes: 21 additions & 0 deletions config/nxp/app/pre-zephyr.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Automatically find overlays defined at platform level
# Those are usually used to change FLASH and RAM layouts
if (EXISTS ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay)
list(APPEND EXTRA_DTC_OVERLAY_FILE ${CHIP_ROOT}/src/platform/nxp/zephyr/boards/${BOARD}/${BOARD}.overlay)
endif()
29 changes: 29 additions & 0 deletions config/nxp/chip-gn/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

# The location of the build configuration file.
buildconfig = "${build_root}/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "zephyr"

import("${chip_root}/config/nxp/chip-gn/args.gni")
}
40 changes: 40 additions & 0 deletions config/nxp/chip-gn/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("${chip_root}/build/chip/tests.gni")

assert(current_os == "zephyr")

declare_args() {
chip_build_example_providers = false
}

group("nxp_zephyr") {
deps = [ "${chip_root}/src/lib" ]

if (chip_build_tests) {
deps += [ "${chip_root}/src:tests" ]
}

if (chip_build_example_providers) {
deps += [ "${chip_root}/examples/providers:device_info_provider" ]
}
}

group("default") {
deps = [ ":nxp_zephyr" ]
}
32 changes: 32 additions & 0 deletions config/nxp/chip-gn/args.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/chip.gni")

import("${chip_root}/src/crypto/crypto.gni")

chip_device_platform = "nxp_zephyr"

chip_build_tests = false

chip_project_config_include = ""
chip_system_project_config_include = ""
chip_ble_project_config_include = ""

chip_crypto = "mbedtls"
chip_external_mbedtls = true

custom_toolchain = "${chip_root}/config/nxp/chip-gn/toolchain:zephyr"

pw_build_PIP_CONSTRAINTS = [ "${chip_root}/scripts/setup/constraints.txt" ]
34 changes: 34 additions & 0 deletions config/nxp/chip-gn/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build_overrides/build.gni")

import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")

declare_args() {
zephyr_ar = ""
zephyr_cc = ""
zephyr_cxx = ""
}

gcc_toolchain("zephyr") {
ar = zephyr_ar
cc = zephyr_cc
cxx = zephyr_cxx

toolchain_args = {
current_os = "zephyr"
is_clang = false
}
}
Loading

0 comments on commit 5328c6b

Please sign in to comment.