Skip to content

Commit

Permalink
Merge branch 'master' into esp32/multi_interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 authored May 23, 2023
2 parents 7c2e317 + 1efbaf6 commit b78ff62
Show file tree
Hide file tree
Showing 797 changed files with 181,423 additions and 49,523 deletions.
85 changes: 85 additions & 0 deletions .devcontainer/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#!/bin/bash

#
# 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.
#

HERE="$(dirname "$0")"
CHIP_ROOT="$(realpath "$HERE"/..)"
BUILD_VERSION="latest"
IMAGE_TAG="matter-dev-environment:local"
USER_UID=$UID

function show_usage() {
cat <<EOF
Usage: $0
Build vscode dev environment docker image.
Options:
-h,--help Show this help
-t,--tag Image tag - default is matter-dev-environment:local
-u,--uid User UIDa - default is the current user ID
-v,--version Build version - default is the latest
EOF
}

SHORT=t:,u:,h:,v
LONG=tag:,uid:,help:,version:
OPTS=$(getopt -n build --options "$SHORT" --longoptions "$LONG" -- "$@")

eval set -- "$OPTS"

while :; do
case "$1" in
-h | --help)
show_usage
exit 0
;;
-t | --tag)
IMAGE_TAG=$2
shift 2
;;
-u | --uid)
USER_UID=$2
shift 2
;;
-v | --version)
BUILD_VERSION=$2
shift 2
;;
--)
shift
break
;;
*)
echo "Unexpected option: $1"
show_usage
exit 2
;;
esac
done

if [ "$USER_UID" = "0" ]; then
USER_UID=1000
fi

docker build \
-t "$IMAGE_TAG" \
--pull \
--build-arg USER_UID="$USER_UID" \
--build-arg BUILD_VERSION="$BUILD_VERSION" \
--network=host \
"$HERE"
67 changes: 36 additions & 31 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,43 @@
"mounts": [
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"build": {
"dockerfile": "Dockerfile",
"args": {
"BUILD_VERSION": "0.7.3"
}
},
"initializeCommand": ".devcontainer/build.sh --tag matter-dev-environment:local --version 0.7.3",
"image": "matter-dev-environment:local",
"remoteUser": "vscode",
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"aaron-bond.better-comments",
"augustocdias.tasks-shell-input",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"github.vscode-pull-request-github",
"maelvalais.autoconf",
"marus25.cortex-debug",
"ms-azuretools.vscode-docker",
"ms-vscode.cpptools",
"msedge-dev.gnls",
"redhat.vscode-yaml",
"vadimcn.vscode-lldb",
"xaver.clang-format",
"yuichinukiyama.vscode-preview-server",
"yzhang.markdown-all-in-one"
],
// Use 'settings' to set *default* container specific settings.json values on container create.
// You can edit these settings after create using File > Preferences > Settings > Remote.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
"customizations": {
"vscode": {
// Add the IDs of extensions you want installed when the container is created in the array below.
"extensions": [
"mcu-debug.debug-tracker-vscode",
"aaron-bond.better-comments",
"augustocdias.tasks-shell-input",
"christian-kohler.path-intellisense",
"eamodio.gitlens",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"foxundermoon.shell-format",
"github.vscode-pull-request-github",
"maelvalais.autoconf",
"marus25.cortex-debug",
"ms-azuretools.vscode-docker",
"ms-vscode.cpptools",
"msedge-dev.gnls",
"redhat.vscode-yaml",
"vadimcn.vscode-lldb",
"xaver.clang-format",
"yuichinukiyama.vscode-preview-server",
"yzhang.markdown-all-in-one"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"args": ["-l"]
}
}
}
}
},
"remoteEnv": {
"GIT_PS1_SHOWDIRTYSTATE": "1",
Expand Down
2 changes: 2 additions & 0 deletions .github/.wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ armv
ASAN
asdk
AssertionError
ASR
AST
ASYNC
atomics
Expand Down Expand Up @@ -718,6 +719,7 @@ Jupyter
jupyterlab
KA
kAdminister
kbd
kBusy
kCase
Kconfig
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ jobs:
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
efr32 BRD4187C lighting-app \
out/efr32-brd4187c-light-rpc/chip-efr32-lighting-example.out \
out/efr32-brd4187c-light-rpc/matter-silabs-lighting-example.out \
/tmp/bloat_reports/
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
efr32 BRD4187C window-app \
out/efr32-brd4187c-window-covering-additional_data_advertising/chip-efr32-window-example.out \
out/efr32-brd4187c-window-covering-additional_data_advertising/matter-silabs-window-example.out \
/tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
Expand All @@ -122,15 +122,15 @@ jobs:
run: |
scripts/examples/gn_efr32_example.sh examples/lock-app/silabs/efr32/ out/lock_app_wifi_wf200 BRD4161A is_debug=false chip_logging=false --wifi wf200 --docker
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+wf200 lock-app \
out/lock_app_wifi_wf200/BRD4161A/chip-efr32-lock-example.out /tmp/bloat_reports/
out/lock_app_wifi_wf200/BRD4161A/matter-silabs-lock-example.out /tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Build example EFR32+RS9116 WiFi Lighting app for BRD4161A
timeout-minutes: 15
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32/ out/lighting_app_wifi_rs9116 BRD4161A --wifi rs9116 --docker
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py efr32 BRD4161A+rs9116 lighting-app \
out/lighting_app_wifi_rs9116/BRD4161A/chip-efr32-lighting-example.out /tmp/bloat_reports/
out/lighting_app_wifi_rs9116/BRD4161A/matter-silabs-lighting-example.out /tmp/bloat_reports/
- name: Clean out build output
run: rm -rf ./out
- name: Uploading Size Reports
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/account-login-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/air-quality-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/application-basic-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/application-launcher-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/audio-output-cluster.xml \
Expand Down Expand Up @@ -170,6 +171,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/proxy-valid-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/pump-configuration-and-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/pwm-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/refrigerator-alarm.xml \
src/app/zap-templates/zcl/data-model/chip/relative-humidity-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/scene.xml \
src/app/zap-templates/zcl/data-model/chip/software-diagnostics-cluster.xml \
Expand All @@ -187,11 +189,13 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
src/app/zap-templates/zcl/data-model/chip/temperature-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \
src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml \
src/app/zap-templates/zcl/data-model/draft/electrical-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \
src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/replacable-monitoring-cluster.xml \
"
- name: Build Apps
timeout-minutes: 60
Expand Down
10 changes: 10 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,13 @@
path = third_party/imgui/repo
url = https://github.com/ocornut/imgui
platforms = linux
[submodule "third_party/asr/asr582x/asr_sdk"]
path = third_party/asr/asr582x/asr_sdk
url = https://github.com/asriot/ASR582X_Freertos.git
branch = matter
platforms = asr
[submodule "third_party/asr/asr595x/asr_sdk"]
path = third_party/asr/asr595x/asr_sdk
url = https://github.com/asriot/ASR595X_Freertos.git
branch = matter
platforms = asr
60 changes: 19 additions & 41 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -430,16 +430,16 @@
"name": "Debug Open IoT SDK example application",
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/examples/${input:openiotsdkApp}/openiotsdk",
"executable": "./build/chip-openiotsdk-${input:openiotsdkApp}-example.elf",
"cwd": "${workspaceRoot}/examples/${input:openiotsdkExample}/openiotsdk",
"executable": "./build/chip-openiotsdk-${input:openiotsdkExample}-example.elf",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/packages/arm/bin/",
"servertype": "external",
"gdbTarget": "${input:openiotsdkRemoteHost}:31627", //GDBserver port on FVP
"overrideLaunchCommands": [
"-enable-pretty-printing",
"add-symbol-file ./build/bl2.elf 0x10000000",
"add-symbol-file ./build/tfm_s.elf 0x38000400",
"add-symbol-file ./build/chip-openiotsdk-${input:openiotsdkApp}-example_ns.elf 0x28060400",
"add-symbol-file ./build/chip-openiotsdk-${input:openiotsdkExample}-example_ns.elf 0x28060400",
"break main_ns.cpp:main"
],
"runToEntryPoint": "main",
Expand All @@ -451,15 +451,15 @@
"type": "cortex-debug",
"request": "launch",
"cwd": "${workspaceRoot}/src/test_driver/openiotsdk/unit-tests",
"executable": "./build/${input:openiotsdkUnittest}.elf",
"executable": "./build/${input:openiotsdkUnitTest}.elf",
"armToolchainPath": "${env:PW_ENVIRONMENT_ROOT}/cipd/packages/arm/bin/",
"servertype": "external",
"gdbTarget": ":31627", //GDBserver port on FVP
"overrideLaunchCommands": [
"-enable-pretty-printing",
"add-symbol-file ./build/bl2.elf 0x10000000",
"add-symbol-file ./build/tfm_s.elf 0x38000400",
"add-symbol-file ./build/${input:openiotsdkUnittest}_ns.elf 0x28060400",
"add-symbol-file ./build/${input:openiotsdkUnitTest}_ns.elf 0x28060400",
"break main_ns.cpp:main"
],
"runToEntryPoint": "main",
Expand Down Expand Up @@ -522,11 +522,13 @@
"default": "CY8CPROTO_062_4343W"
},
{
"type": "pickString",
"id": "openiotsdkApp",
"description": "What Open IoT SDK example do you want to use?",
"options": ["shell", "lock-app"],
"default": "shell"
"type": "command",
"id": "openiotsdkExample",
"command": "shellCommand.execute",
"args": {
"command": "cat examples/platform/openiotsdk/supported_examples.txt",
"description": "What Open IoT SDK example application do you want to use?"
}
},
{
"type": "promptString",
Expand All @@ -535,37 +537,13 @@
"default": ""
},
{
"type": "pickString",
"id": "openiotsdkUnittest",
"description": "What Open IoT SDK unit test do you want to use?",
"options": [
"accesstest",
"AppTests",
"ASN1Tests",
"BDXTests",
"ChipCryptoTests",
"ControllerTests",
"CoreTests",
"CredentialsTest",
"DataModelTests",
"InetLayerTests",
"MdnsTests",
"MessagingLayerTests",
"MinimalMdnsCoreTests",
"MinimalMdnsRecordsTests",
"MinimalMdnsRespondersTests",
"PlatformTests",
"RawTransportTests",
"RetransmitTests",
"SecureChannelTests",
"SetupPayloadTests",
"SupportTests",
"SystemLayerTests",
"TestShell",
"TransportLayerTests",
"UserDirectedCommissioningTests"
],
"default": "accesstest"
"type": "command",
"id": "openiotsdkUnitTest",
"command": "shellCommand.execute",
"args": {
"command": "cat src/test_driver/openiotsdk/unit-tests/test_components.txt",
"description": "What Open IoT SDK unit test application do you want to use?"
}
}
]
}
Loading

0 comments on commit b78ff62

Please sign in to comment.