Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/lwip-revert
Browse files Browse the repository at this point in the history
  • Loading branch information
andy31415 authored Jul 22, 2022
2 parents ca13d01 + 3abbf2c commit f7899d5
Show file tree
Hide file tree
Showing 173 changed files with 6,049 additions and 3,612 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ jobs:
# use that on Darwin.
# * the "host clang" build, which uses the pigweed
# clang.
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false enable_host_gcc_mbedtls_build=false';;
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';;
"python_lib") GN_ARGS='enable_rtti=true enable_pylib=true';;
esac
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ jobs:
chip_build_tests=false \
chip_enable_wifi=false \
chip_im_force_fabric_quota_check=true \
enable_default_builds=false \
enable_host_gcc_build=true \
enable_host_gcc_mbedtls_build=false \
enable_host_clang_build=false \
enable_fake_tests=false
enable_standalone_chip_tool_build=true \
enable_linux_all_clusters_app_build=true \
enable_linux_lighting_app_build=true
- name: Run Tests
timeout-minutes: 25
run: |
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/docker_img.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,3 @@ jobs:
run: |
cd integrations/docker/images/chip-build${{ matrix.img }}
./build.sh --latest
- name: Scan for vulnerabilities
uses: crazy-max/docker-scan-action@master
with:
# NOTE: This task validates the images built previously with latest tag
image: connectedhomeip/chip-build${{ matrix.img }}:latest
annotations: true
10 changes: 5 additions & 5 deletions .github/workflows/examples-k32w.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-k32w:0.5.84
image: connectedhomeip/chip-build-k32w:0.5.87
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
Expand Down Expand Up @@ -82,15 +82,15 @@ jobs:
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
k32w k32w061+release light \
out/artifacts/k32w-light-release-no-ota/chip-k32w061-light-example \
k32w k32w0+release light \
out/artifacts/k32w-light-release-no-ota/chip-k32w0x-light-example \
/tmp/bloat_reports/
- name: Get lock size stats
timeout-minutes: 5
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
k32w k32w061+release lock \
out/artifacts/k32w-lock-low-power-release/chip-k32w061-lock-example \
k32w k32w0+release lock \
out/artifacts/k32w-lock-low-power-release/chip-k32w0x-lock-example \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: actions/upload-artifact@v2
Expand Down
16 changes: 15 additions & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,11 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
enable_host_gcc_build = enable_default_builds && host_os != "win"

# Enable building chip with gcc & mbedtls.
enable_host_gcc_mbedtls_build = enable_default_builds && host_os != "win"
enable_host_gcc_mbedtls_build = false

# Enable limited testing with gcc & mbedtls.
enable_host_gcc_mbedtls_crypto_tests =
enable_default_builds && host_os != "win"

# Build the chip-cert tool.
enable_standalone_chip_cert_build =
Expand Down Expand Up @@ -349,6 +353,15 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
builds += [ ":host_gcc_mbedtls" ]
}

if (enable_host_gcc_mbedtls_crypto_tests) {
chip_build("host_gcc_mbedtls_crypto_tests") {
test_group = "//src:crypto_tests"
toolchain = "${chip_root}/config/mbedtls/toolchain:${host_os}_${host_cpu}_gcc_mbedtls"
}

builds += [ ":host_gcc_mbedtls_crypto_tests" ]
}

if (enable_android_builds) {
chip_build("android_arm") {
toolchain = "${build_root}/toolchain/android:android_arm"
Expand Down Expand Up @@ -376,6 +389,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {

if (enable_fake_tests) {
chip_build("fake_platform") {
test_group = "//src:fake_platform_tests"
toolchain = "${build_root}/toolchain/fake:fake_${host_cpu}_gcc"
}

Expand Down
14 changes: 12 additions & 2 deletions build/chip/chip_build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@ template("chip_build") {
_build_name = target_name
_toolchain = invoker.toolchain

if (defined(invoker.test_group) && chip_build_tests) {
_build_target = invoker.test_group
_check_target = get_label_info(invoker.test_group, "dir") + ":" +
get_label_info(invoker.test_group, "name") + "_run"
} else {
_build_target = ":default"
_check_target = ":check"
not_needed(invoker, [ "test_group" ])
}

group("${_build_name}") {
deps = [ ":default(${_toolchain})" ]
deps = [ "${_build_target}(${_toolchain})" ]
}

group("check_${_build_name}") {
deps = [ ":check(${_toolchain})" ]
deps = [ "${_check_target}(${_toolchain})" ]
}
}
4 changes: 2 additions & 2 deletions build/chip/chip_test_group.gni
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ template("chip_test_group") {
}
}

if (chip_link_tests) {
group("${_test_group_name}_run") {
group("${_test_group_name}_run") {
if (chip_link_tests) {
deps = []
foreach(_test, invoker.deps) {
deps += [ get_label_info(_test, "label_no_toolchain") + "_run" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@ server cluster Groups = 4 {
group_id groupId = 1;
}

command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0;
command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1;
command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2;
command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3;
command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4;
command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5;
fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0;
fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1;
fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2;
fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3;
fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4;
fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5;
}

server cluster Scenes = 5 {
Expand Down Expand Up @@ -206,13 +206,13 @@ server cluster Scenes = 5 {
optional INT8U sceneList[] = 3;
}

command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0;
command ViewScene(ViewSceneRequest): ViewSceneResponse = 1;
command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2;
command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3;
command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4;
command RecallScene(RecallSceneRequest): DefaultSuccess = 5;
command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0;
fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1;
fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2;
fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3;
fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4;
fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5;
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
}

server cluster OnOff = 6 {
Expand Down Expand Up @@ -911,7 +911,7 @@ server cluster GeneralCommissioning = 48 {

command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
}

server cluster NetworkCommissioning = 49 {
Expand Down Expand Up @@ -1540,7 +1540,6 @@ server cluster OperationalCredentials = 62 {
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
kInvalidFabricIndex = 11;
Expand Down Expand Up @@ -1632,8 +1631,8 @@ server cluster OperationalCredentials = 62 {
command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4;
command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6;
command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
}
Expand Down Expand Up @@ -1699,10 +1698,10 @@ server cluster GroupKeyManagement = 63 {
INT16U groupKeySetIDs[] = 0;
}

command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4;
fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4;
}

server cluster FixedLabel = 64 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ server cluster Groups = 4 {
group_id groupId = 1;
}

command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0;
command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1;
command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2;
command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3;
command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4;
command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5;
fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0;
fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1;
fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2;
fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3;
fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4;
fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5;
}

server cluster Scenes = 5 {
Expand Down Expand Up @@ -200,13 +200,13 @@ server cluster Scenes = 5 {
optional INT8U sceneList[] = 3;
}

command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0;
command ViewScene(ViewSceneRequest): ViewSceneResponse = 1;
command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2;
command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3;
command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4;
command RecallScene(RecallSceneRequest): DefaultSuccess = 5;
command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0;
fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1;
fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2;
fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3;
fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4;
fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5;
fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6;
}

server cluster OnOff = 6 {
Expand Down Expand Up @@ -840,7 +840,7 @@ server cluster GeneralCommissioning = 48 {

command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
}

server cluster NetworkCommissioning = 49 {
Expand Down Expand Up @@ -1385,7 +1385,6 @@ server cluster OperationalCredentials = 62 {
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
kInvalidFabricIndex = 11;
Expand Down Expand Up @@ -1477,8 +1476,8 @@ server cluster OperationalCredentials = 62 {
command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4;
command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6;
command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
}
Expand Down Expand Up @@ -1544,10 +1543,10 @@ server cluster GroupKeyManagement = 63 {
INT16U groupKeySetIDs[] = 0;
}

command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4;
fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4;
}

server cluster FixedLabel = 64 {
Expand Down
24 changes: 16 additions & 8 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,19 @@ server cluster BridgedActions = 37 {

readonly attribute ActionStruct actionList[] = 0;
readonly attribute EndpointListStruct endpointList[] = 1;
readonly attribute long_char_string<512> setupUrl = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct InstantActionRequest {
INT16U actionID = 0;
optional INT32U invokeID = 1;
}

command InstantAction(InstantActionRequest): DefaultSuccess = 0;
}

server cluster Basic = 40 {
Expand Down Expand Up @@ -593,7 +601,7 @@ server cluster GeneralCommissioning = 48 {

command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0;
command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2;
command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4;
}

server cluster NetworkCommissioning = 49 {
Expand Down Expand Up @@ -1222,7 +1230,6 @@ server cluster OperationalCredentials = 62 {
kMissingCsr = 4;
kTableFull = 5;
kInvalidAdminSubject = 6;
kInsufficientPrivilege = 8;
kFabricConflict = 9;
kLabelConflict = 10;
kInvalidFabricIndex = 11;
Expand Down Expand Up @@ -1317,8 +1324,8 @@ server cluster OperationalCredentials = 62 {
command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2;
command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4;
command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6;
command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7;
fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9;
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
}
Expand Down Expand Up @@ -1387,10 +1394,10 @@ server cluster GroupKeyManagement = 63 {
INT16U groupKeySetIDs[] = 0;
}

command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4;
fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0;
fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1;
fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3;
fabric command access(invoke: administer) KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4;
}

server cluster UserLabel = 65 {
Expand Down Expand Up @@ -1723,6 +1730,7 @@ endpoint 1 {
server cluster BridgedActions {
callback attribute actionList;
callback attribute endpointList;
ram attribute setupUrl default = "https://example.com";
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
Expand Down
Loading

0 comments on commit f7899d5

Please sign in to comment.