Skip to content

Commit

Permalink
Merge branch 'master' into run_rvc_tests_in_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hicklin committed Feb 14, 2024
2 parents 298026c + 598356c commit 158d9a1
Show file tree
Hide file tree
Showing 428 changed files with 12,175 additions and 3,704 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/examples-k32w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-k32w:32
image: ghcr.io/project-chip/chip-build-k32w:33
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ jobs:
--known-failure app/reporting/tests/MockReportScheduler.h \
--known-failure app/server/AppDelegate.h \
--known-failure app/TestEventTriggerDelegate.h \
--known-failure app/util/af-enums.h \
--known-failure app/util/af.h \
--known-failure app/util/af-types.h \
--known-failure app/util/attribute-metadata.h \
Expand Down Expand Up @@ -197,23 +196,23 @@ jobs:
- name: Check for incorrect error use in VerifyOrExit
if: always()
run: |
git grep -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
git grep -I -n "VerifyOrExit(.*, [A-Za-z]*_ERROR" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of PRI*8, which are not supported on some libcs.
if: always()
run: |
git grep -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
git grep -I -n "PRI.8" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of PRI*16, which are not supported on some libcs.
if: always()
run: |
git grep -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
git grep -I -n "PRI.16" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)third_party/lwip/repo/lwip/src/include/lwip/arch.h' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
Expand All @@ -226,7 +225,7 @@ jobs:
# TODO: TLVDebug should ideally not be excluded here.
# TODO: protocol_decoder.cpp should ideally not be excluded here.
# TODO: PersistentStorageMacros.h should ideally not be excluded here.
git grep -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0
git grep -I -n "PRI.64" -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)examples/chip-tool' ':(exclude)examples/tv-casting-app' ':(exclude)src/app/MessageDef/MessageDefHelper.cpp' ':(exclude)src/app/tests/integration/chip_im_initiator.cpp' ':(exclude)src/lib/core/TLVDebug.cpp' ':(exclude)src/lib/dnssd/tests/TestTxtFields.cpp' ':(exclude)src/lib/format/protocol_decoder.cpp' ':(exclude)src/lib/support/PersistentStorageMacros.h' ':(exclude)src/messaging/tests/echo/echo_requester.cpp' ':(exclude)src/platform/Linux' ':(exclude)src/platform/Ameba' ':(exclude)src/platform/ESP32' ':(exclude)src/platform/webos' ':(exclude)zzz_generated/chip-tool' ':(exclude)src/tools/chip-cert/Cmd_PrintCert.cpp' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
Expand Down Expand Up @@ -261,15 +260,15 @@ jobs:
- name: Check for use of 0x%u and the like, which lead to misleading output.
if: always()
run: |
git grep -n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
git grep -I -n '0x%[0-9l.-]*[^0-9lxX".-]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of '"0x" PRIu*' and the like, which lead to misleading output.
if: always()
run: |
git grep -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
git grep -I -n '0x%[0-9-]*" *PRI[^xX]' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match.
Expand All @@ -285,7 +284,7 @@ jobs:
- name: Check for use of 'emberAfReadAttribute' instead of the type-safe getters
if: always()
run: |
git grep -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
git grep -I -n 'emberAfReadAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
Expand All @@ -295,7 +294,7 @@ jobs:
- name: Check for use of 'emberAfWriteAttribute' instead of the type-safe setters
if: always()
run: |
git grep -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
git grep -I -n 'emberAfWriteAttribute' -- './*' ':(exclude).github/workflows/lint.yml' ':(exclude)src/app/util/af.h' ':(exclude)zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp' ':(exclude)src/app/zap-templates/templates/app/attributes/Accessors-src.zapt' ':(exclude)src/app/util/attribute-table.cpp' ':(exclude)examples/common/pigweed/rpc_services/Attributes.h' ':(exclude)src/app/util/attribute-table.h' ':(exclude)src/app/util/ember-compatibility-functions.cpp' && exit 1 || exit 0
# Run python Linter (flake8) and verify python files
# ignore some style errors, restyler should do that
Expand All @@ -310,12 +309,12 @@ jobs:
- name: Check for use of "SuccessOrExit(CHIP_ERROR_*)", which should probably be "SuccessOrExit(err = CHIP_ERROR_*)"
if: always()
run: |
git grep -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
git grep -I -n 'SuccessOrExit(CHIP_ERROR' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
# git grep exits with 0 if it finds a match, but we want
# to fail (exit nonzero) on match. And we want to exclude this file,
# to avoid our grep regexp matching itself.
- name: Check for use of "SuccessOrExit(something-without-assignment(", which should probably be "SuccessOrExit(err = something("
if: always()
run: |
git grep -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
git grep -I -n 'SuccessOrExit([^=)]*(' -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0
2 changes: 1 addition & 1 deletion .github/workflows/unit_integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
"clang") GN_ARGS='is_clang=true';;
"mbedtls") GN_ARGS='chip_crypto="mbedtls"';;
"rotating_device_id") GN_ARGS='chip_crypto="boringssl" chip_enable_rotating_device_id=true';;
"icd") GN_ARGS='chip_enable_icd_server=true';;
"icd") GN_ARGS='chip_enable_icd_server=true chip_enable_icd_lit=true';;
*) ;;
esac
Expand Down
6 changes: 4 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (enable_linux_lit_icd_app_build) {
group("linux_lit_icd_app") {
deps =
[ "${chip_root}/examples/lit-icd-app/linux(${standalone_toolchain})" ]
lit_icd_standalone_toolchain =
"${chip_root}/config/standalone/toolchain:lit_icd"

deps = [ "${chip_root}/examples/lit-icd-app/linux(${lit_icd_standalone_toolchain})" ]
}

extra_build_deps += [ ":linux_lit_icd_app" ]
Expand Down
6 changes: 6 additions & 0 deletions config/nrfconnect/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_EN
matter_add_gn_arg_bool ("chip_enable_factory_data" CONFIG_CHIP_FACTORY_DATA)
matter_add_gn_arg_bool ("chip_enable_read_client" CONFIG_CHIP_ENABLE_READ_CLIENT)

if (CONFIG_CHIP_ENABLE_ICD_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_lit" CONFIG_CHIP_ICD_LIT_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT)
endif()

if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND)
matter_add_gn_arg_bool("chip_use_transitional_commissionable_data_provider" FALSE)
matter_add_gn_arg_bool("chip_use_transitional_device_instance_info_provider" FALSE)
Expand Down
2 changes: 1 addition & 1 deletion config/nxp/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ endif #CHIP_FACTORY_DATA_BUILD
# See config/zephyr/Kconfig for full definition
config CHIP_FACTORY_RESET_ERASE_NVS
bool
default y if CHIP_FACTORY_DATA || CHIP_FACTORY_DATA_CUSTOM_BACKEND
default y

endif

Expand Down
44 changes: 37 additions & 7 deletions config/nxp/chip-module/Kconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ config PTHREAD_IPC

config POSIX_MAX_FDS
int
default 16
default 8

# Application stack size
config MAIN_STACK_SIZE
Expand All @@ -99,12 +99,21 @@ config INIT_STACKS
config NET_MGMT_EVENT_STACK_SIZE
default 2048

config NET_MGMT_EVENT_QUEUE_SIZE
default 20

config NET_IPV6_MLD
default y

config NET_IF_MCAST_IPV6_ADDR_COUNT
default 14

config NET_IF_MAX_IPV4_COUNT
default 2

config NET_IF_MAX_IPV6_COUNT
default 2

config NET_TC_TX_COUNT
default 1

Expand All @@ -129,10 +138,10 @@ config NET_TC_RX_THREAD_BASE_PRIO

# Network buffers
config NET_PKT_RX_COUNT
default 16
default 60

config NET_PKT_TX_COUNT
default 16
default 40

config NET_BUF_RX_COUNT
default 60
Expand All @@ -141,7 +150,7 @@ config NET_BUF_TX_COUNT
default 80

config NET_BUF_DATA_SIZE
default 1700
default 1744

# Bluetooth Low Energy configs

Expand Down Expand Up @@ -233,11 +242,14 @@ choice WPA_SUPP_LOG_LEVEL_CHOICE
endchoice

config WPA_SUPP_THREAD_STACK_SIZE
default 6144
default 12288

config SYSTEM_WORKQUEUE_STACK_SIZE
default 2048

config NET_TCP_WORKQ_STACK_SIZE
default 2048

# align these numbers to match the OpenThread config
config NET_IF_UNICAST_IPV6_ADDR_COUNT
default 6
Expand All @@ -246,7 +258,25 @@ config NET_IF_MCAST_IPV6_ADDR_COUNT
default 8

config NET_SOCKETS_POLL_MAX
default 4
default 8

config NET_IPV4_FRAGMENT_MAX_COUNT
default 3

config NET_IPV4_FRAGMENT_MAX_PKT
default 7

config NET_IPV4_FRAGMENT_TIMEOUT
default 3

config NET_IPV6_FRAGMENT_MAX_COUNT
default 3

config NET_IPV6_FRAGMENT_MAX_PKT
default 7

config NET_IPV6_FRAGMENT_TIMEOUT
default 3

# options managed by IP4/IP6 simultaneous support
# aligned here to match OpenThread config
Expand All @@ -260,7 +290,7 @@ config SHELL_STACK_SIZE
default 2616

config HEAP_MEM_POOL_SIZE
default 65536
default 122880

config CHIP_MALLOC_SYS_HEAP_SIZE
default 28672 # 28 kB
Expand Down
38 changes: 38 additions & 0 deletions config/nxp/lib/pw_rpc/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (c) 2023 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("//build_overrides/pigweed.gni")
import("$dir_pw_build/target_types.gni")

static_library("pw_rpc") {
output_name = "libPwRpc"

public_configs = [ "${dir_pigweed}/pw_hdlc:default_config" ]
deps = [
"$dir_pw_rpc:server",
"$dir_pw_rpc/nanopb:echo_service",
"${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp",
"${dir_pigweed}/pw_hdlc:pw_rpc",
dir_pw_assert,
dir_pw_hdlc,
dir_pw_log,
]

deps += pw_build_LINK_DEPS

output_dir = "${root_out_dir}/lib"

complete_static_lib = true
}
28 changes: 28 additions & 0 deletions config/nxp/lib/pw_rpc/pw_rpc.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Copyright (c) 2023 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("//build_overrides/pigweed.gni")

pw_log_BACKEND = "$dir_pw_log_basic"
pw_assert_BACKEND = "$dir_pw_assert_log:check_backend"
pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex"
pw_sys_io_BACKEND = "${chip_root}/examples/platform/nxp/pw_sys_io:pw_sys_io_nxp"

pw_build_LINK_DEPS = [
"$dir_pw_assert:impl",
"$dir_pw_log:impl",
]

dir_pw_third_party_nanopb = "${chip_root}/third_party/nanopb/repo"
9 changes: 9 additions & 0 deletions config/standalone/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ gcc_toolchain("standalone") {
import("${chip_root}/config/standalone/args.gni")
}
}

gcc_toolchain("lit_icd") {
toolchain_args = {
current_os = host_os
current_cpu = host_cpu
is_clang = false
import("${chip_root}/examples/lit-icd-app/linux/args.gni")
}
}
6 changes: 6 additions & 0 deletions config/telink/chip-module/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_
matter_add_gn_arg_bool ("chip_automation_logging" FALSE)
matter_add_gn_arg_bool ("chip_enable_icd_server" CONFIG_CHIP_ENABLE_ICD_SUPPORT)

if (CONFIG_CHIP_ENABLE_ICD_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_lit" CONFIG_CHIP_ICD_LIT_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT)
matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT)
endif()

if (CONFIG_CHIP_FACTORY_DATA)
matter_add_gn_arg_bool ("chip_use_transitional_commissionable_data_provider" "false")
matter_add_gn_arg_bool ("chip_enable_factory_data" "true")
Expand Down
5 changes: 0 additions & 5 deletions config/tizen/chip-gn/platform/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ import("${chip_root}/config/tizen/chip-gn/args.gni")
import("${build_root}/config/linux/pkg_config.gni")
import("${chip_root}/src/platform/device.gni")

pkg_config("capi-system-peripheral-io") {
packages = [ "capi-system-peripheral-io" ]
}

pkg_config("dlog") {
packages = [ "dlog" ]
}
Expand Down Expand Up @@ -73,7 +69,6 @@ source_set("tizen") {
":glib",
":capi-appfw-preference",
":capi-system-info",
":capi-system-peripheral-io",
]

if (chip_mdns == "platform") {
Expand Down
Loading

0 comments on commit 158d9a1

Please sign in to comment.