Skip to content

Commit

Permalink
Merge branch 'master' into feature/enable-all-attributes-chiptool
Browse files Browse the repository at this point in the history
  • Loading branch information
tlykkeberg-grundfos committed Oct 15, 2021
2 parents 90951fa + a56c83e commit b358e8d
Show file tree
Hide file tree
Showing 96 changed files with 976 additions and 8,768 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"BUILD_VERSION": "0.5.13"
"BUILD_VERSION": "0.5.15"
}
},
"remoteUser": "vscode",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.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-android:0.5.13
image: connectedhomeip/chip-build-android:0.5.15
volumes:
- "/tmp/log_output:/tmp/test_logs"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bloat_check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: connectedhomeip/chip-build:0.5.13
image: connectedhomeip/chip-build:0.5.15

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:0.5.13
image: connectedhomeip/chip-build:0.5.15
volumes:
- "/tmp/log_output:/tmp/test_logs"
options:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cirque.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
timeout-minutes: 60

env:
DOCKER_RUN_VERSION: 0.5.13
DOCKER_RUN_VERSION: 0.5.15
GITHUB_CACHE_PATH: /tmp/cirque-cache/

runs-on: ubuntu-latest
Expand All @@ -38,7 +38,7 @@ jobs:
# need to run with privilege, which isn't supported by job.XXX.contaner
# https://github.com/actions/container-action/issues/2
# container:
# image: connectedhomeip/chip-build-cirque:0.5.13
# image: connectedhomeip/chip-build-cirque:0.5.15
# volumes:
# - "/tmp:/tmp"
# - "/dev/pts:/dev/pts"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-infineon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-infineon:0.5.13
image: connectedhomeip/chip-build-infineon:0.5.15

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-linux-standalone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:0.5.13
image: connectedhomeip/chip-build:0.5.15
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
- "/tmp/output_binaries:/tmp/output_binaries"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-mbed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-mbed-os:0.5.13
image: connectedhomeip/chip-build-mbed-os:0.5.15
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
- "/tmp/output_binaries:/tmp/output_binaries"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-nrfconnect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-nrf-platform:0.5.13
image: connectedhomeip/chip-build-nrf-platform:0.5.15
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
- "/tmp/output_binaries:/tmp/output_binaries"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/examples-qpg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build:0.5.13
image: connectedhomeip/chip-build:0.5.15
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
- "/tmp/output_binaries:/tmp/output_binaries"
Expand Down Expand Up @@ -82,6 +82,10 @@ jobs:
qpg qpg6100+debug persistent-storage-app \
out/persistent-storage_app_debug/chip-qpg6100-persistent_storage-example.out \
/tmp/bloat_reports/
- name: Build Matter SDK library
timeout-minutes: 5
run: |
config/qpg/chip-gn/build.sh
- name: Binary artifact suffix
id: outsuffix
uses: haya14busa/action-cond@v1.0.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-telink.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-telink:0.5.13
image: connectedhomeip/chip-build-telink:0.5.15
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples-tizen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
if: github.actor != 'restyled-io[bot]'

container:
image: connectedhomeip/chip-build-tizen:0.5.13
image: connectedhomeip/chip-build-tizen:0.5.15
options: --user root
volumes:
- "/tmp/bloat_reports:/tmp/bloat_reports"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: connectedhomeip/chip-build:0.5.13
image: connectedhomeip/chip-build:0.5.15
options:
--privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0
net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_integration_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest

container:
image: connectedhomeip/chip-build:0.5.13
image: connectedhomeip/chip-build:0.5.15
volumes:
- "/tmp/log_output:/tmp/test_logs"
- "/tmp/happy_test_logs:/tmp/happy_test_logs"
Expand Down
29 changes: 29 additions & 0 deletions config/qpg/chip-gn/.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright (c) 2020 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.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"

# CHIP uses angle bracket includes.
check_system_includes = true

default_args = {
target_cpu = "arm"
target_os = "freertos"

import("//config/qpg/chip-gn/args.gni")
}
63 changes: 63 additions & 0 deletions config/qpg/chip-gn/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Copyright (c) 2020 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.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("//build_overrides/qpg_sdk.gni")
import("//third_party/qpg_sdk/qpg_sdk.gni")

import("//build/chip/tests.gni")

assert(current_os == "freertos")

declare_args() {
}

examples_plat_dir = "//examples/platform/qpg"
qpg_sdk("sdk") {
sources = [ "//examples/platform/qpg/app/include/Service.h" ]

include_dirs = [
"//src/platform/qpg",
"${examples_plat_dir}/project_include",
]
}

static_library("qpg") {
deps = [
"//src/app/server",
"//src/lib",
]

if (chip_build_tests) {
deps += [ "${chip_root}/src:tests" ]
}

output_name = "libMatterStack"

output_dir = "${root_out_dir}/lib"

complete_static_lib = true
}

group("default") {
deps = [
":qpg",
"//src/setup_payload",
"//third_party/openthread/platforms:libopenthread-platform",
"//third_party/openthread/platforms:libopenthread-platform-utils",
"//third_party/openthread/repo:libopenthread-cli-mtd",
"//third_party/openthread/repo:libopenthread-mtd",
]
}
42 changes: 42 additions & 0 deletions config/qpg/chip-gn/args.gni
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright (c) 2020 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.

import("//build_overrides/chip.gni")
import("//examples/platform/qpg/args.gni")
qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain")

chip_device_platform = "qpg"

is_debug = false
chip_enable_openthread = true
chip_config_network_layer_ble = true
chip_inet_config_enable_ipv4 = false
chip_enable_nfc = false
chip_build_tests = false
chip_monolithic_tests = false
chip_inet_config_enable_tcp_endpoint = false
chip_inet_config_enable_dns_resolver = false
chip_build_libshell = false
qpg_ar = "arm-none-eabi-ar"
qpg_cc = "arm-none-eabi-gcc"
qpg_cxx = "arm-none-eabi-g++"
chip_mdns = "platform"

chip_project_config_include_dirs =
[ "//examples/platform/qpg/project_include/" ]
chip_project_config_include = "<CHIPProjectConfig.h>"
chip_system_project_config_include = "<CHIPProjectConfig.h>"
chip_ble_project_config_include = ""

custom_toolchain = "//config/qpg/chip-gn/toolchain:qpgtoolchain"
38 changes: 38 additions & 0 deletions config/qpg/chip-gn/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

#
# Copyright (c) 2021 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.
#

source "$(dirname "$0")/../../../scripts/activate.sh"
set -ex
env

GN_ROOT_TARGET=$(dirname "$0")
CHIP_ROOT=$GN_ROOT_TARGET/../../../
OUTDIR=$CHIP_ROOT/out

mkdir -p "$OUTDIR"
gn \
--root="$CHIP_ROOT" \
--root-target=//config/qpg/chip-gn \
--dotfile="$GN_ROOT_TARGET/.gn" \
--script-executable=python3 \
--export-compile-commands \
gen \
--check \
--fail-on-unused-args \
"$OUTDIR"
ninja -C "$OUTDIR"
35 changes: 35 additions & 0 deletions config/qpg/chip-gn/toolchain/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (c) 2020 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.

import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

import("${build_root}/toolchain/arm_gcc/arm_toolchain.gni")

declare_args() {
qpg_ar = ""
qpg_cc = ""
qpg_cxx = ""
}

gcc_toolchain("qpgtoolchain") {
ar = qpg_ar
cc = qpg_cc
cxx = qpg_cxx

toolchain_args = {
current_os = "freertos"
is_clang = false
}
}
2 changes: 2 additions & 0 deletions examples/chip-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ declare_args() {
executable("chip-tool") {
sources = [
"commands/clusters/ModelCommand.cpp",
"commands/common/CHIPCommand.cpp",
"commands/common/CHIPCommand.h",
"commands/common/Command.cpp",
"commands/common/Commands.cpp",
"commands/discover/DiscoverCommand.cpp",
Expand Down
8 changes: 3 additions & 5 deletions examples/chip-tool/commands/clusters/ModelCommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,14 @@

using namespace ::chip;

CHIP_ERROR ModelCommand::Run()
CHIP_ERROR ModelCommand::Run(NodeId remoteId)
{
CHIP_ERROR err = CHIP_NO_ERROR;

auto * ctx = GetExecContext();

err = ctx->commissioner->GetConnectedDevice(ctx->remoteId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback);
err = mController.GetConnectedDevice(remoteId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback);
VerifyOrExit(err == CHIP_NO_ERROR,
ChipLogError(chipTool, "Failed in initiating connection to the device: %" PRIu64 ", error %" CHIP_ERROR_FORMAT,
ctx->remoteId, err.Format()));
remoteId, err.Format()));

exit:
return err;
Expand Down
Loading

0 comments on commit b358e8d

Please sign in to comment.