Skip to content

Commit

Permalink
Merge branch 'master' into DiagnosticData
Browse files Browse the repository at this point in the history
  • Loading branch information
wy-hh authored Mar 21, 2023
2 parents 7471231 + 5853405 commit eeb0493
Show file tree
Hide file tree
Showing 168 changed files with 25,378 additions and 4,953 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/examples-efr32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-efr32:0.6.47
image: connectedhomeip/chip-build-efr32:0.6.50
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand All @@ -52,7 +52,7 @@ jobs:
attempt_limit: 3
attempt_delay: 2000
- name: Checkout submodules
run: scripts/checkout_submodules.py --shallow --platform efr32
run: scripts/checkout_submodules.py --shallow --platform silabs_docker

# - name: Out of Tree verification
# run: third_party/silabs/out_of_tree_verification.sh
Expand Down Expand Up @@ -114,15 +114,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
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/
- 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
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/
- name: Clean out build output
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/smoketest-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,11 @@ jobs:
run: |
./scripts/run_in_build_env.sh \
"ninja -C out/android-arm64-chip-tool build/chip/java/tests:java_build_test"
- name: Build Android arm64-tv-casting-app
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target android-arm64-tv-casting-app build"
- name: Build Android arm64-tv-server
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py --target android-arm64-tv-server build"
8 changes: 4 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
path = third_party/freertos/repo
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git
branch = V10.3.1-kernel-only
platforms = ameba,cc13x2_26x2,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx
platforms = ameba,cc13x2_26x2,bouffalolab,efr32,esp32,k32w0,infineon,qpg,cc32xx,silabs_docker
[submodule "simw-top-mini"]
path = third_party/simw-top-mini/repo
url = https://github.com/NXP/plug-and-trust.git
Expand All @@ -76,7 +76,7 @@
path = third_party/openthread/ot-efr32
url = https://github.com/SiliconLabs/ot-efr32.git
branch = matter_sve
platforms = efr32
platforms = efr32,silabs_docker
[submodule "third_party/openthread/ot-ifx"]
path = third_party/openthread/ot-ifx
url = https://github.com/Infineon/ot-ifx-release.git
Expand Down Expand Up @@ -238,7 +238,7 @@
path = third_party/silabs/matter_support
url = https://github.com/SiliconLabs/sdk_support.git
branch = main
platforms = efr32
platforms = efr32,silabs_docker
[submodule "third_party/silabs/gecko_sdk"]
path = third_party/silabs/gecko_sdk
url = https://github.com/SiliconLabs/gecko_sdk.git
Expand All @@ -248,7 +248,7 @@
path = third_party/silabs/wiseconnect-wifi-bt-sdk
url = https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk.git
branch = master
platforms = efr32
platforms = efr32,silabs_docker
[submodule "editline"]
path = third_party/editline/repo
url = https://github.com/troglobit/editline.git
Expand Down
7 changes: 7 additions & 0 deletions docs/guides/android_building.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,16 @@ JDK version on MacOS for Apple Silicon is 'openjdk 17.0.1' or above.

Using JDK bundled with Android Studio will help with that.

Android Studio Dolphin and below:

```shell
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home/
```
Android Studio Electric Eel 2022.1.1 and above:

```shell
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jbr/Contents/Home/
```

<hr>

Expand Down
73 changes: 40 additions & 33 deletions docs/guides/simulated_device_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,21 @@ is defined by a ZAP config file and tests can be added with a

- [Building Prerequisites](./BUILDING.md#prerequisites)
- [Prepare For Building](./BUILDING.md#prepare-for-building)
- [Code Generate](../code_generation.md)
- [ZAP Installed](../code_generation.md#installing-zap-and-environment-variables)

## Generating and building the default Simulated App with Script
## Building the default Simulated App with Script

In order to utilize the app against a commissioner or controller, the app will
need to be specifically built.

1. To generate the ZAP files, and build the `chip-app1` binary completing the
following steps:
1. To build the `chip-app1` binary completing the following steps:

```
./scripts/examples/gn_build_test_example.sh app1
./scripts/examples/gn_build_example.sh examples/placeholder/linux out/debug/simulated/ chip_tests_zap_config=\"app1\"
```
## Build the App only
## Build the App with gn and ninja
In order to utilize the app against a commissioner or controller, the app will
need to be specifically built.
Expand All @@ -46,13 +47,7 @@ need to be specifically built.
```
source scripts/activate.sh
CHIP_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
GN_ARGS="chip_tests_zap_config=\"app1\""
GN_ARGS+="chip_project_config_include_dirs=[\"$CHIP_ROOT/examples/placeholder/linux/apps/app1/include\", \"$CHIP_ROOT/config/standalone\"]"
GN_ARGS+="chip_config_network_layer_ble=false"
gn gen --check --fail-on-unused-args --root=examples/placeholder/linux out/simulated --args="$GN_ARGS"
gn gen --check --root=examples/placeholder/linux out/simulated --args="chip_tests_zap_config=\"app1\""
ninja -C out/simulated
```
Expand All @@ -61,24 +56,18 @@ need to be specifically built.
Now that the building is completed there is a `chip-app1` binary created. This
binary can be executed on a linux os.
1. To generate the ZAP files, and build the `chip-app1` binary completing the
following steps:
```
./out/simulated/chip-app1
```
```
./out/simulated/chip-app1
```
## Running the app with test parameter
Now that the building is completed there is a `chip-app1` binary created. This
binary can be executed on a linux os with test commands.
1. To generate the ZAP files, and build the `chip-app1` binary completing the
following steps:
```
./out/simulated/chip-app1 --command [TEST NAME]
```
```
./out/simulated/chip-app1 --command [TEST NAME]
```
## Interacting with the simulated app
Expand All @@ -88,11 +77,13 @@ interact with it using chip-tool
1. Follow the instruction to build chip-tool in the
[chip-tool readme](../../examples/chip-tool/README.md).
2. Run this command to commission.
2. Run this command to commission with whatever is listed on the "SetupQRCode:"
line in the log output:
```
./out/debug/standalone/chip-tool pairing code 0x654321 MT:-24J0AFN00KA0648G00
./out/debug/standalone/chip-tool pairing code 0x654321 MT:-24J0AFN00KA0648G00
```
or whatever is listed on the "SetupQRCode:" line in the log output.
3. Most tests will start at this point and now an send cluster commands with
chip-tool as follow.
Expand All @@ -113,14 +104,18 @@ new code is generated.
1. YAML test file are located in
[YAML folder](../../src/app/tests/suites/certification/)
2. Test names must follow a strict format dues to CI of test recognition. The
format is as follows:
- Test_TC\_[`CATEGORY ABBREVIATION`]\_[`SECTION NUMBER`]\_[`SUBSECTION
NUMBER`]\_Simulated.yaml
- <strong>`IMPORTANT`: The test name must end in Simulated with the
capital.</strong>
3. Available properties can be found in
[YAML Test Name](../../src/app/tests/suites/README.md)
4. An Additional property is as follows:
| Name | Description |
Expand All @@ -129,14 +124,26 @@ new code is generated.
5. [Test_TC_DM_1_3_Simulated](../../src/app/tests/suites/certification/Test_TC_DM_1_3_Simulated.yaml)
is an example of a written test that runs on the simulated device.
6. Next, it will need to be added to
[examples/placeholder/linux/apps/app1/tests.js](../../examples/placeholder/linux/apps/app1/tests.js).
in the following array
[examples/placeholder/linux/apps/app1/tests.js](../../examples/placeholder/linux/apps/app1/tests.js)
in the following array:
```javascript
const tests = ["Test_TC_DM_1_3_Simulated"];
```
7. Then, the code will be generated using ZAP. Follow
[Gen Script](#generating-and-building-the-default-simulated-app-with-script)
to do so.
8. When submitting code for review, create 2 commits. One for YAML changes and
7. Then, the code will be generated using ZAP.
```
./scripts/tools/zap/generate.py examples/placeholder/linux/apps/app1/config.zap -t examples/placeholder/templates/templates.json -o zzz_generated/placeholder/app1/zap-generated
```
The following command can be used to generate and compile:
```
./scripts/examples/gn_build_test_example.sh app1
```
8) When submitting code for review, create 2 commits. One for YAML changes and
second for generated code.
Original file line number Diff line number Diff line change
Expand Up @@ -659,49 +659,11 @@ server cluster Actions = 37 {
}

server cluster BasicInformation = 40 {
enum ColorEnum : ENUM8 {
kBlack = 0;
kNavy = 1;
kGreen = 2;
kTeal = 3;
kMaroon = 4;
kPurple = 5;
kOlive = 6;
kGray = 7;
kBlue = 8;
kLime = 9;
kAqua = 10;
kRed = 11;
kFuchsia = 12;
kYellow = 13;
kWhite = 14;
kNickel = 15;
kChrome = 16;
kBrass = 17;
kCopper = 18;
kSilver = 19;
kGold = 20;
}

enum ProductFinishEnum : ENUM8 {
kMatte = 0;
kSatin = 1;
kPolished = 2;
kRugged = 3;
kFabric = 4;
kOther = 255;
}

struct CapabilityMinimaStruct {
int16u caseSessionsPerFabric = 0;
int16u subscriptionsPerFabric = 1;
}

struct ProductAppearanceStruct {
ProductFinishEnum finish = 0;
nullable ColorEnum primaryColor = 1;
}

critical event StartUp = 0 {
INT32U softwareVersion = 0;
}
Expand Down Expand Up @@ -737,7 +699,6 @@ server cluster BasicInformation = 40 {
readonly attribute boolean reachable = 17;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute ProductAppearanceStruct productAppearance = 20;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -4509,9 +4470,8 @@ endpoint 0 {
ram attribute reachable default = 1;
callback attribute uniqueID;
callback attribute capabilityMinima;
callback attribute productAppearance;
ram attribute featureMap;
ram attribute clusterRevision default = 2;
ram attribute clusterRevision default = 1;
}

server cluster OtaSoftwareUpdateRequestor {
Expand Down
21 changes: 2 additions & 19 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1508,22 +1508,6 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ProductAppearance",
"code": 20,
"mfgCode": null,
"side": "server",
"type": "ProductAppearanceStruct",
"included": 1,
"storageOption": "External",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand All @@ -1550,7 +1534,7 @@
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "2",
"defaultValue": "1",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
Expand Down Expand Up @@ -25514,6 +25498,5 @@
"endpointVersion": 1,
"deviceIdentifier": 61442
}
],
"log": []
]
}
Loading

0 comments on commit eeb0493

Please sign in to comment.