Skip to content

Commit

Permalink
Merge branch 'master' into telink_button_manager_refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 authored May 25, 2023
2 parents 7d74b13 + 9f43988 commit cc9ab41
Show file tree
Hide file tree
Showing 522 changed files with 95,843 additions and 63,923 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,23 +136,26 @@ jobs:
run: defaults delete com.apple.dt.xctest.tool
continue-on-error: true
- name: Run Framework Tests
timeout-minutes: 20
timeout-minutes: 30
# 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?
run: |
mkdir -p /tmp/darwin/framework-tests
../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
# Make each ota-requestor is using a different port, discriminator, and KVS from
# Make sure each ota-requestor is using a different port, discriminator, and KVS from
# all-clusters-app and from other requestors.
#
# And a different port from the test harness too; the test harness uses port 5541.
../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5542 --discriminator 1111 --KVS /tmp/chip-ota-requestor-kvs1 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image1 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-1.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-1.log >&2) &
../../../out/debug/chip-ota-requestor-app --interface-id -1 --secured-device-port 5543 --discriminator 1112 --KVS /tmp/chip-ota-requestor-kvs2 --otaDownloadPath /tmp/chip-ota-requestor-downloaded-image2 --autoApplyImage > >(tee /tmp/darwin/framework-tests/ota-requestor-app-2.log) 2> >(tee /tmp/darwin/framework-tests/ota-requestor-app-err-2.log >&2) &
# UndefinedBehaviorSanitizer is enabled in the Xcode scheme, so the code in Matter.framework gets instrumented,
# -enableUndefinedBehaviorSanitizer instruments the code in Matter.framework,
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_UBSAN=YES
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' CHIP_IS_UBSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-err.log >&2)
TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableAddressSanitizer YES -enableUndefinedBehaviorSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' CHIP_IS_UBSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-asan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-asan-err.log >&2)
# -enableThreadSanitizer instruments the code in Matter.framework,
# but to instrument the code in the underlying libCHIP we need to pass CHIP_IS_TSAN=YES
xcodebuild test -target "Matter" -scheme "Matter Framework Tests" -sdk macosx -enableThreadSanitizer YES OTHER_CFLAGS='${inherited} -Werror -Wconversion -Wno-incomplete-umbrella -Wno-unguarded-availability-new' CHIP_IS_TSAN=YES > >(tee /tmp/darwin/framework-tests/darwin-tests-tsan.log) 2> >(tee /tmp/darwin/framework-tests/darwin-tests-tsan-err.log >&2)
working-directory: src/darwin/Framework
- name: Uploading log files
uses: actions/upload-artifact@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Test SLC gen
timeout-minutes: 30
run: |
scripts/examples/gn_efr32_example.sh examples/lighting-app/silabs/efr32 ./out/light-app BRD4187C --slc_generate --docker
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs ./out/light-app BRD4187C --slc_generate --docker
rm -rf ./out/
- name: Build some BRD4187C variants
timeout-minutes: 90
Expand Down Expand Up @@ -120,15 +120,15 @@ jobs:
- name: Build example EFR32+WF200 WiFi Lock app for BRD4161A
timeout-minutes: 15
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
scripts/examples/gn_silabs_example.sh examples/lock-app/silabs 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/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
scripts/examples/gn_silabs_example.sh examples/lighting-app/silabs 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/matter-silabs-lighting-example.out /tmp/bloat_reports/
- name: Clean out build output
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,18 @@ jobs:
- name: clean out build output
run: rm -rf ./out

- name: Build example Telink Lighting App with Shell
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target 'telink-tlsr9518adk80d-light-shell' build"
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
telink tlsr9518adk80d lighting-app-shell \
out/telink-tlsr9518adk80d-light-shell/zephyr/zephyr.elf \
/tmp/bloat_reports/
- name: clean out build output
run: rm -rf ./out

- name: Build example Telink Lighting App with Factory Data
run: |
./scripts/checkout_submodules.py --allow-changing-global-git-config --shallow --platform linux
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_artifacts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
.environment/pigweed-venv/*.log
- name: Build example EFR32 Lock App
run: scripts/examples/gn_efr32_example.sh examples/lock-app/efr32/
run: scripts/examples/gn_silabs_example.sh examples/lock-app/efr32/
out/lock_app_debug $SILABS_BOARD

- name: Upload artifact
Expand Down
20 changes: 20 additions & 0 deletions config/telink/chip-module/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,23 @@ config CHIP_OPENTHREAD_TX_POWER
config SHELL_BACKEND_SERIAL_RX_RING_BUFFER_SIZE
int
default 255 if SHELL_BACKEND_SERIAL

config CHIP_ICD_SUBSCRIPTION_HANDLING
bool "Enables platform specific handling of ICD subscriptions"
default PM
help
Enables platform specific implementation that handles ICD subscription requests
and selects subscription report interval value considering maximum interval preferred
by the publisher.

config CHIP_MAX_PREFERRED_SUBSCRIPTION_REPORT_INTERVAL
int "Maximum preferred interval of sending subscription reports (s)"
default 60
help
Provides maximum preferred interval to be used by a publisher for negotiation
of the final maximum subscription report interval, after receiving a subscription
request from the initiator. This value should be selected as a compromise between
keeping the power consumption low due to not sending reports too often, and allowing
the initiator device to detect the publisher absence reasonably fast due to not sending
the reports too rarely. The current algorithm is to select bigger value from the one
requested by the initiator and the one preferred by the publisher.
6 changes: 3 additions & 3 deletions docs/guides/access-control-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -552,13 +552,13 @@ await devCtrl.WriteAttribute(1, [ (0, Clusters.AccessControl.Attributes.Acl( [
authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kGroup,
subjects = [ 123, 456 ],
targets = [
Clusters.AccessControl.Structs.Target(
Clusters.AccessControl.Structs.AccessControlTargetStruct(
cluster = Clusters.OnOff.id,
),
Clusters.AccessControl.Structs.Target(
Clusters.AccessControl.Structs.AccessControlTargetStruct(
endpoint = 1,
),
Clusters.AccessControl.Structs.Target(
Clusters.AccessControl.Structs.AccessControlTargetStruct(
cluster = Clusters.LevelControl.id,
endpoint = 2,
),
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/darwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ Example:
##### Guides

- [Bouffalo Lab](/examples/lighting-app/bouffalolab/README.md)
- [EFR32 Window Covering](/examples/window-app/silabs/efr32/README.md)
- [EFR32 Window Covering](/examples/window-app/silabs/README.md)
- [ESP32 All Clusters](/examples/all-clusters-app/esp32/README.md)
- [ESP32 Lighting](/examples/lighting-app/esp32/README.md)
- [ESP32 Temperature Sensor](/examples/temperature-measurement-app/esp32/README.md)
Expand All @@ -268,7 +268,7 @@ Example:
- [Simulated Linux](./simulated_device_linux.md)
- [Telink](/examples/lighting-app/telink/README.md)
- [TI Platform](./ti_platform_overview.md)
- [TI All Clusters](/examples/all-clusters-app/cc13x2x7_26x2x7/README.md)
- [TI All Clusters](/examples/all-clusters-app/cc13x4_26x4/README.md)
- [Tizen](/examples/lighting-app/tizen/README.md)

## Providing Feedback to Apple
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/repl/Matter_Access_Control.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@
" fabricIndex = 1,\n",
" privilege = Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kOperate,\n",
" authMode = Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase,\n",
" targets = [ Clusters.AccessControl.Structs.Target(\n",
" targets = [ Clusters.AccessControl.Structs.AccessControlTargetStruct(\n",
" endpoint = 1,\n",
" ) ] ) )\n",
"acl"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ server cluster AccessControl = 31 {
kRemoved = 2;
}

struct Target {
struct AccessControlTargetStruct {
nullable cluster_id cluster = 0;
nullable endpoint_no endpoint = 1;
nullable devtype_id deviceType = 2;
Expand All @@ -575,7 +575,7 @@ server cluster AccessControl = 31 {
fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1;
fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2;
nullable fabric_sensitive int64u subjects[] = 3;
nullable fabric_sensitive Target targets[] = 4;
nullable fabric_sensitive AccessControlTargetStruct targets[] = 4;
fabric_idx fabricIndex = 254;
}

Expand Down Expand Up @@ -3203,6 +3203,7 @@ server cluster Thermostat = 513 {
kScheduleConfiguration = 0x8;
kSetback = 0x10;
kAutoMode = 0x20;
kLocalTemperatureNotExposed = 0x40;
}

bitmap ModeForSequence : BITMAP8 {
Expand Down Expand Up @@ -5292,14 +5293,14 @@ endpoint 1 {
}

server cluster ColorControl {
ram attribute currentHue default = 0x00;
ram attribute currentSaturation default = 0x00;
persist attribute currentHue default = 0x00;
persist attribute currentSaturation default = 0x00;
ram attribute remainingTime default = 0x0000;
ram attribute currentX default = 0x616B;
ram attribute currentY default = 0x607D;
persist attribute currentX default = 0x616B;
persist attribute currentY default = 0x607D;
ram attribute driftCompensation;
ram attribute compensationText;
ram attribute colorTemperatureMireds default = 0x00FA;
persist attribute colorTemperatureMireds default = 0x00FA;
ram attribute colorMode default = 0x01;
ram attribute options default = 0x00;
ram attribute numberOfPrimaries;
Expand Down Expand Up @@ -5332,18 +5333,18 @@ endpoint 1 {
ram attribute colorPointBX;
ram attribute colorPointBY;
ram attribute colorPointBIntensity;
ram attribute enhancedCurrentHue default = 0x0000;
ram attribute enhancedColorMode default = 0x01;
ram attribute colorLoopActive default = 0x00;
ram attribute colorLoopDirection default = 0x00;
ram attribute colorLoopTime default = 0x0019;
persist attribute enhancedCurrentHue default = 0x0000;
persist attribute enhancedColorMode default = 0x01;
persist attribute colorLoopActive default = 0x00;
persist attribute colorLoopDirection default = 0x00;
persist attribute colorLoopTime default = 0x0019;
ram attribute colorLoopStartEnhancedHue default = 0x2300;
ram attribute colorLoopStoredEnhancedHue default = 0x0000;
ram attribute colorCapabilities default = 0x1F;
ram attribute colorTempPhysicalMinMireds default = 0x0000;
ram attribute colorTempPhysicalMaxMireds default = 0xFEFF;
ram attribute coupleColorTempToLevelMinMireds;
ram attribute startUpColorTemperatureMireds;
persist attribute startUpColorTemperatureMireds;
ram attribute featureMap default = 0x1F;
ram attribute clusterRevision default = 5;
}
Expand Down
25 changes: 13 additions & 12 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -16083,7 +16083,7 @@
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
Expand All @@ -16099,7 +16099,7 @@
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
Expand Down Expand Up @@ -16131,7 +16131,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x616B",
Expand All @@ -16147,7 +16147,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x607D",
Expand Down Expand Up @@ -16195,7 +16195,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00FA",
Expand Down Expand Up @@ -16723,7 +16723,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
Expand All @@ -16739,7 +16739,7 @@
"side": "server",
"type": "enum8",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x01",
Expand All @@ -16755,7 +16755,7 @@
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
Expand All @@ -16771,7 +16771,7 @@
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
Expand All @@ -16787,7 +16787,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0019",
Expand Down Expand Up @@ -16899,7 +16899,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "NVM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand Down Expand Up @@ -25580,5 +25580,6 @@
"endpointVersion": 1,
"deviceIdentifier": 61442
}
]
],
"log": []
}
7 changes: 2 additions & 5 deletions examples/all-clusters-app/cc13x2x7_26x2x7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,8 @@ Some initial setup is necessary for preparing the build environment. This
section will need to be done when migrating to new versions of the SDK. This
guide assumes that the environment is linux based, and recommends Ubuntu 20.04.

- Download and install [SysConfig][sysconfig] ([recommended
version][sysconfig_recommended]). This can be done simply with the following
commands.
- Download and install [SysConfig][sysconfig]. This can be done simply with
the following commands.

```
$ cd ~
Expand Down Expand Up @@ -236,8 +235,6 @@ Additionally, we welcome any feedback.
[matter-e2e-faq]:
https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1082428/faq-cc2652r7-matter----getting-started-guide
[sysconfig]: https://www.ti.com/tool/SYSCONFIG
[sysconfig_recommended]:
https://software-dl.ti.com/ccs/esd/sysconfig/sysconfig-1.11.0_2225-setup.run
[ti_thread_dnd]:
https://www.ti.com/wireless-connectivity/thread/design-development.html
[ot_border_router_setup]: https://openthread.io/guides/border-router/build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,18 @@
# 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}/config/standalone/args.gni")

silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain")
import("${chip_root}/src/platform/silabs/args.gni")
import("//build_overrides/build.gni")

app_data_model = "${chip_root}/examples/lighting-app/silabs/SiWx917/data_model:silabs-lighting"
chip_enable_ota_requestor = true
# 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 = "freertos"

import("//args.gni")
}
Loading

0 comments on commit cc9ab41

Please sign in to comment.