Skip to content

Commit

Permalink
Merge branch 'master' into ZAP_waterleakdetector_battery
Browse files Browse the repository at this point in the history
  • Loading branch information
lboue authored Sep 11, 2024
2 parents 85968f2 + e64ab71 commit f875f4f
Show file tree
Hide file tree
Showing 291 changed files with 14,242 additions and 22,617 deletions.
38 changes: 22 additions & 16 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,19 @@ ARG USER_UID=1000
ARG USER_GID=$USER_UID
ENV LANG en_US.utf8

# these are installed for terminal/dev convenience. If more tooling for build is required, please
# add them to chip-build (in integrations/docker/images/chip-build)

# These are installed for terminal/dev convenience. If more tooling for build is required, please
# add them to chip-build (in integrations/docker/images/chip-build).
RUN apt-get update \
&& apt-get install -y locales \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& apt-get -fy install git vim emacs sudo \
&& apt-get -fy install vim emacs sudo \
apt-utils dialog zsh \
iproute2 procps lsb-release \
lsb-release \
bash-completion \
build-essential cmake cppcheck valgrind \
wget curl telnet \
valgrind \
docker.io \
iputils-ping net-tools \
libncurses5 \
libncursesw5 \
libpython2.7 \
iputils-ping \
&& :

RUN groupadd -g $USER_GID $USERNAME \
Expand All @@ -55,13 +52,22 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty
RUN mkdir -p /opt/sdk/sdks/ \
&& chown -R $USERNAME:$USERNAME \
/opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \
/opt/NordicSemiconductor/nrfconnect/ `# $USERNAME needs to own west configuration to build nRF Connect examples` \
$IDF_PATH `# $USERNAME needs to own the esp-idf and tools for the examples to build` \
$ANDROID_HOME \
$IDF_TOOLS_PATH \
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \
&& chmod -R +x \
$ANDROID_HOME/tools/bin `# sdkmanager for accepting licenses`\
&& chmod -R +w \
$IDF_TOOLS_PATH \
$SYSROOT_AARCH64 `# allow read/write access to header and libraries` \
$ANDROID_HOME `# allow licenses to be accepted` \
$AMEBA_PATH `# AmebaD requires access to change build_info.h` \
$IMX_SDK_ROOT \
&& find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chmod -R +w \
&& find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chmod -R +w \
&& find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chmod -R +w \
&& find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chmod -R +w \
# Safe directory is preffered over chown.
&& git config --global --add safe.directory "*" \
&& :

# Fix Tizen SDK paths for new user
Expand Down
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 22",
"initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 74",
"image": "matter-dev-environment:local",
"remoteUser": "vscode",
"containerEnv": {
"PW_ENVIRONMENT_ROOT": "${containerWorkspaceFolder}/.environment-vscode"
},
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created in the array below.
Expand Down
2 changes: 2 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ fsync
ftd
fullclean
fuzzer
fuzzers
fuzztest
FW
gbl
Expand Down Expand Up @@ -1532,6 +1533,7 @@ virtualenv
visualstudio
vlatest
VLEDs
vm
vn
vnc
vous
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:54
image: ghcr.io/project-chip/chip-build:74
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down Expand Up @@ -316,9 +316,10 @@ jobs:
run: |
scripts/run_in_build_env.sh 'virtualenv pyenv'
source pyenv/bin/activate
pip3 install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl
pip3 install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl
pip3 install ./out/controller/python/chip_repl-0.0-py3-none-any.whl
python -m ensurepip --upgrade
python -m pip install ./out/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl
python -m pip install ./out/controller/python/chip_clusters-0.0-py3-none-any.whl
python -m pip install ./out/controller/python/chip_repl-0.0-py3-none-any.whl
- name: Run Python tests
shell: bash
Expand All @@ -334,7 +335,8 @@ jobs:
scripts/run_in_build_env.sh 'scripts/examples/gn_build_example.sh examples/chip-tool out/'
scripts/run_in_build_env.sh 'virtualenv pyenv'
source pyenv/bin/activate
pip3 install -r scripts/setup/requirements.setuppayload.txt
python -m ensurepip --upgrade
python -m pip install -r scripts/setup/requirements.setuppayload.txt
python3 src/setup_payload/tests/run_python_setup_payload_test.py out/chip-tool
build_linux_python_lighting_device:
Expand All @@ -344,7 +346,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build:54
image: ghcr.io/project-chip/chip-build:74
volumes:
- "/:/runner-root-volume"
- "/tmp/log_output:/tmp/test_logs"
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,9 @@ jobs:
run: |
scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux out/debug/ota-requestor-app chip_config_network_layer_ble=false non_spec_compliant_ota_action_delay_floor=0
- name: Run Framework Tests
# For now disable unguarded-availability-new warnings because we
# internally use APIs that we are annotating as only available on
# new enough versions. Maybe we should change out deployment
# target versions instead?
# We want to ensure that our log upload runs on timeout, so use a timeout here shorter
# than the 6-hour overall job timeout. 4.5 hours should be plenty.
timeout-minutes: 270
working-directory: src/darwin/Framework
run: |
mkdir -p /tmp/darwin/framework-tests
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-infineon:54
image: ghcr.io/project-chip/chip-build-infineon:74
env:
# TODO: this should probably be part of the dockerfile itself
CY_TOOLS_PATHS: /opt/Tools/ModusToolbox/tools_3.2
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/examples-nxp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,60 @@ jobs:
if: ${{ !env.ACT }}
with:
platform-name: K32W1
mcxw71:
name: MCXW71

env:
BUILD_TYPE: gn_k32w

runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-nxp:71
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: nxp
extra-submodule-parameters: --recursive

- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
with:
gh-context: ${{ toJson(github) }}

- name: Build examples
run: |
scripts/run_in_build_env.sh "\
./scripts/build/build_examples.py \
--target nxp-mcxw71-freertos-lighting \
--target nxp-mcxw71-freertos-contact-sensor-low-power \
build \
--copy-artifacts-to out/artifacts \
"
- name: Get lighting app size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nxp mcxw71+release light \
out/artifacts/nxp-mcxw71-freertos-lighting/chip-mcxw71-light-example.elf \
/tmp/bloat_reports/
- name: Get contact sensor size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
nxp mcxw71+release contact \
out/artifacts/nxp-mcxw71-freertos-contact-sensor-low-power/chip-mcxw71-contact-example.elf \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
with:
platform-name: MCXW71
rw61x:
name: RW61X

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/minimal-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ name: Minimal Build (Linux / configure)
on:
push:
branches-ignore:
- 'dependabot/**'
- "dependabot/**"
pull_request:
merge_group:

Expand All @@ -42,11 +42,11 @@ jobs:
- name: Checkout submodules # but don't bootstrap!
uses: ./.github/actions/checkout-submodules
with:
platform: linux
platform: linux

- name: Configure and build All Clusters App
run: |
CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux && ./ninja-build
CC=gcc CXX=g++ scripts/configure --project=examples/all-clusters-app/linux --enable-recommended=no && ./ninja-build
minimal-network-manager:
name: Linux / configure build of network-manager-app
Expand All @@ -64,8 +64,8 @@ jobs:
- name: Checkout submodules # but don't bootstrap!
uses: ./.github/actions/checkout-submodules
with:
platform: linux
platform: linux

- name: Configure and build Network Manager App
run: |
CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux && ./ninja-build
CC=gcc CXX=g++ scripts/configure --project=examples/network-manager-app/linux --enable-recommended=no && ./ninja-build
8 changes: 3 additions & 5 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -522,19 +522,17 @@ jobs:
scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing'
scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app'
scripts/run_in_python_env.sh out/venv './src/python_testing/test_testing/test_TC_ICDM_2_1.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_ICDM_2_1.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py'
scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py'
- name: Uploading core files
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ out/
/src/darwin/Framework/build/

# Pigweed Environment
.environment/
.environment*/
build_overrides/pigweed_environment.gni

# Temporary Directories
Expand Down Expand Up @@ -84,4 +84,3 @@ examples/*/esp32/dependencies.lock

# jupyter temporary files
.ipynb_checkpoints

8 changes: 4 additions & 4 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,25 @@ if (CONFIG_CHIP_CONFIG_IM_PRETTY_PRINT)
endif()

# Config the chip log level by IDF menuconfig
if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 1)
chip_gn_arg_bool ("chip_error_logging" "true")
else()
chip_gn_arg_bool ("chip_error_logging" "false")
endif()

if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 3)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 3)
chip_gn_arg_bool ("chip_progress_logging" "true")
else()
chip_gn_arg_bool ("chip_progress_logging" "false")
endif()

if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 4)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 4)
chip_gn_arg_bool ("chip_detail_logging" "true")
else()
chip_gn_arg_bool ("chip_detail_logging" "false")
endif()

if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 5)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 5)
chip_gn_arg_bool ("chip_automation_logging" "true")
else()
chip_gn_arg_bool ("chip_automation_logging" "false")
Expand Down
30 changes: 30 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,36 @@ menu "CHIP Device Layer"
To see detailed logging please set default log level to Debug.
(Component config --> Log output --> Default log verbosity --> Debug)

choice CHIP_LOG_DEFAULT_LEVEL
bool "CHIP default log verbosity"
default CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL
help
Default log level for CHIP logs. Note that CHIP_LOG_DEFAULT_LEVEL can only be less than or equal to LOG_DEFAULT_LEVEL.

config CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL
bool "Same as default log level"
config CHIP_LOG_DEFAULT_LEVEL_NONE
bool "CHIP logging disabled"
config CHIP_LOG_DEFAULT_LEVEL_ERROR
bool "Enable Error Logs"
config CHIP_LOG_DEFAULT_LEVEL_PROGRESS
bool "Enable Progress Logs"
config CHIP_LOG_DEFAULT_LEVEL_DETAIL
bool "Enable Detail Logs"
config CHIP_LOG_DEFAULT_LEVEL_AUTOMATION
bool "Enable Automation Logs"
endchoice

config CHIP_LOG_DEFAULT_LEVEL
int
range 0 LOG_DEFAULT_LEVEL
default LOG_DEFAULT_LEVEL if CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL
default 0 if CHIP_LOG_DEFAULT_LEVEL_NONE
default 1 if CHIP_LOG_DEFAULT_LEVEL_ERROR
default 3 if CHIP_LOG_DEFAULT_LEVEL_PROGRESS
default 4 if CHIP_LOG_DEFAULT_LEVEL_DETAIL
default 5 if CHIP_LOG_DEFAULT_LEVEL_AUTOMATION

endmenu

config CHIP_ENABLE_BDX_LOG_TRANSFER
Expand Down
31 changes: 31 additions & 0 deletions config/recommended.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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.

declare_args() {
# Note for SDK developers: As additional features with their own settings
# are added to the SDK, consider using the `matter_enable_recommended`
# meta-setting instead of a default value of 'true', especially where a
# different default is used based on platform (current_os): Often various
# debugging features have previously been defaulted to on for Linux and/or
# Mac but off for embedded platforms (on the assumption that Linux / Mac
# don't have resource constraints?); build settings of that nature should
# instead reference this meta-setting. E.g.
# enable_flux_capacitor = matter_enable_recommended && current_os == "linux"

# Enable recommended settings by default. This is a meta-setting
# that is enabled by default, and acts as a default for various
# other settings. Setting it to false produces a more conservative /
# minimal set of defaults.
matter_enable_recommended = true
}
Loading

0 comments on commit f875f4f

Please sign in to comment.